diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 101238c..086c2ad 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -88,7 +88,7 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up Python 3.12 + - name: Set up Python uses: actions/setup-python@v5 with: python-version: "3.12" @@ -126,7 +126,6 @@ jobs: matrix: os: [macos-latest, windows-latest] python-version: - - "2.7" - "3.8" - "3.9" - "3.10" @@ -135,11 +134,6 @@ jobs: - "3.13" - "3.14-dev" - exclude: - # fails due to lack of a compatible compiler - - os: windows-latest - python-version: 2.7 - runs-on: ${{ matrix.os }} env: @@ -150,7 +144,6 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 - if: startsWith(matrix.python-version, '3.') with: python-version: ${{ matrix.python-version }} diff --git a/README.rst b/README.rst index ed73579..ac9a373 100644 --- a/README.rst +++ b/README.rst @@ -57,7 +57,7 @@ code slips in accidentally. How fast is it? --------------- -Here are some timings for Python 2.7 for the following scenarios: +Here are some timings for the following scenarios: 1) five acquire-release cycles ('lock_unlock') 2) five acquire calls followed by five release calls (nested locking, 'reentrant_lock_unlock') @@ -71,59 +71,7 @@ substantially slower for both locks and the benchmark includes the thread creation time, so I only looped 1000x here to get useful timings instead of 100000x for the single threaded case. -:: - - Testing _RLock (2.7.18) - - sequential (x100000): - lock_unlock : 853.55 msec - reentrant_lock_unlock : 684.52 msec - mixed_lock_unlock : 758.27 msec - lock_unlock_nonblocking : 860.40 msec - context_manager : 2876.00 msec - - threaded 10T (x1000): - lock_unlock : 2210.69 msec - reentrant_lock_unlock : 1864.38 msec - mixed_lock_unlock : 1963.10 msec - lock_unlock_nonblocking : 3709.91 msec - context_manager : 2640.32 msec - - Testing FastRLock (0.8.1) - - sequential (x100000): - lock_unlock : 139.76 msec - reentrant_lock_unlock : 137.56 msec - mixed_lock_unlock : 140.75 msec - lock_unlock_nonblocking : 164.64 msec - context_manager : 593.06 msec - - threaded 10T (x1000): - lock_unlock : 1621.13 msec - reentrant_lock_unlock : 1807.09 msec - mixed_lock_unlock : 1834.21 msec - lock_unlock_nonblocking : 1642.06 msec - context_manager : 1730.29 msec - - Testing Cython interface of FastRLock (0.8.1) - - sequential (x100000): - lock_unlock : 19.14 msec - reentrant_lock_unlock : 19.12 msec - mixed_lock_unlock : 16.81 msec - lock_unlock_nonblocking : 14.49 msec - - threaded 10T (x1000): - lock_unlock : 1511.85 msec - reentrant_lock_unlock : 1541.96 msec - mixed_lock_unlock : 1585.70 msec - lock_unlock_nonblocking : 1585.35 msec - - -How does it compare to Python 3.7 and later? --------------------------------------------- - -The results here are more mixed. Depending on the optimisation of the CPython +The results here are mixed. Depending on the optimisation of the CPython installation, it can be faster, about the same speed, or somewhat slower. In any case, the direct Cython interface is always faster than going through the Python API, because it avoids the Python call overhead and executes diff --git a/setup.py b/setup.py index 1ed6475..9e02d8c 100644 --- a/setup.py +++ b/setup.py @@ -94,14 +94,13 @@ def read_file(filename): 'Intended Audience :: Information Technology', 'License :: OSI Approved :: MIT License', 'Programming Language :: Cython', - 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 3', 'Operating System :: OS Independent', 'Topic :: Software Development', ], packages=[PKGNAME], - package_data={PKGNAME: ['*.pxd', '*.pxi']}, + package_data={PKGNAME: ['*.pyx', '*.pxd', '*.pxi']}, ext_modules=ext_modules, zip_safe=False, diff --git a/tox.ini b/tox.ini index b1cd63e..0cc3ea1 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py{27,37,38,39,310,311,312,313} +envlist = py{37,38,39,310,311,312,313} [testenv] platform =