diff --git a/.circleci/config.yml b/.circleci/config.yml index 9be528c..79f86c1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,10 +4,14 @@ workflows: workflow: jobs: - test_python_34 + - test_old_pythons: + matrix: + parameters: + python_version: ["2.7", "3.5", "3.6", "3.7"] - test: matrix: parameters: - python_version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] + python_version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] - test_pypy: matrix: parameters: @@ -27,7 +31,7 @@ jobs: docker: - image: circleci/python:3.4 - test: + test_old_pythons: parameters: python_version: type: string @@ -39,6 +43,21 @@ jobs: docker: - image: cimg/python:<> + test: + parameters: + python_version: + type: string + steps: + - checkout + - run: + name: Test + # setuptools dropped support for being a test runner in v72.0.0 + command: | + pip install --force-reinstall 'setuptools==71.1.0' + python setup.py test + docker: + - image: cimg/python:<> + test_pypy: parameters: python_version: @@ -67,7 +86,7 @@ jobs: . venv/bin/activate rst-lint --encoding=utf-8 README.rst docker: - - image: cimg/python:3.12 + - image: cimg/python:3.13 clang-format: working_directory: ~/code @@ -91,4 +110,4 @@ jobs: fi done docker: - - image: cimg/python:3.12 + - image: cimg/python:3.13 diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index c450546..5e61705 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/setup-python@v5 name: Install Python with: - python-version: "3.12" + python-version: "3.13" - run: | pip install packaging @@ -109,7 +109,7 @@ jobs: - uses: actions/setup-python@v5 name: Install Python with: - python-version: "3.12" + python-version: "3.13" - name: Get build tool run: pip install --upgrade build diff --git a/CHANGELOG.md b/CHANGELOG.md index ead2135..a111056 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ * Add support for aarch64 wheels. Thank you @bbayles! * Add wheels for PyPy 3.10 +* Added Python 3.13 support # 2.x.x diff --git a/README.rst b/README.rst index f95544a..bc7454c 100644 --- a/README.rst +++ b/README.rst @@ -14,7 +14,7 @@ ciso8601 ``ciso8601`` converts `ISO 8601`_ or `RFC 3339`_ date time strings into Python datetime objects. Since it's written as a C module, it is much faster than other Python libraries. -Tested with cPython 2.7, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11, 3.12. +Tested with cPython 2.7, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11, 3.12, 3.13. .. _ISO 8601: https://en.wikipedia.org/wiki/ISO_8601 .. _RFC 3339: https://tools.ietf.org/html/rfc3339 diff --git a/benchmarking/Dockerfile b/benchmarking/Dockerfile index 614eb0b..21179f8 100644 --- a/benchmarking/Dockerfile +++ b/benchmarking/Dockerfile @@ -13,16 +13,16 @@ RUN apt-get install -y git curl gcc build-essential RUN DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata # Install the Python versions -RUN apt install -y python2 python2-dev && \ - apt install -y python3.7 python3.7-dev python3.7-venv && \ +RUN apt install -y python3.7 python3.7-dev python3.7-venv && \ apt install -y python3.8 python3.8-dev python3.8-venv && \ apt install -y python3.9 python3.9-dev python3.9-venv && \ apt install -y python3.10 python3.10-dev python3.10-venv && \ apt install -y python3.11 python3.11-dev python3.11-venv && \ - apt install -y python3.12 python3.12-dev python3.12-venv + apt install -y python3.12 python3.12-dev python3.12-venv && \ + apt install -y python3.13 python3.13-dev python3.13-venv -# Make Python 3.12 the default `python` -RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.12 10 +# Make Python 3.13 the default `python` +RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.13 10 # Get pip RUN python -m ensurepip --upgrade @@ -41,4 +41,4 @@ RUN git clone https://github.com/closeio/ciso8601.git && \ chmod +x /ciso8601/benchmarking/run_benchmarks.sh WORKDIR /ciso8601/benchmarking -ENTRYPOINT ./run_benchmarks.sh +ENTRYPOINT ["bash", "./run_benchmarks.sh"] diff --git a/benchmarking/perform_comparison.py b/benchmarking/perform_comparison.py index 8b595c3..d4b9ede 100644 --- a/benchmarking/perform_comparison.py +++ b/benchmarking/perform_comparison.py @@ -168,7 +168,7 @@ def run_tests(timestamp, results_directory, compare_to): auto_range_count_filepath = os.path.join(results_directory, "auto_range_counts.csv") test_interation_counts = auto_range_counts(auto_range_count_filepath) - exec(ISO_8601_MODULES[compare_to][0]) + exec(ISO_8601_MODULES[compare_to][0], globals()) expected_parse_result = eval(ISO_8601_MODULES[compare_to][1].format(timestamp=timestamp)) results = [] @@ -178,7 +178,7 @@ def run_tests(timestamp, results_directory, compare_to): time_taken = None exception = None try: - exec(setup) + exec(setup, globals()) parse_result = eval(stmt.format(timestamp=timestamp)) timer = timeit.Timer(stmt=stmt.format(timestamp=timestamp), setup=setup) diff --git a/benchmarking/tox.ini b/benchmarking/tox.ini index 327eed7..e54854a 100644 --- a/benchmarking/tox.ini +++ b/benchmarking/tox.ini @@ -1,7 +1,7 @@ [tox] requires = tox>=4 -envlist = py312,py311,py310,py39,py38,py37 +envlist = py313,py312,py311,py310,py39,py38,py37 setupdir=.. [testenv] diff --git a/setup.py b/setup.py index 76fd6f9..11fac43 100644 --- a/setup.py +++ b/setup.py @@ -74,6 +74,7 @@ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Topic :: Software Development :: Libraries :: Python Modules", ], )