summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_descr.py
Commit message (Collapse)AuthorAgeFilesLines
* [3.12] gh-108416: Mark slow test methods with @requires_resource('cpu') ↵Miss Islington (bot)2023-09-021-0/+1
| | | | | | | | | | | | (GH-108421) (#108798) gh-108416: Mark slow test methods with @requires_resource('cpu') (GH-108421) Only mark tests which spend significant system or user time, by itself or in subprocesses. (cherry picked from commit f3ba0a74cd50274acdcd592d4ce8395b92492b7c) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-102213: Optimize the performance of `__getattr__` (GH-103761)sunmy20192023-05-011-1/+14
| | | | | Co-authored-by: Kirill <80244920+Eclips4@users.noreply.github.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl> Co-authored-by: Xiang Wang <34048878+wangxiang-hz@users.noreply.github.com>
* gh-103272: regression test for getattr exception in property (#103336)sunmy20192023-04-071-0/+13
|
* gh-99430: Remove duplicated tests for old-styled classes (#99432)Nikita Sobolev2022-11-131-5/+1
| | | python 1 & 2 were a loong time ago.
* gh-98783: Fix crashes when `str` subclasses are used in `_PyUnicode_Equal` ↵Nikita Sobolev2022-10-301-0/+19
| | | | (#98806)
* Fix links to old SF bugs (#95648)Serhiy Storchaka2022-08-041-1/+1
|
* gh-93939: Build C extensions without setup.py (GH-94474)Christian Heimes2022-07-141-0/+9
| | | Combines GH-93940, GH-94452, and GH-94433
* gh-84623: Remove unused imports in tests (#93772)Victor Stinner2022-06-131-1/+0
|
* bpo-44712: Replace "type(literal)" with corresponding builtin types (GH-27294)Serhiy Storchaka2022-05-081-3/+3
| | | | I suppose it is a remnants of very old code written when str, int, list, dict, etc were functions and not classes.
* gh-92112: Fix crash triggered by an evil custom `mro()` (#92113)Alexey Izbyshev2022-05-061-0/+17
|
* gh-92063: Enforce types in specialized PRECALL opcodes (GH-92068)Dennis Sweeney2022-04-301-0/+27
| | | | | | | | | * Check the types of PRECALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS * fix PRECALL_NO_KW_METHOD_DESCRIPTOR_NOARGS as well * fix PRECALL_NO_KW_METHOD_DESCRIPTOR_O * fix PRECALL_NO_KW_METHOD_DESCRIPTOR_FAST
* gh-91625: Don't ignore extended args of adaptive opcodes (GH-91626)Dennis Sweeney2022-04-171-2/+16
|
* bpo-46675: Allow object value arrays and split key dictionaries larger than ↵Mark Shannon2022-02-081-1/+1
| | | | 16 (GH-31191)
* bpo-44977: Deprecate delegation of int to __trunc__ (GH-31031)Zackery Spytz2022-02-031-1/+0
| | | | | Calling int(a) when type(a) implements __trunc__ but not __int__ or __index__ now raises a DeprecationWarning.
* bpo-46417: remove_subclass() clears tp_subclasses (GH-30793)Victor Stinner2022-01-221-0/+17
| | | | | | | | | The remove_subclass() function now deletes the dictionary when removing the last subclass (if the dictionary becomes empty) to save memory: set PyTypeObject.tp_subclasses to NULL. remove_subclass() is called when a type is deallocated. _PyType_GetSubclasses() no longer holds a reference to tp_subclasses: its loop cannot modify tp_subclasses.
* bpo-46299: Improve test_descr (GH-30475)Dong-hee Na2022-01-081-26/+10
|
* bpo-46299: improve `test_descr.py` with stricter error handling (GH-30471)Nikita Sobolev2022-01-081-4/+4
|
* bpo-45292: [PEP 654] add the ExceptionGroup and BaseExceptionGroup classes ↵Irit Katriel2021-10-221-1/+5
| | | | (GH-28569)
* bpo-45340: Don't create object dictionaries unless actually needed (GH-28802)Mark Shannon2021-10-131-4/+6
| | | | | | | | | | | | | | * Never change types' cached keys. It could invalidate inline attribute objects. * Lazily create object dictionaries. * Update specialization of LOAD/STORE_ATTR. * Don't update shared keys version for deletion of value. * Update gdb support to handle instance values. * Rename SPLIT_KEYS opcodes to INSTANCE_VALUE.
* Fix typos in the Lib directory (GH-28775)Christian Clauss2021-10-061-1/+1
| | | | | Fix typos in the Lib directory as identified by codespell. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-45229: Remove test_main in many tests (GH-28405)Serhiy Storchaka2021-09-191-9/+5
| | | | | | | | | Instead of explicitly enumerate test classes for run_unittest() use the unittest ability to discover tests. This also makes these tests discoverable and runnable with unittest. load_tests() can be used for dynamic generating tests and adding doctests. setUpModule(), tearDownModule() and addModuleCleanup() can be used for running code before and after all module tests.
* bpo-44655: Include the name of the type in unset __slots__ attribute errors ↵Pablo Galindo Salgado2021-07-161-0/+6
| | | | (GH-27199)
* Fix typos in multiple files (GH-26689)Binbin2021-06-131-1/+1
| | | Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-43908: check_set_special_type_attr() checks Py_TPFLAGS_IMMUTABLETYPE ↵Erlend Egeberg Aasland2021-04-301-2/+4
| | | | | | | | (GH-25743) check_set_special_type_attr() and type_set_annotations() now check for immutable flag (Py_TPFLAGS_IMMUTABLETYPE). Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-43682: @staticmethod inherits attributes (GH-25268)Victor Stinner2021-04-091-5/+13
| | | | | | | | | | Static methods (@staticmethod) and class methods (@classmethod) now inherit the method attributes (__module__, __name__, __qualname__, __doc__, __annotations__) and have a new __wrapped__ attribute. Changes: * Add a repr() method to staticmethod and classmethod types. * Add tests on the @classmethod decorator.
* bpo-38302: __pow__/__rpow__ now called when __ipow__ returns NotImplemented ↵Alex2021-02-261-0/+42
| | | | (#16459)
* bpo-34805: Guarantee that __subclasses__() is in definition order. (GH-23844)Raymond Hettinger2020-12-191-0/+10
|
* bpo-40275: Use new test.support helper submodules in tests (GH-21772)Hai Shi2020-08-071-3/+3
|
* bpo-41295: Reimplement the Carlo Verre "hackcheck" (GH-21528)scoder2020-07-181-0/+36
| | | | | Walk down the MRO backwards to find the type that originally defined the final `tp_setattro`, then make sure we are not jumping over intermediate C-level bases with the Python-level call. Automerge-Triggered-By: @gvanrossum
* bpo-41055: Remove outdated tests for the tp_print slot. (GH-21006)Serhiy Storchaka2020-06-211-7/+0
|
* bpo-35712: Make using NotImplemented in a boolean context issue a ↵MojoVampire2020-03-031-3/+3
| | | | deprecation warning (GH-13195)
* bpo-37645: add new function _PyObject_FunctionStr() (GH-14890)Jeroen Demeyer2019-11-051-1/+1
| | | | | | | | | | | | Additional note: the `method_check_args` function in `Objects/descrobject.c` is written in such a way that it applies to all kinds of descriptors. In particular, a future re-implementation of `wrapper_descriptor` could use that code. CC @vstinner @encukou https://bugs.python.org/issue37645 Automerge-Triggered-By: @encukou
* bpo-37619: update_one_slot() should not ignore wrapper descriptors for wrong ↵Jeroen Demeyer2019-09-101-0/+12
| | | | type (GH-14836)
* Fix typos mostly in comments, docs and test names (GH-15209)Min ho Kim2019-08-301-1/+1
|
* Fix an invalid assertEqual() call in test_descr.py (GH-15318)Zackery Spytz2019-08-261-5/+1
|
* bpo-36922: use Py_TPFLAGS_METHOD_DESCRIPTOR in lookup_maybe_method() (GH-13865)Jeroen Demeyer2019-06-171-0/+2
|
* bpo-37151: simplify classmethoddescr_call (GH-13340)Jeroen Demeyer2019-06-071-2/+2
|
* bpo-26423: Fix possible overflow in wrap_lenfunc() (GH-13606)Zackery Spytz2019-05-281-0/+4
| | | | Fix possible overflow in wrap_lenfunc() when sizeof(long) < sizeof(Py_ssize_t) (e.g., 64-bit Windows).
* bpo-36026: make descr error message consistent (GH-11930)Inada Naoki2019-04-011-2/+29
| | | | set.add(0) and set.add.__get__(0) now raise TypeError with same error message.
* bpo-36433: fix confusing error messages in classmethoddescr_call (GH-12556)Inada Naoki2019-03-261-3/+18
| | | https://bugs.python.org/issue36433
* bpo-30040: new empty dict uses key-sharing dict (GH-1080)Inada Naoki2019-03-121-3/+3
| | | | Sizeof new empty dict becomes 72 bytes from 240 bytes (amd64). It is same size to empty dict created by dict.clear().
* bpo-36109: Fix random test_descr failure. (GH-12044)Serhiy Storchaka2019-02-261-1/+5
|
* bpo-25750: Add test on bad descriptor __get__() (GH-9084)jdemeyer2018-10-191-0/+21
|
* bpo-1617161: Make the hash and equality of methods not depending on the ↵Serhiy Storchaka2018-07-311-25/+58
| | | | | | | | | | | value of self. (GH-7848) * The hash of BuiltinMethodType instances no longer depends on the hash of __self__. It depends now on the hash of id(__self__). * The hash and equality of ModuleType and MethodWrapperType instances no longer depend on the hash and equality of __self__. They depend now on the hash and equality of id(__self__). * MethodWrapperType instances no longer support ordering.
* bpo-31787: Prevent refleaks when calling __init__() more than once (GH-3995)Oren Milman2018-02-131-0/+18
|
* bpo-32379: Faster MRO computation for single inheritance (#4932)Antoine Pitrou2017-12-201-0/+6
| | | | * bpo-32379: Faster MRO computation for single inheritance
* bpo-29914: Fix default implementations of __reduce__ and __reduce_ex__(). (#843)Serhiy Storchaka2017-04-081-1/+14
| | | | object.__reduce__() no longer takes arguments, object.__reduce_ex__() now requires one argument.
* bpo-24329: allow __qualname__ and __classcell__ in __slots__ (GH-495)Xiang Zhang2017-03-081-0/+40
|
* bpo-29695: Fixed tests after removing keyword args support in some basic ↵Serhiy Storchaka2017-03-061-8/+14
| | | | type constructors. (GH-520)
* Merge from 3.6.Serhiy Storchaka2016-12-141-0/+2
|\