Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v6
with:
Expand All @@ -44,6 +46,8 @@ jobs:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v6
with:
Expand All @@ -62,6 +66,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v6
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
environment: pypi
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
Comment thread
cursor[bot] marked this conversation as resolved.

- name: Set up Python
uses: actions/setup-python@v6
Expand Down
1 change: 0 additions & 1 deletion customerio/__version__.py

This file was deleted.

3 changes: 2 additions & 1 deletion customerio/client_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
import math
import socket
from datetime import datetime, timezone
from importlib.metadata import version

from requests import Session
from requests.adapters import DEFAULT_POOLBLOCK, HTTPAdapter
from urllib3.connection import HTTPConnection
from urllib3.util.retry import Retry

from .__version__ import __version__ as ClientVersion
ClientVersion = version("customerio")

TCP_KEEPALIVE_IDLE_TIMEOUT = 300
TCP_KEEPALIVE_INTERVAL = 60
Expand Down
8 changes: 5 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
[build-system]
requires = ["setuptools>=77", "wheel"]
requires = ["setuptools>=77", "setuptools-scm>=8", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "customerio"
dynamic = ["version"]
# Version is derived from git tags via setuptools-scm (e.g. tag v3.0.0 → version 3.0.0)
description = "Customer.io Python bindings."
readme = "README.md"
requires-python = ">=3.10"
Expand Down Expand Up @@ -44,8 +45,9 @@ Homepage = "https://github.com/customerio/customerio-python"
Releases = "https://github.com/customerio/customerio-python/releases"
Issues = "https://github.com/customerio/customerio-python/issues"

[tool.setuptools.dynamic]
version = { attr = "customerio.__version__.__version__" }
[tool.setuptools_scm]
version_scheme = "guess-next-dev"
local_scheme = "no-local-version"

[tool.setuptools.packages.find]
include = ["customerio*"]
Expand Down
4 changes: 3 additions & 1 deletion tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import json
import unittest
from functools import partial
from importlib.metadata import version

import urllib3

Expand All @@ -15,9 +16,10 @@
SendPushRequest,
SendSMSRequest,
)
from customerio.__version__ import __version__ as ClientVersion
from tests.server import HTTPSTestCase

ClientVersion = version("customerio")

# test uses a self signed certificate so disable the warning messages
urllib3.disable_warnings()

Expand Down