Skip to content

Commit

Permalink
Merge pull request #86 from Pylons/add-py313
Browse files Browse the repository at this point in the history
add new python versions and drop old ones
  • Loading branch information
mmerickel authored Nov 14, 2024
2 parents 9e4c800 + 57bc602 commit 51ba53b
Show file tree
Hide file tree
Showing 7 changed files with 76 additions and 27 deletions.
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Set update schedule for GitHub Actions

version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every weekday
interval: "daily"
64 changes: 46 additions & 18 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,45 +15,73 @@ jobs:
strategy:
matrix:
py:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "pypy-3.8"
- "3.11"
- "3.12"
- "3.13"
- "pypy-3.9"
- "pypy-3.10"
os:
- "ubuntu-latest"
- "ubuntu-22.04"
- "windows-latest"
- "macos-latest"
- "macos-13" # x64
- "macos-14" # arm64
architecture:
- x64
- x86

- arm64
include:
- py: "pypy-3.9"
toxenv: "pypy39"
- py: "pypy-3.10"
toxenv: "pypy310"
exclude:
# Linux and macOS don't have x86 python
- os: "ubuntu-latest"
architecture: x86
- os: "macos-latest"
architecture: x86

# Ubuntu does not have arm64 releases
- os: "ubuntu-22.04"
architecture: arm64
# MacOS we need to make sure to remove x86 on all
# We need to run no arm64 on macos-13 (Intel), but some
# Python versions: 3.9/3.10
#
# From 3.11 onward, there is support for running x64 and
# arm64 on Apple Silicon based systems (macos-14)
- os: "macos-13"
architecture: arm64
- os: "macos-14"
architecture: x64
py: "3.9"
- os: "macos-14"
architecture: x64
py: "3.10"
# Windows does not have arm64 releases
- os: "windows-latest"
architecture: arm64
name: "Python: ${{ matrix.py }}-${{ matrix.architecture }} on ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.py }}
architecture: ${{ matrix.architecture }}
- run: pip install tox
- name: Running tox
- name: Running tox with specific toxenv
if: ${{ matrix.toxenv != '' }}
env:
TOXENV: ${{ matrix.toxenv }}
run: tox
- name: Running tox for current python version
if: ${{ matrix.toxenv == '' }}
run: tox -e py

coverage:
runs-on: ubuntu-latest
name: Validate coverage
steps:
- uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: "3.10"
architecture: x64
Expand All @@ -65,7 +93,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: "3.10"
architecture: x64
Expand All @@ -77,7 +105,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: "3.10"
architecture: x64
Expand Down
4 changes: 4 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ Changes
Unreleased (2022-11-14)
^^^^^^^^^^^^^^^^^^^^^^^

- Drop support for Python 3.7, and 3.8.

- Add support for Python 3.11, 3.12, and 3.13.

- rename "master" to "main"

2.5 (2022-03-12)
Expand Down
6 changes: 4 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
``pyramid_tm``
==============

.. image:: https://github.com/Pylons/pyramid_tm/workflows/Build%20and%20test/badge.svg
:target: https://github.com/Pylons/pyramid_tm/actions?query=workflow%3A%22Build+and+test%22
.. image:: https://github.com/Pylons/pyramid_tm/actions/workflows/ci-tests.yml/badge.svg?branch=main
:target: https://github.com/Pylons/pyramid_tm/actions/workflows/ci-tests.yml?query=branch%3Amain
:alt: main CI Status


.. image:: https://readthedocs.org/projects/pyramid-tm/badge/?version=latest
:target: https://docs.pylonsproject.org/projects/pyramid-tm/en/latest/
Expand Down
7 changes: 4 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ classifiers =
Intended Audience :: Developers
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Programming Language :: Python :: 3.13
Programming Language :: Python :: Implementation :: CPython
Programming Language :: Python :: Implementation :: PyPy
Operating System :: OS Independent
Expand All @@ -36,7 +37,7 @@ package_dir=
=src
packages = find:
include_package_data = True
python_requires = >=3.7
python_requires = >=3.9
install_requires =
pyramid >= 1.5
transaction >= 2.0
Expand Down
4 changes: 4 additions & 0 deletions tests/test_it.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ class Conflict(TransientError):
def handler(request, count=count):
raise Conflict

self.txn.retryable = True
self.assertRaises(Conflict, self._callFUT, handler=handler)

def test_handler_isdoomed(self):
Expand Down Expand Up @@ -747,6 +748,9 @@ def __init__(self, doomed=False, retryable=False, finish_with_exc=None):
self.active = False
self.finish_with_exc = finish_with_exc

def isRetryableError(self, exc):
return self._retryable(type(exc), exc)

def _retryable(self, t, v):
if self.active:
return self.retryable
Expand Down
8 changes: 4 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[tox]
envlist =
lint,
py37,py38,py39,py310,pypy3,
py37-pyramid15,py37-pyramid110,
py310-pyramid20,
py39,py310,py311,py312,py313,pypy3,
py39-pyramid15,py39-pyramid110,
py313-pyramid20,
docs,
coverage
isolated_build = True
Expand Down Expand Up @@ -61,7 +61,7 @@ deps =
flake8-bugbear

[testenv:docs]
whitelist_externals = make
allowlist_externals = make
commands =
make -C docs html epub BUILDDIR={envdir}
extras =
Expand Down

0 comments on commit 51ba53b

Please sign in to comment.