summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
...
* bpo-41939: always enable test_site.test_license_exists_at_url (GH-22688)Ned Deily2020-10-141-2/+0
|
* [doc] Fix typo in the graphlib docs (GH-22661)linchiwei1232020-10-121-3/+4
| | | Automerge-Triggered-By: @pablogsal
* bpo-41739: Fix test_logging.test_race_between_set_target_and_flush() (GH-22655)Victor Stinner2020-10-111-8/+13
| | | | | | The test now waits until all threads complete to avoid leaking running threads. Also, use regular threads rather than daemon threads.
* bpo-38605: bump the magic number for 'annotations' future (#22630)Batuhan Taskaya2020-10-101-1/+2
|
* bpo-39481: Fix duplicate SimpleQueue type in test_genericalias.py (GH-22619)Saiyang Gou2020-10-091-2/+2
| | | | | There are two different `SimpleQueue` types imported (from `multiprocessing.queues` and `queue`) in `Lib/test/test_genericalias.py`, the second one shadowing the first one, making the first one not actually tested. Fix by using different names. Automerge-Triggered-By: @gvanrossum
* bpo-41831: Restore str implementation of __str__ in tkinter.EventType (GH-22355)Serhiy Storchaka2020-10-091-3/+2
|
* bpo-41831: Add tests for tkinter.Event.__repr__ (GH-22354)Serhiy Storchaka2020-10-091-0/+48
|
* bpo-41974: Remove complex.__float__, complex.__floordiv__, etc (GH-22593)Serhiy Storchaka2020-10-091-10/+52
| | | | | | Remove complex special methods __int__, __float__, __floordiv__, __mod__, __divmod__, __rfloordiv__, __rmod__ and __rdivmod__ which always raised a TypeError.
* bpo-41979: Accept star-unpacking on with-item targets (GH-22611)Batuhan Taskaya2020-10-091-1/+7
| | | Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-39337: Add a test case for normalizing of codec names (GH-19069)Hai Shi2020-10-081-0/+25
|
* bpo-41976: Fix the fallback to gcc of ctypes.util.find_library when using ↵Pablo Galindo2020-10-082-7/+35
| | | | gcc>9 (GH-22598)
* bpo-41306: Allow scale value to not be rounded (GH-21715)E-Paine2020-10-081-1/+2
| | | | | | | This fixes the test failure with Tk 6.8.10 which is caused by changes to how Tk rounds the `from`, `to` and `tickinterval` arguments. This PR uses `noconv` if the patchlevel is greater than or equal to 8.6.10 (credit to Serhiy for this idea as it is much simpler than what I previously proposed). Going into more detail for those who want it, the Tk change was made in [commit 591f68c](https://github.com/tcltk/tk/commit/591f68cb382525b72664c6fecaab87742b6cc87a) and means that the arguments listed above are rounded relative to the value of `from`. However, when rounding the `from` argument ([line 623](https://github.com/tcltk/tk/blob/591f68cb382525b72664c6fecaab87742b6cc87a/generic/tkScale.c#L623)), it is rounded relative to itself (i.e. rounding `0`) and therefore the assigned value for `from` is always what is given (no matter what values of `from` and `resolution`). Automerge-Triggered-By: @pablogsal
* bpo-41970: Avoid test failure in test_lib2to3 if the module is already ↵Pablo Galindo2020-10-081-1/+2
| | | | | | | imported (GH-22595) … Automerge-Triggered-By: @pablogsal
* Revert "bpo-26680: Incorporate is_integer in all built-in and standard ↵Raymond Hettinger2020-10-078-138/+1
| | | | | library numeric types (GH-6121)" (GH-22584) This reverts commit 58a7da9e125422323f79c4ee95ac5549989d8162.
* bpo-41923: PEP 613: Add TypeAlias to typing module (#22532)Mikhail Golubev2020-10-072-0/+56
| | | | | This special marker annotation is intended to help in distinguishing proper PEP 484-compliant type aliases from regular top-level variable assignments.
* bpo-38605: Make 'from __future__ import annotations' the default (GH-20434)Batuhan Taskaya2020-10-0621-256/+378
| | | | | The hard part was making all the tests pass; there are some subtle issues here, because apparently the future import wasn't tested very thoroughly in previous Python versions. For example, `inspect.signature()` returned type objects normally (except for forward references), but strings with the future import. We changed it to try and return type objects by calling `typing.get_type_hints()`, but fall back on returning strings if that function fails (which it may do if there are future references in the annotations that require passing in a specific namespace to resolve).
* bpo-41905: Add abc.update_abstractmethods() (GH-22485)Ben Avrahami2020-10-064-0/+227
| | | | This function recomputes `cls.__abstractmethods__`. Also update `@dataclass` to use it.
* bpo-41944: No longer call eval() on content received via HTTP in the ↵Florian Bruhin2020-10-061-1/+2
| | | | | | | | | | | UnicodeNames tests (GH-22575) Similarly to GH-22566, those tests called eval() on content received via HTTP in test_named_sequences_full. This likely isn't exploitable because unicodedata.lookup(seqname) is called before self.checkletter(seqname, None) - thus any string which isn't a valid unicode character name wouldn't ever reach the checkletter method. Still, it's probably better to be safe than sorry.
* bpo-41944: No longer call eval() on content received via HTTP in the CJK ↵Serhiy Storchaka2020-10-061-14/+8
| | | | codec tests (GH-22566)
* Python 3.10.0a1v3.10.0a1Pablo Galindo2020-10-051-524/+610
|
* bpo-41939: Fix test_site.test_license_exists_at_url() (#22559)Victor Stinner2020-10-051-0/+2
| | | | Call urllib.request.urlcleanup() to reset the global urllib.request._opener.
* bpo-41909: Enable previously disabled recursion checks. (GH-22536)Serhiy Storchaka2020-10-041-0/+10
| | | | | | | | | | | Enable recursion checks which were disabled when get __bases__ of non-type objects in issubclass() and isinstance() and when intern strings. It fixes a stack overflow when getting __bases__ leads to infinite recursion. Originally recursion checks was disabled for PyDict_GetItem() which silences all errors including the one raised in case of detected recursion and can return incorrect result. But now the code uses PyDict_GetItemWithError() and PyDict_SetDefault() instead.
* bpo-41490: Bump vendored pip to version 20.2.3 (#22527)Pablo Galindo2020-10-042-17/+14
|
* Delete extra 'the' from `Formatter` class docstring (GH-22530)Hansraj Das2020-10-041-1/+1
|
* bpo-41887: omit leading spaces/tabs on ast.literal_eval (#22469)Batuhan Taskaya2020-10-042-1/+7
| | | Also document that eval() does this (the same way).
* bpo-41840: Report module-level globals as both local and global in the ↵Pablo Galindo2020-10-032-9/+28
| | | | symtable module (GH-22391)
* bpo-40564: Avoid copying state from extant ZipFile. (GH-22371)Jason R. Coombs2020-10-032-6/+50
| | | bpo-40564: Avoid copying state from extant ZipFile.
* bpo-41826: Fix compiler warnings in test_peg_generator (GH-22455)Pablo Galindo2020-10-031-16/+17
| | | Co-authored-by: Skip Montanaro
* bpo-41867: List options for timespec in docstrings of isoformat methods ↵Ram Rachum2020-10-031-2/+4
| | | | (GH-22418)
* bpo-40833: Clarify Path.rename doc-string regarding relative paths (GH-20554)Ram Rachum2020-10-031-5/+14
|
* bpo-41900: C14N 2.0 serialisation failed for unprefixed attributes when a ↵scoder2020-10-032-0/+13
| | | | default namespace was defined. (GH-22474)
* Typo fix - "mesasge" should be "message" (GH-22498)Hansraj Das2020-10-021-2/+2
| | | * Correct at 2 places in email module
* bpo-26680: Incorporate is_integer in all built-in and standard library ↵Robert Smallshire2020-10-018-1/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | numeric types (GH-6121) * bpo-26680: Adds support for int.is_integer() for compatibility with float.is_integer(). The int.is_integer() method always returns True. * bpo-26680: Adds a test to ensure that False.is_integer() and True.is_integer() are always True. * bpo-26680: Adds Real.is_integer() with a trivial implementation using conversion to int. This default implementation is intended to reduce the workload for subclass implementers. It is not robust in the presence of infinities or NaNs and may have suboptimal performance for other types. * bpo-26680: Adds Rational.is_integer which returns True if the denominator is one. This implementation assumes the Rational is represented in it's lowest form, as required by the class docstring. * bpo-26680: Adds Integral.is_integer which always returns True. * bpo-26680: Adds tests for Fraction.is_integer called as an instance method. The tests for the Rational abstract base class use an unbound method to sidestep the inability to directly instantiate Rational. These tests check that everything works correct as an instance method. * bpo-26680: Updates documentation for Real.is_integer and built-ins int and float. The call x.is_integer() is now listed in the table of operations which apply to all numeric types except complex, with a reference to the full documentation for Real.is_integer(). Mention of is_integer() has been removed from the section 'Additional Methods on Float'. The documentation for Real.is_integer() describes its purpose, and mentions that it should be overridden for performance reasons, or to handle special values like NaN. * bpo-26680: Adds Decimal.is_integer to the Python and C implementations. The C implementation of Decimal already implements and uses mpd_isinteger internally, we just expose the existing function to Python. The Python implementation uses internal conversion to integer using to_integral_value(). In both cases, the corresponding context methods are also implemented. Tests and documentation are included. * bpo-26680: Updates the ACKS file. * bpo-26680: NEWS entries for int, the numeric ABCs and Decimal. Co-authored-by: Robert Smallshire <rob@sixty-north.com>
* bpo-41670: Remove outdated predict macro invocation. (GH-22026)Mark Shannon2020-09-291-0/+17
| | | Remove PREDICTion of POP_BLOCK from FOR_ITER.
* bpo-41773: Raise exception for non-finite weights in random.choices(). ↵Ram Rachum2020-09-292-1/+19
| | | | (GH-22441)
* bpo-41873: Add vectorcall for float() (GH-22432)Dennis Sweeney2020-09-291-0/+3
|
* bpo-41842: Add codecs.unregister() function (GH-22360)Hai Shi2020-09-281-0/+12
| | | | Add codecs.unregister() and PyCodec_Unregister() functions to unregister a codec search function.
* bpo-40105: ZipFile truncate in append mode with shorter comment (GH-19337)Jan Mazur2020-09-282-0/+5
|
* Revert "Fix all Python Cookbook links (#22205)" (GH-22424)Andre Delfino2020-09-273-3/+3
| | | This commit reverts commit ac0333e1e117b7f61ed7ef1dbcdb6e515ada603b as the original links are working again and they provide extended features such as comments and alternative versions.
* Fix logging error message (GH-22410)Eric Larson2020-09-252-14/+22
| | | | | Same changes as #22276 squashed to a single commit. Just hoping to get Travis to cooperate by opening a new PR... Automerge-Triggered-By: @vsajip
* bpo-39934: Account for control blocks in 'except' in compiler. (GH-22395)Mark Shannon2020-09-251-0/+9
| | | * Account for control blocks in 'except' in compiler. Fixes #39934.
* bpo-41775: Make 'IDLE Shell' the shell title (#22399)Terry Jan Reedy2020-09-242-1/+3
| | | 'Python Shell' may have contributed to some beginners confusing 'IDLE' with ' Python'.
* bpo-41833: threading.Thread now uses the target name (GH-22357)Victor Stinner2020-09-232-8/+46
|
* bpo-30155: Add macros to get tzinfo from datetime instances (GH-21633)Zackery Spytz2020-09-231-4/+10
| | | | Add PyDateTime_DATE_GET_TZINFO() and PyDateTime_TIME_GET_TZINFO() macros.
* bpo-41841: Prepare IDLE News for 3.10 (GH-22379)Terry Jan Reedy2020-09-231-2/+7
|
* bpo-41816: `StrEnum.__str__` is `str.__str__` (GH-22362)Ethan Furman2020-09-222-0/+33
| | | use `str.__str__` for `StrEnum` so that `str(StrEnum.member)` is the same as directly accessing the string value of the `StrEnum` member
* bpo-35764: Rewrite the IDLE Calltips doc section (GH-22363)Terry Jan Reedy2020-09-222-20/+25
|
* bpo-41810: Reintroduce `types.EllipsisType`, `.NoneType` & ↵Bas van Beek2020-09-222-0/+13
| | | | | `.NotImplementedType` (GH-22336) closes issue 41810
* bpo-41602: raise SIGINT exit code on KeyboardInterrupt from ↵Thomas Grainger2020-09-221-7/+87
| | | | | pymain_run_module (#21956) Closes bpo issue 41602
* bpo-41817: use new StrEnum to ensure all members are strings (GH-22348)Ethan Furman2020-09-221-7/+7
| | | * use new StrEnum to ensure all members are strings