summaryrefslogtreecommitdiffstats
path: root/Misc
Commit message (Collapse)AuthorAgeFilesLines
* Python 3.9.0v3.9.0Łukasz Langa2020-10-057-9/+57
|
* bpo-37062: Enum: add extended AutoNumber example (GH-22349) (GH-22370)Miss Islington (bot)2020-10-041-0/+1
| | | | | (cherry picked from commit 62e40d8450b9c78346ec3617de7fe3f0ad381510) Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
* [3.9] bpo-41602: raise SIGINT exit code on KeyboardInterrupt from ↵Łukasz Langa2020-10-041-0/+1
| | | | | | | | pymain_run_module (GH-21956) (#22397) Closes bpo issue 41602. (cherry picked from commit a68a2ad19c891faa891904b3da537911cc77df21) Co-authored-by: Thomas Grainger <tagrain@gmail.com>
* bpo-41815: SQLite: segfault if backup called on closed database (GH-22322)Miss Islington (bot)2020-10-041-0/+2
| | | | | | | | | | | | | | | | GH- [bpo-41815](): SQLite: fix segfault if backup called on closed database Attempting to backup a closed database will trigger segfault: ```python import sqlite3 target = sqlite3.connect(':memory:') source = sqlite3.connect(':memory:') source.close() source.backup(target) ``` (cherry picked from commit bfee9fad84531a471fd7864e88947320669f68e2) Co-authored-by: Peter McCormick <peter@pdmccormick.com>
* bpo-41875: Use __builtin_unreachable when possible (GH-22433)Miss Islington (bot)2020-10-041-0/+2
| | | | | (cherry picked from commit 24ba3b0df5e5f2f237d7b23b4017ba12f16320ae) Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
* [3.9] Remove duplicated words words (GH-20413). (GH-22296)Serhiy Storchaka2020-10-042-2/+2
| | | | (cherry picked from commit 1c5d1d7304a119040fd3118128bdb412f0cce6a6)
* Merge tag 'v3.9.0rc2' into 3.9Łukasz Langa2020-09-1737-62/+360
|\ | | | | | | Python 3.9.0rc2
| * Python 3.9.0rc2v3.9.0rc2Łukasz Langa2020-09-1637-62/+360
| |
* | bpo-41662: Fix bugs in binding parameters in sqlite3 (GH-21998)Miss Islington (bot)2020-09-172-0/+3
| | | | | | | | | | | | | | | | | | * When the parameters argument is a list, correctly handle the case of changing it during iteration. * When the parameters argument is a custom sequence, no longer override an exception raised in ``__len__()``. (cherry picked from commit 0b419b791077414bbc011a412698ebb362b63761) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* | [3.9] bpo-39728: Enum: fix duplicate `ValueError` (GH-22277) (GH-22282)Ethan Furman2020-09-172-0/+2
|/ | | | | | | fix default `_missing_` to return `None` instead of raising a `ValueError` Co-authored-by: Andrey Darascheka <andrei.daraschenka@leverx.com> (cherry picked from commit c95ad7a91fbd7636f33a098d3b39964ab083bf49) Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
* bpo-41517: do not allow Enums to be extended (GH-22271)Miss Islington (bot)2020-09-161-0/+1
| | | | | | fix bug that let Enums be extended via multiple inheritance (cherry picked from commit 3064dbf5df1021e85b507366a7ea448c8895efe7) Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
* [3.9] bpo-41687: Fix sendfile implementation to work with Solaris (GH-22040) ↵Łukasz Langa2020-09-161-0/+1
| | | | | | | (GH-22273) (cherry picked from commit 8c0be6fd9101746235b63ddfb84106d1e9ca286b) Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
* [3.9] bpo-41789: honor object overrides in Enum classes (GH-22250) (GH-22272)Ethan Furman2020-09-161-0/+2
| | | EnumMeta double-checks that `__repr__`, `__str__`, `__format__`, and `__reduce_ex__` are not the same as `object`'s, and replaces them if they are -- even if that replacement was intentionally done in the Enum being constructed. This patch fixes that.
* bpo-39587: Enum - use correct mixed-in data type (GH-22263) (GH-22266)Miss Islington (bot)2020-09-151-0/+1
| | | (cherry picked from commit bff01f3a3aac0c15fe8fbe8b2f561f7927d117a1)
* bpo-41780: Fix __dir__ of types.GenericAlias (GH-22262)Miss Islington (bot)2020-09-151-0/+2
| | | | | | Automerge-Triggered-By: @gvanrossum (cherry picked from commit 2e87774df1a0eaf2a1fe8cc4d958df60f7125b6e) Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
* [3.9] bpo-41631: _ast module uses again a global state (GH-21961) (GH-22258)Pablo Galindo2020-09-151-0/+5
| | | | | | | | | | | | | | | | | | | | Partially revert commit ac46eb4ad6662cf6d771b20d8963658b2186c48c: "bpo-38113: Update the Python-ast.c generator to PEP384 (gh-15957)". Using a module state per module instance is causing subtle practical problems. For example, the Mercurial project replaces the __import__() function to implement lazy import, whereas Python expected that "import _ast" always return a fully initialized _ast module. Add _PyAST_Fini() to clear the state at exit. The _ast module has no state (set _astmodule.m_size to 0). Remove astmodule_traverse(), astmodule_clear() and astmodule_free() functions.. (cherry picked from commit e5fbe0cbd4be99ced5f000ad382208ad2a561c90) Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-39651: Fix asyncio proactor _write_to_self() (GH-22197)Miss Islington (bot)2020-09-121-0/+3
| | | | | | | | Fix a race condition in the call_soon_threadsafe() method of asyncio.ProactorEventLoop: do nothing if the self-pipe socket has been closed. (cherry picked from commit 1b0f0e3d7d03155da1cf9769a847874d559e57e3) Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-41731: Make test_cmd_line_script pass with -vv (GH-22206)Miss Islington (bot)2020-09-121-0/+1
| | | | | | | Argument script_exec_args is usually an absolute file name, but twice has form ['-m', 'module_name']. (cherry picked from commit 7e711ead26fea6465e0ef2e3b8880b57ba8fc129) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-37149: Change Shipman tkinter link from archive.org to TkDocs (GH-22188)Miss Islington (bot)2020-09-101-0/+1
| | | | | | The new link responds much faster and begins with a short explanation of the status of the doc. (cherry picked from commit 06d0b8b67e8aebd8fe4c34e97d6915c11f4afa30) Co-authored-by: Mark Roseman <mark@markroseman.com>
* Fix incorrect bpo number in change notes. (GH-22151) (#22174)Miss Islington (bot)2020-09-091-1/+1
|
* bpo-41525: Make the Python program help ASCII-only (GH-21836)Miss Islington (bot)2020-09-092-1/+2
| | | | | (cherry picked from commit 58de1dd6a8677bd213802c19204b827cb7134695) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-41720: Add "return NotImplemented" in turtle.Vec2D.__rmul__(). (GH-22092)Miss Islington (bot)2020-09-071-0/+2
| | | | | (cherry picked from commit fd4cafd4700dc03cb05fc2e5263c2666d785d6e3) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-41531: Fix compilation of dict literals with more than 0xFFFF elements ↵Miss Islington (bot)2020-09-041-0/+2
| | | | | | | (GH-21850) (GH-22107) (cherry picked from commit c51db0ea40ddabaf5f771ea633b37fcf4c90a495) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-29590: fix stack trace for gen.throw() with yield from (GH-19896)Miss Islington (bot)2020-09-041-0/+2
| | | | | | | | | | | * Add failing test. * bpo-29590: fix stack trace for gen.throw() with yield from (GH-NNNN) When gen.throw() is called on a generator after a "yield from", the intermediate stack trace entries are lost. This commit fixes that. (cherry picked from commit 8b33961e4bc4020d8b2d5b949ad9d5c669300e89) Co-authored-by: Chris Jerdonek <chris.jerdonek@gmail.com>
* closes bpo-41533: Fix a potential memory leak when allocating a stack (GH-21847)Miss Islington (bot)2020-09-041-0/+2
| | | | | | | Free the stack allocated in va_build_stack if do_mkstack fails and the stack is not a small_stack (cherry picked from commit 75c80b0bda89debf312f075716b8c467d411f90e) Co-authored-by: Tony Solomonik <tony.solomonik@gmail.com>
* bpo-41696: Fix handling of debug mode in asyncio.run (GH-22069) (#22071)Miss Islington (bot)2020-09-031-0/+1
| | | | | | | | | | | | | | | | * bpo-41696: Fix handling of debug mode in asyncio.run This allows PYTHONASYNCIODEBUG or -X dev to enable asyncio debug mode when using asyncio.run * 📜🤖 Added by blurb_it. Co-authored-by: hauntsaninja <> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> (cherry picked from commit 0770ad948cb6d9f7f6c4002efd83e27c27069808) Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
* bpo-39010: Fix errors logged on proactor loop restart (GH-22017) (#22034)Miss Islington (bot)2020-09-031-0/+2
| | | | | | | | | | | Stopping and restarting a proactor event loop on windows can lead to spurious errors logged (ConnectionResetError while reading from the self pipe). This fixes the issue by ensuring that we don't attempt to start multiple copies of the self-pipe reading loop. (cherry picked from commit ea5a6363c3f8cc90b7c0cc573922b10f296073b6) Co-authored-by: Ben Darnell <ben@bendarnell.com> Co-authored-by: Ben Darnell <ben@bendarnell.com>
* bpo-39883: Use BSD0 license for code in docs (GH-17635) (GH-22073)Miss Islington (bot)2020-09-031-0/+1
| | | | | | | The PSF board approved this use. (cherry picked from commit e223d06a8b2067c68e9f97c4628c2b0f056dcae6) Co-authored-by: Todd <toddrjen@gmail.com>
* [3.9] bpo-41690: Use a loop to collect args in the parser instead of ↵Pablo Galindo2020-09-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | | recursion (GH-22053) (GH-22067) This program can segfault the parser by stack overflow: ``` import ast code = "f(" + ",".join(['a' for _ in range(100000)]) + ")" print("Ready!") ast.parse(code) ``` the reason is that the rule for arguments has a simple recursion when collecting args: args[expr_ty]: [...] | a=named_expression b=[',' c=args { c }] { [...] }. (cherry picked from commit 4a97b1517a6b5ff22e2984b677a680b07ff0ce11) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* [3.9] bpo-41654: Fix deallocator of MemoryError to account for subclasses ↵Pablo Galindo2020-09-011-0/+2
| | | | | | | | | | | | (GH-22020) (GH-22045) When allocating MemoryError classes, there is some logic to use pre-allocated instances in a freelist only if the type that is being allocated is not a subclass of MemoryError. Unfortunately in the destructor this logic is not present so the freelist is altered even with subclasses of MemoryError.. (cherry picked from commit 9b648a95ccb4c3b14f1e87158f5c9f5dbb2f62c0) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-41617: Fix pycore_byteswap.h to support clang 3.0 (GH-22042) (GH-22044)Victor Stinner2020-09-011-0/+2
| | | | | __builtin_bswap16() is not available in LLVM clang 3.0. (cherry picked from commit e6905e4c82cc05897dc1bf5ab2b5b94b2b043a7f)
* bpo-41681: Fix for `f-string/str.format` error description when using 2 `,` ↵Miss Islington (bot)2020-09-011-0/+2
| | | | | | | | | | | | in format specifier (GH-22036) (GH-22041) * Fixed `f-string/str.format` error description when using two `,` in format specifier. Co-authored-by: millefalcon <hanish0019@hmail.com> (cherry picked from commit 0d6aa7f0ee38eb453bc8f73bf4830e6172be2f35) Co-authored-by: han-solo <hanish0019@gmail.com> Co-authored-by: han-solo <hanish0019@gmail.com>
* bpo-41344: Raise ValueError when creating shared memory of size 0 (GH-21556) ↵Miss Islington (bot)2020-08-301-0/+1
| | | | | | | | | (GH-22018) (cherry picked from commit 475a5fbb5644ea200c990d85d8c264e78ab6c7ea) Co-authored-by: Vinay Sharma <vinay04sharma@icloud.com> Co-authored-by: Vinay Sharma <vinay04sharma@icloud.com>
* bpo-41524: fix pointer bug in PyOS_mystr{n}icmp (GH-21845) (GH-21978)Miss Islington (bot)2020-08-301-0/+2
|
* [3.9] bpo-41624: fix documentation of typing.Coroutine (GH-21952) (#21982)Karthikeyan Singaravelan2020-08-281-0/+1
| | | | | | | (cherry picked from commit 8c58d2a) Co-authored-by: MingZhe Hu <humingzhework@163.com> Co-authored-by: MingZhe Hu <humingzhework@163.com>
* bpo-41609: Fix output of pdb's whatis command for instance methods ↵Miss Islington (bot)2020-08-271-0/+1
| | | | | | | (GH-21935) (#21977) (cherry picked from commit 022bc7572f061e1d1132a4db9d085b29707701e7) Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
* bpo-33660: Fix PosixPath to resolve a relative path on root (#21974)Miss Islington (bot)2020-08-271-0/+2
| | | | | (cherry picked from commit 94ad6c674f7687ef22853cb8d42b440d6b42ddc8) Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
* bpo-37658: Fix asyncio.wait_for() to respect waited task status (GH-21894) ↵Miss Islington (bot)2020-08-261-0/+2
| | | | | | | | | | | (GH-21964) Currently, if `asyncio.wait_for()` itself is cancelled it will always raise `CancelledError` regardless if the underlying task is still running. This is similar to a race with the timeout, which is handled already. (cherry picked from commit a2118a14627256197bddcf4fcecad4c264c1e39d) Co-authored-by: Elvis Pranskevichus <elvis@magic.io>
* bpo-32751: Wait for task cancel in asyncio.wait_for() when timeout <= 0 ↵Miss Islington (bot)2020-08-261-0/+3
| | | | | | | | | | | (GH-21895) (GH-21963) When I was fixing bpo-32751 back in GH-7216 I missed the case when *timeout* is zero or negative. This takes care of that. Props to @aaliddell for noticing the inconsistency. (cherry picked from commit c517fc712105c8e5930cb42baaebdbe37fc3e15f) Co-authored-by: Elvis Pranskevichus <elvis@magic.io>
* [3.9] bpo-40204: Allow pre-Sphinx 3 syntax in the doc (GH-21844) (GH-21901)Victor Stinner2020-08-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bpo-40204: Allow pre-Sphinx 3 syntax in the doc (GH-21844) Enable Sphinx 3.2 "c_allow_pre_v3" option and disable the c_warn_on_allowed_pre_v3 option to make the documentation compatible with Sphinx 2 and Sphinx 3. (cherry picked from commit 423e77d6de497931585d1883805a9e3fa4096b0b) * bpo-40204: Fix Sphinx sytanx in howto/instrumentation.rst (GH-21858) Use generic '.. object::' to declare markers, rather than abusing '.. c:function::' which fails on Sphinx 3. (cherry picked from commit 43577c01a2ab49122db696e9eaec6cb31d11cc81) * bpo-40204: Fix duplicates in the documentation (GH-21857) Fix two Sphinx 3 issues: Doc/c-api/buffer.rst:304: WARNING: Duplicate C declaration, also defined in 'c-api/buffer'. Declaration is 'PyBUF_ND'. Doc/c-api/unicode.rst:1603: WARNING: Duplicate C declaration, also defined in 'c-api/unicode'. Declaration is 'PyObject* PyUnicode_Translate(PyObject *str, PyObject *table, const char *errors)'. (cherry picked from commit 46d10b1237c67ff8347f533eda6a5468d098f7eb) * bpo-40204: Add :noindex: in the documentation (GH-21859) Add :noindex: to duplicated documentation to fix "duplicate object description" errors. For example, fix this Sphinx 3 issue: Doc/library/configparser.rst:1146: WARNING: duplicate object description of configparser.ConfigParser.optionxform, other instance in library/configparser, use :noindex: for one of them (cherry picked from commit d3ded080482beae578faa704b13534a62d066f9f) * bpo-40204, doc: Fix syntax of C variables (GH-21846) For example, fix the following Sphinx 3 errors: Doc/c-api/buffer.rst:102: WARNING: Error in declarator or parameters Invalid C declaration: Expected identifier in nested name. [error at 5] void \*obj -----^ Doc/c-api/arg.rst:130: WARNING: Unparseable C cross-reference: 'PyObject*' Invalid C declaration: Expected end of definition. [error at 8] PyObject* --------^ The modified documentation is compatible with Sphinx 2 and Sphinx 3. (cherry picked from commit 474652fe9346382dbf793f20b671eb74668bebde) * bpo-40204: Fix reference to terms in the doc (GH-21865) Sphinx 3 requires to refer to terms with the exact case. For example, fix the Sphinx 3 warning: Doc/library/pkgutil.rst:71: WARNING: term Loader not found in case sensitive match.made a reference to loader instead. (cherry picked from commit bb0b08540cc93e56f3f1bde1b39ce086d9e35fe1) * bpo-40204: Fix duplicated productionlist names in the doc (GH-21900) Sphinx 3 disallows having more than one productionlist markup with the same name. Simply remove names in this case, since names are not shown anyway. For example, fix the Sphinx 3 warning: Doc/reference/introduction.rst:96: duplicate token description of *:name, other instance in reference/expressions (cherry picked from commit 1abeda80f760134b4233608e2c288790f955b95a)
* bpo-40782: Change asyncio.AbstractEventLoop.run_in_executor to be a method ↵Miss Islington (bot)2020-08-171-0/+1
| | | | | | | | | not a coroutine (GH-21852) asyncio.AbstractEventLoop.run_in_executor should be a method that returns an asyncio Future, not an async method. This matches the concrete implementations, and the documentation better. (cherry picked from commit 29f84294d88ec493c2de9d6e8dbc12fae3778771) Co-authored-by: James Weaver <james.barrett@bbc.co.uk>
* [3.9] bpo-41503: Fix race between setTarget and flush in ↵Miss Islington (bot)2020-08-161-0/+1
| | | | | | | | | | logging.handlers.MemoryHandler (GH-21765) (GH-21897) (cherry picked from commit 2353d77fad7ed9d11d8a4d66b5dd1306cdb94125) Co-authored-by: Irit Katriel <iritkatriel@yahoo.com> Automerge-Triggered-By: @vsajip
* bpo-31122: ssl.wrap_socket() now raises ssl.SSLEOFError rather than OSError ↵Miss Islington (bot)2020-08-151-0/+1
| | | | | | | | | | when peer closes connection during TLS negotiation (GH-18772) [bpo-31122](): ssl.wrap_socket() now raises ssl.SSLEOFError rather than OSError when peer closes connection during TLS negotiation Reproducer: http://tiny.cc/f4ztnz (tiny url because some bot keeps renaming b.p.o.-nnn as bpo links) (cherry picked from commit 495bd035662fda29639f9d52bb6baebea31d72fa) Co-authored-by: Dima Tisnek <dimaqq@gmail.com>
* bpo-41025: Fix subclassing for zoneinfo.ZoneInfo (GH-20965) (GH-21876)Miss Islington (bot)2020-08-141-0/+2
| | | | | | | | | | | Prior to this change, attempting to subclass the C implementation of zoneinfo.ZoneInfo gave the following error: TypeError: unbound method ZoneInfo.__init_subclass__() needs an argument https://bugs.python.org/issue41025 (cherry picked from commit 87d8287865e5c9f137f6b5cf8c34c2c509eb5e9d) Co-authored-by: Paul Ganssle <paul@ganssle.io>
* bpo-41526: Fixed layout of final page of the installer (GH-21871)Miss Islington (bot)2020-08-131-0/+2
| | | | | (cherry picked from commit 6444ca946984c638c67a72aac22fd6d3cc650c16) Co-authored-by: Steve Dower <steve.dower@python.org>
* [3.9] bpo-41520: Fix second codeop regression (GH-21848)Terry Jan Reedy2020-08-131-1/+1
| | | | | | Fix the repression introduced by the initial regression fix. (cherry picked from commit c818b15fa59039de67022c29085d439fa5d3ef95) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* [3.9] bpo-40979: refactored typing.rst; (mostly) same content, new ↵Guido van Rossum2020-08-121-0/+1
| | | | | | | | | sub-sections and ordering (GH-21574) (#21843) Also added PEP 585 deprecation notes. (cherry picked from commit ab72fdeb82) Co-authored-by: Luciano Ramalho <luciano@ramalho.org>
* bpo-41520: codeop no longer ignores SyntaxWarning (GH-21838)Miss Islington (bot)2020-08-121-0/+1
| | | | | (cherry picked from commit 369a1cbdee14d9f27356fb3a8bb21e4fde289d25) Co-authored-by: Victor Stinner <vstinner@python.org>
* Python 3.9.0rc1v3.9.0rc1Łukasz Langa2020-08-1121-28/+187
|
* bpo-41468: Improve and test IDLE run error exit (GH-21798)Miss Islington (bot)2020-08-091-0/+1
| | | | | | A message box pops up when an unexpected error stops the run process. Tell users it is likely a random glitch, but report it if not. (cherry picked from commit f2e161c27964a59bc5ab20d96f87ba5862c6222d) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>