Repository navigation
Comparing changes
Open a pull request
base repository: GrahamDumpleton/wrapt
base: 2.2.0
head repository: GrahamDumpleton/wrapt
compare: 2.2.1
- 13 commits
- 7 files changed
- 2 contributors
Commits on May 21, 2026
-
Configuration menu - View commit details
-
Copy full SHA for 4306cdd - Browse repository at this point
Copy the full SHA 4306cddView commit details -
Document deriving from ObjectProxy alongside an ABCMeta-based class.
Adds a known-issues entry covering the TypeError raised by ObjectProxy.__subclasscheck__ when ObjectProxy is mixed in as a base class alongside an abstract base class such as Hashable or any other ABCMeta-based class. Explains the cause, why the runtime inheritance is typically redundant for the type-checker-driven cases where this is attempted, and recommends typing.Protocol at the annotation site or a TYPE_CHECKING-guarded class declaration as the appropriate alternatives.
Configuration menu - View commit details
-
Copy full SHA for 8799b4b - Browse repository at this point
Copy the full SHA 8799b4bView commit details
Commits on May 22, 2026
-
Add API reference page describing the public API contract.
Documents that only names re-exported from the top-level wrapt module are public, lists each entry in __all__ with a brief description and links into the rest of the docs, explains why type hints require importing from wrapt, and covers the C extension fallback behaviour along with the WRAPT_DISABLE_EXTENSIONS and WRAPT_INSTALL_EXTENSIONS environment variables.
Configuration menu - View commit details
-
Copy full SHA for b0a7650 - Browse repository at this point
Copy the full SHA b0a7650View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0dbbba1 - Browse repository at this point
Copy the full SHA 0dbbba1View commit details -
Configuration menu - View commit details
-
Copy full SHA for f8d4a2e - Browse repository at this point
Copy the full SHA f8d4a2eView commit details -
Revert Py_None substitution in C FunctionWrapper.__get__.
The change in 2.2.0 which substituted Py_None for NULL before invoking the wrapped descriptor's tp_descr_get slot was based on a misreading of what the pure Python path does once it crosses back into C. The pure Python path calls __get__ from Python and CPython's slot wrapper converts Py_None back to NULL before the wrapped descriptor's tp_descr_get is invoked, so the pre 2.2.0 C path which passed obj through unchanged was already producing the matching value. Substituting Py_None directly bypassed that conversion and caused native CPython descriptors which fast path on NULL to fall through to a type check against the owner type and raise TypeError. Move the Py_None substitution back to where it was, right before constructing the BoundFunctionWrapper, so the wrapped descriptor sees the obj value unchanged. Add a regression test which wraps a native descriptor and exercises class attribute access, covering the gap which allowed the regression through.
Configuration menu - View commit details
-
Copy full SHA for 0583a12 - Browse repository at this point
Copy the full SHA 0583a12View commit details -
Merge pull request #341 from brettlangdon/brettlangdon/descriptor.tests
Add test coverage for native descriptors
Configuration menu - View commit details
-
Copy full SHA for daddcfe - Browse repository at this point
Copy the full SHA daddcfeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 00541d5 - Browse repository at this point
Copy the full SHA 00541d5View commit details -
Run descriptor __get__ tests against both implementations.
The descriptor __get__ tests added in PR #341 were marked C extension only, which restricted them to one half of the tox matrix and gave no coverage of the pure Python FunctionWrapper.__get__ code path. The bug they guard against only manifests in the C extension because Python's own __get__ slot wrapper performs the Py_None to NULL conversion before the wrapped descriptor is invoked on the pure Python path, but the behavioural assertions are valid for both implementations and the disable-extensions tox environments are the right mechanism for running the suite against the pure Python wrapper. Drop the @c_extension_only skip decorators so the descriptor tests run under both the C and pure Python wrapper variants of the tox matrix. Drop the explicit TestPurePythonWraptPath cases as well: they were only useful while everything else in the file was C extension only, and the disable extensions runs in tox and just now exercise the pure Python wrapper for every test in the file. Drop the TestNativeDescriptorBinding regression cases from test_function_wrapper.py, since they are a strict subset of the cases now running against both implementations from test_descriptor_get_class_access. Expand the module level docstring and add per class comments to describe what each descriptor type test class covers and why it matters.
Configuration menu - View commit details
-
Copy full SHA for 94bd940 - Browse repository at this point
Copy the full SHA 94bd940View commit details -
Configuration menu - View commit details
-
Copy full SHA for 86f4e0e - Browse repository at this point
Copy the full SHA 86f4e0eView commit details -
Skip CPython specific descriptor tests on PyPy.
PyPy does not ship the ``_pickle`` C module used to obtain a C extension backed slot wrapper, so import of the descriptor tests fails at collection time on PyPy. Beyond the missing module, the native CPython descriptor types exercised here (wrapper_descriptor, method_descriptor, classmethod_descriptor, getset_descriptor, member_descriptor) are CPython implementation details which PyPy does not expose as the same distinct types. The regression these tests guard against is also specific to the wrapt C extension which is not built on PyPy. Detect PyPy via ``platform.python_implementation()`` and skip the test classes covering native CPython descriptors and the two subclass attribute access tests which wrap a native slot wrapper. The Python level descriptor tests (property, classmethod, staticmethod, custom user defined descriptor, plain Python method) continue to run on PyPy. Guard the ``_pickle`` import behind the same flag so the module loads on PyPy in the first place.
Configuration menu - View commit details
-
Copy full SHA for d89dce9 - Browse repository at this point
Copy the full SHA d89dce9View commit details -
Configuration menu - View commit details
-
Copy full SHA for da8f21f - Browse repository at this point
Copy the full SHA da8f21fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 787db02 - Browse repository at this point
Copy the full SHA 787db02View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff 2.2.0...2.2.1