https://github.com/python/cpython
Revision ad6d162e518963711d24c80f1b7d6079bd437584 authored by Alex Waygood on 19 October 2021, 20:30:27 UTC, committed by GitHub on 19 October 2021, 20:30:27 UTC
In Python 3.8 and 3.9, stacking `@functools.singledispatchmethod` on top of `@classmethod` or `@staticmethod` caused an exception to be raised if the method was registered using type-annotations rather than `@method.register(int)`. This was not caught by unit tests, however, as the tests only tested the `@method.register(int)` way of registering additional implementations. The bug is no longer present in Python 3.10+, but `test_functools.py` is still lacking regression tests for these cases. This commit adds these test cases.
1 parent f4b1244
Tip revision: ad6d162e518963711d24c80f1b7d6079bd437584 authored by Alex Waygood on 19 October 2021, 20:30:27 UTC
bpo-39679: Add tests for classmethod/staticmethod singledispatchmethods (GH-29034)
bpo-39679: Add tests for classmethod/staticmethod singledispatchmethods (GH-29034)
Tip revision: ad6d162
File | Mode | Size |
---|---|---|
.azure-pipelines | ||
.github | ||
Doc | ||
Grammar | ||
Include | ||
Lib | ||
Mac | ||
Misc | ||
Modules | ||
Objects | ||
PC | ||
PCbuild | ||
Parser | ||
Programs | ||
Python | ||
Tools | ||
.editorconfig | -rw-r--r-- | 181 bytes |
.gitattributes | -rw-r--r-- | 2.1 KB |
.gitignore | -rw-r--r-- | 2.1 KB |
.travis.yml | -rw-r--r-- | 6.5 KB |
CODE_OF_CONDUCT.md | -rw-r--r-- | 630 bytes |
LICENSE | -rw-r--r-- | 13.6 KB |
Makefile.pre.in | -rw-r--r-- | 76.0 KB |
README.rst | -rw-r--r-- | 9.9 KB |
aclocal.m4 | -rw-r--r-- | 22.3 KB |
config.guess | -rwxr-xr-x | 48.3 KB |
config.sub | -rwxr-xr-x | 33.6 KB |
configure | -rwxr-xr-x | 513.4 KB |
configure.ac | -rw-r--r-- | 174.6 KB |
install-sh | -rwxr-xr-x | 15.0 KB |
netlify.toml | -rw-r--r-- | 82 bytes |
pyconfig.h.in | -rw-r--r-- | 45.0 KB |
setup.py | -rw-r--r-- | 114.7 KB |
Computing file changes ...