Skip to content

Commit

Permalink
Merge branch 'release/1.17.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamDumpleton committed Nov 22, 2024
2 parents 5c0997c + 9f4ce79 commit e663d49
Show file tree
Hide file tree
Showing 15 changed files with 731 additions and 284 deletions.
162 changes: 65 additions & 97 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,12 @@ jobs:
os:
- ubuntu-20.04
python-version:
# - 2.7
# - 3.5
- 3.6
- 3.7
- 3.8
- 3.9
- "3.10"
- 3.11
- 3.12
# - pypy-2.7
- 3.13
- pypy-3.8
- pypy-3.9
- pypy-3.10
Expand All @@ -49,6 +45,34 @@ jobs:
name: coverage
path: .coverage.*

test_linux_no_gil:
name: Test - NO GIL (${{ matrix.os }}, ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
matrix:
os:
- ubuntu-20.04
python-version: [3.13]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Python ${{ matrix.python-version }}
uses: deadsnakes/[email protected]
with:
python-version: ${{ matrix.python-version }}
nogil: true
- name: Update pip
run: python -m pip install -U pip wheel setuptools
- name: Install tox
run: python -m pip install "tox<4.0.0" "tox-gh-actions<3.0.0"
- name: Test with tox
run: python -m tox
- name: Store partial coverage reports
uses: actions/upload-artifact@v3
with:
name: coverage
path: .coverage.*

# test_aarch64_linux:
# name: Test (${{ matrix.python.os }}, ${{ matrix.python.python-version }}, aarch64)
# runs-on: ${{ matrix.python.os }}
Expand Down Expand Up @@ -91,16 +115,12 @@ jobs:
os:
- macos-latest
python-version:
# - 2.7
# - 3.5
- 3.6
- 3.7
- 3.8
- 3.9
- "3.10"
- 3.11
- 3.12
# - pypy-2.7
- 3.13
- pypy-3.8
- pypy-3.9
- pypy-3.10
Expand All @@ -123,29 +143,6 @@ jobs:
name: coverage
path: .coverage.*

# test_windows_py27:
# name: Test (${{ matrix.os }}, ${{ matrix.python-version }})
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# os:
# - windows-latest
# python-version:
# - 2.7
# steps:
# - name: Checkout code
# uses: actions/checkout@v3
# - name: Setup Python ${{ matrix.python-version }}
# uses: actions/setup-python@v4
# with:
# python-version: ${{ matrix.python-version }}
# - name: Update pip
# run: python -m pip install -U pip wheel setuptools
# - name: Install tox
# run: python -m pip install "tox<4.0.0" "tox-gh-actions<3.0.0"
# - name: Test with tox
# run: python -m tox -e py27,py27-without-extensions

test_windows:
name: Test (${{ matrix.os }}, ${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
Expand All @@ -154,15 +151,12 @@ jobs:
os:
- windows-latest
python-version:
# - 3.5
- 3.6
- 3.7
- 3.8
- 3.9
- "3.10"
- 3.11
- 3.12
# - pypy-2.7
- 3.13
- pypy-3.8
- pypy-3.9
- pypy-3.10
Expand Down Expand Up @@ -208,40 +202,13 @@ jobs:
name: dist
path: dist/*

# bdist_wheel_legacy:
# name: Build wheels (2.7-3.5) on ${{ matrix.os }}
# needs:
# - test_linux
# - test_macos
# - test_windows_py27
# - test_windows
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# os: [ubuntu-20.04, windows-latest, macos-latest]
# steps:
# - uses: actions/checkout@v3
# - name: Build wheels
# uses: pypa/[email protected]
# with:
# output-dir: dist
# env:
# WRAPT_INSTALL_EXTENSIONS: true
# CIBW_BUILD: cp27* cp35*
# CIBW_SKIP: cp27-win*
# CIBW_BUILD_VERBOSITY: 1
# - uses: actions/upload-artifact@v3
# with:
# name: dist
# path: dist/*.whl

bdist_wheel:
name: Build wheels (3.6+) on ${{ matrix.os }} for ${{ matrix.arch }}
name: Build wheels (3.8+) on ${{ matrix.os }} for ${{ matrix.arch }}
needs:
- test_linux
- test_linux_no_gil
#- test_aarch64_linux
- test_macos
# - test_windows_py27
- test_windows
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -259,46 +226,47 @@ jobs:
if: ${{ matrix.arch == 'aarch64' }}
uses: docker/setup-qemu-action@v2
- name: Build wheels
uses: pypa/cibuildwheel@v2.16.2
uses: pypa/cibuildwheel@v2.21.3
with:
output-dir: dist
env:
WRAPT_INSTALL_EXTENSIONS: true
CIBW_SKIP: pp*
CIBW_BUILD_VERBOSITY: 1
CIBW_ARCHS: ${{ matrix.arch }}
CIBW_FREE_THREADED_SUPPORT: 1
- uses: actions/upload-artifact@v3
with:
name: dist
path: dist/*.whl

coveralls:
name: Generate code coverage report
if: ${{ false }} # disable for now
needs:
- test_linux
- test_macos
# - test_windows_py27
- test_windows
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install coverage package
run: python -m pip install -U coverage
- name: Download partial coverage reports
uses: actions/download-artifact@v3
with:
name: coverage
- name: Combine coverage
run: python -m coverage combine
- name: Report coverage
run: python -m coverage report
- name: Export coverage to XML
run: python -m coverage xml
- name: Upload coverage statistics to Coveralls
uses: AndreMiras/coveralls-python-action@develop
# coveralls:
# name: Generate code coverage report
# if: ${{ false }} # disable for now
# needs:
# - test_linux
# - test_linux_no_gil
# - test_macos
# - test_windows
# runs-on: ubuntu-20.04
# steps:
# - name: Checkout code
# uses: actions/checkout@v3
# - name: Setup Python 3.9
# uses: actions/setup-python@v4
# with:
# python-version: 3.9
# - name: Install coverage package
# run: python -m pip install -U coverage
# - name: Download partial coverage reports
# uses: actions/download-artifact@v3
# with:
# name: coverage
# - name: Combine coverage
# run: python -m coverage combine
# - name: Report coverage
# run: python -m coverage report
# - name: Export coverage to XML
# run: python -m coverage xml
# - name: Upload coverage statistics to Coveralls
# uses: AndreMiras/coveralls-python-action@develop
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*.py[cod]
venv

# C extensions
*.so
Expand Down
7 changes: 1 addition & 6 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
wrapt
=====

|Docs| |PyPI|
|PyPI|

The aim of the **wrapt** module is to provide a transparent object proxy
for Python, which can be used as the basis for the construction of function
Expand Down Expand Up @@ -137,8 +137,3 @@ and unit tests, can be obtained from github.

.. |PyPI| image:: https://img.shields.io/pypi/v/wrapt.svg?logo=python&cacheSeconds=3600
:target: https://pypi.python.org/pypi/wrapt

.. |Docs| image:: https://readthedocs.org/projects/docs/badge/?version=latest
:alt: Documentation Status
:scale: 100%
:target: https://wrapt.readthedocs.io/en/latest/?badge=latest
33 changes: 33 additions & 0 deletions docs/changes.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,39 @@
Release Notes
=============

Version 1.17.0
--------------

Note that version 1.17.0 drops support for Python 3.6 and 3.7. Python version
3.8 or later is required.

**New Features**

* Add `__format__()` method to `ObjectProxy` class to allow formatting of
wrapped object.

* Added C extension internal flag to indicate that `wrapt` should be safe for
Python 3.13 free threading mode. Releases will include free threading variants
of Python wheels. Note that as free threading is new, one should be cautious
about using it in production until it has been more widely tested.

**Bugs Fixed**

* When a normal function or builtin function which had `wrapt.decorator` or a
function wrapper applied, was assigned as a class attribute, and the function
attribute called via the class or an instance of the class, an additional
argument was being passed, inserted as the first argument, which was the class
or instance. This was not the correct behaviour and the class or instance
should not have been passed as the first argument.

* When an instance of a callable class object was wrapped which didn't not have
a `__get__()` method for binding, and it was called in context whhere binding
would be attempted, it would fail with error that `__get__()` did not exist
when instead it should have been called directly, ignoring that binding was
not possible.

* The `__round__` hook for the object proxy didn't accept `ndigits` argument.

Version 1.16.0
--------------

Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@
# built documents.
#
# The short X.Y version.
version = '1.16'
version = '1.17'
# The full version, including alpha/beta/rc tags.
release = '1.16.0'
release = '1.17.0'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
16 changes: 8 additions & 8 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[metadata]
name = wrapt
version = attr: wrapt.__version__
readme = "README.rst"
author = Graham Dumpleton
author_email = [email protected]
url = https://github.com/GrahamDumpleton/wrapt
Expand All @@ -17,13 +18,12 @@ classifiers =
Development Status :: 5 - Production/Stable
License :: OSI Approved :: BSD License
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
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
project_urls =
Expand All @@ -33,7 +33,7 @@ project_urls =

[options]
zip_safe = false
python_requires = >= 3.6
python_requires = >= 3.8
packages = find:
package_dir =
=src
Expand Down Expand Up @@ -70,19 +70,19 @@ norecursedirs = .tox venv

[tox:tox]
envlist =
py{36,37,38,39,310,311,312}
py{36,37,38,39,310,311,312}-{without,install,disable}-extensions,
py{38,39,310,311,312,313,314}
py{38,39,310,311,312,313,314}-{without,install,disable}-extensions,
pypy-without-extensions

[gh-actions]
python =
3.6: py36, py36-without-extensions, py36-install-extensions, py36-disable-extensions
3.7: py37, py37-without-extensions, py37-install-extensions, py37-disable-extensions
3.8: py38, py38-without-extensions, py38-install-extensions, py38-disable-extensions
3.9: py39, py39-without-extensions, py39-install-extensions, py39-disable-extensions
3.10: py310, py310-without-extensions, py310-install-extensions, py310-disable-extensions
3.11: py311, py311-without-extensions, py311-install-extensions, py311-disable-extensions
3.12: py312, py312-without-extensions, py312-install-extensions, py312-disable-extensions
3.13: py313, py313-without-extensions, py313-install-extensions, py313-disable-extensions
3.14: py314, py314-without-extensions, py314-install-extensions, py314-disable-extensions
pypy-3.8: pypy-without-extensions
pypy-3.9: pypy-without-extensions
pypy-3.10: pypy-without-extensions
Expand All @@ -92,7 +92,7 @@ deps =
coverage
pytest
install_command =
py311,py311-{without,install,disable}-extensions: python -m pip install --no-binary coverage {opts} {packages}
python -m pip install --no-binary coverage {opts} {packages}
commands =
python -m coverage run --rcfile {toxinidir}/setup.cfg -m pytest -v {posargs} {toxinidir}/tests
setenv =
Expand Down
2 changes: 1 addition & 1 deletion src/wrapt/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version_info__ = ('1', '16', '0')
__version_info__ = ('1', '17', '0')
__version__ = '.'.join(__version_info__)

from .__wrapt__ import (ObjectProxy, CallableObjectProxy, FunctionWrapper,
Expand Down
Loading

0 comments on commit e663d49

Please sign in to comment.