summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Revert "bpo-26680: Incorporate is_integer in all built-in and standard ↵Raymond Hettinger2020-10-0716-223/+24
| | | | | library numeric types (GH-6121)" (GH-22584) This reverts commit 58a7da9e125422323f79c4ee95ac5549989d8162.
* bpo-41923: PEP 613: Add TypeAlias to typing module (#22532)Mikhail Golubev2020-10-076-2/+94
| | | | | This special marker annotation is intended to help in distinguishing proper PEP 484-compliant type aliases from regular top-level variable assignments.
* Fix comment about PyObject_IsTrue. (GH-22343)Stefan Pochmann2020-10-071-1/+1
| | | The `for` statement doesn't use a condition and this function, the `while` statement does.
* bpo-38605: Make 'from __future__ import annotations' the default (GH-20434)Batuhan Taskaya2020-10-0627-300/+404
| | | | | 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-067-5/+256
| | | | 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-062-14/+9
| | | | codec tests (GH-22566)
* Post 3.10.0a1Pablo Galindo2020-10-051-1/+1
|
* Python 3.10.0a1v3.10.0a1Pablo Galindo2020-10-05353-1177/+4132
|
* bpo-41584: clarify when the reflected method of a binary arithemtic operator ↵Brett Cannon2020-10-051-7/+8
| | | | is called (#22505)
* bpo-41939: Fix test_site.test_license_exists_at_url() (#22559)Victor Stinner2020-10-052-0/+5
| | | | Call urllib.request.urlcleanup() to reset the global urllib.request._opener.
* bpo-41774: Tweak new programming FAQ entry (GH-22562)Terry Jan Reedy2020-10-051-1/+1
| | | Remove mention of space in "remove multiple items from list".
* bpo-41936. Remove macros Py_ALLOW_RECURSION/Py_END_ALLOW_RECURSION (GH-22552)Serhiy Storchaka2020-10-056-14/+8
|
* bpo-41557: Update macOS installer to use SQLite 3.33.0 (GH-21959)Erlend Egeberg Aasland2020-10-052-3/+4
| | | https://sqlite.org/releaselog/3_33_0.html
* bpo-41428: Documentation for PEP 604 (gh-22517)Fidget-Spinner2020-10-056-0/+156
|
* bpo-41892: Clarify that an example in the ElementTree docs explicitly avoids ↵scoder2020-10-041-0/+6
| | | | modifying an XML tree while iterating over it. (GH-22464)
* bpo-41909: Enable previously disabled recursion checks. (GH-22536)Serhiy Storchaka2020-10-044-4/+12
| | | | | | | | | | | 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.
* Typo fix (GH-22496)Manan Kumar Garg2020-10-041-5/+5
| | | | | Multiple typo fixes in code comments Automerge-Triggered-By: @Mariatta
* 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-41898: add caveat on root logger seeing all messages in assertLogs doc ↵Irit Katriel2020-10-041-1/+2
| | | | (GH-22526)
* bpo-41887: omit leading spaces/tabs on ast.literal_eval (#22469)Batuhan Taskaya2020-10-045-2/+16
| | | Also document that eval() does this (the same way).
* [doc] Use list[int] instead of List[int] (etc.) in a few more places (GH-22524)Andre Delfino2020-10-032-8/+8
| | | | | This changes a few occurrences left behind by #22340. Automerge-Triggered-By: @gvanrossum
* bpo-41840: Report module-level globals as both local and global in the ↵Pablo Galindo2020-10-033-9/+31
| | | | symtable module (GH-22391)
* bpo-41922: Use PEP 590 vectorcall to speed up reversed() (GH-22523)Dong-hee Na2020-10-032-0/+21
|
* [doc] Fix link to abc.collections.Iterable (GH-22520)Andre Delfino2020-10-031-2/+2
| | | | | Missed this occurrence before, sorry. Also changed "the PEP" to "PEP". Automerge-Triggered-By: @gvanrossum
* bpo-40564: Avoid copying state from extant ZipFile. (GH-22371)Jason R. Coombs2020-10-033-6/+51
| | | 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-032-6/+12
| | | | (GH-22418)
* bpo-40833: Clarify Path.rename doc-string regarding relative paths (GH-20554)Ram Rachum2020-10-032-5/+22
|
* bpo-41900: C14N 2.0 serialisation failed for unprefixed attributes when a ↵scoder2020-10-033-0/+15
| | | | default namespace was defined. (GH-22474)
* [doc] Fix link to abc.collections.Iterable (GH-22502)Andre Delfino2020-10-021-1/+1
| | | Automerge-Triggered-By: @gvanrossum
* Fix is_typeddict markup (#22501)Andre Delfino2020-10-021-5/+6
|
* Typo fix - "mesasge" should be "message" (GH-22498)Hansraj Das2020-10-021-2/+2
| | | * Correct at 2 places in email module
* bpo-41802: Document 'PyDict_DelItem' can raise a 'KeyError' (GH-22291)Campbell Barton2020-10-021-4/+6
|
* bpo-41692: Deprecate PyUnicode_InternImmortal() (GH-22486)Victor Stinner2020-10-024-1/+24
| | | | The PyUnicode_InternImmortal() function is now deprecated and will be removed in Python 3.12: use PyUnicode_InternInPlace() instead.
* Update link to supporting references (GH-22488)Raymond Hettinger2020-10-021-1/+1
|
* [doc] Update references to NumPy (GH-22458)Andre Delfino2020-10-014-8/+5
| | | Numeric(al) Python to NumPy. It seems the old name hasn't been used for some time.
* bpo-21955: Change my nickname in BINARY_ADD comment (GH-22481)Victor Stinner2020-10-011-1/+1
|
* bpo-26680: Incorporate is_integer in all built-in and standard library ↵Robert Smallshire2020-10-0119-24/+230
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-41861: Convert _sqlite3 CursorType and ConnectionType to heap types ↵Erlend Egeberg Aasland2020-10-016-102/+74
| | | | (GH-22478)
* bpo-41861: Convert _sqlite3 RowType and StatementType to heap types (GH-22444)Erlend Egeberg Aasland2020-10-019-118/+71
|
* bpo-41870: Avoid the test when nargs=0 (GH-22462)Dong-hee Na2020-10-011-3/+3
|
* Fix grammar in secrets module documentation (GH-22467)Max Smolens2020-09-301-1/+1
| | | From `In particularly,` to `In particular,`
* bpo-41670: Remove outdated predict macro invocation. (GH-22026)Mark Shannon2020-09-293-2/+21
| | | Remove PREDICTion of POP_BLOCK from FOR_ITER.
* bpo-41774: Add programming FAQ entry (GH-22402)Terry Jan Reedy2020-09-292-0/+17
| | | | | In the "Sequences (Tuples/Lists)" section, add "How do you remove multiple items from a list".
* bpo-41773: Raise exception for non-finite weights in random.choices(). ↵Ram Rachum2020-09-294-3/+23
| | | | (GH-22441)
* bpo-41873: Add vectorcall for float() (GH-22432)Dennis Sweeney2020-09-293-0/+23
|
* bpo-41861: Convert _sqlite3 PrepareProtocolType to heap type (GH-22428)Erlend Egeberg Aasland2020-09-285-54/+33
|
* bpo-41842: Add codecs.unregister() function (GH-22360)Hai Shi2020-09-2811-5/+108
| | | | Add codecs.unregister() and PyCodec_Unregister() functions to unregister a codec search function.