summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* bpo-41531: Fix compilation of dict literals with more than 0xFFFF elements ↵Miss Islington (bot)2020-09-043-1/+13
| | | | | | | (GH-21850) (GH-22107) (cherry picked from commit c51db0ea40ddabaf5f771ea633b37fcf4c90a495) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* On path with known exact float, extract the double with the fast macro. ↵Miss Islington (bot)2020-09-041-5/+10
| | | | | | | (GH-21072) (cherry picked from commit 930f4518aea7f3f0f914ce93c3fb92831a7e1d2a) Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
* bpo-29590: fix stack trace for gen.throw() with yield from (GH-19896)Miss Islington (bot)2020-09-043-0/+61
| | | | | | | | | | | * 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-042-0/+5
| | | | | | | 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>
* Fix typo in message from assert statement (GH-21283)Miss Islington (bot)2020-09-041-1/+1
| | | | | | The error message was missing space between the action "acquire" and "_wait_semaphore" which is an attribute for instances of Condition. (cherry picked from commit 99c0ee3c893bb99fd98a97084fc386ce2911eb64) Co-authored-by: Allen <64019758+aboddie@users.noreply.github.com>
* [3.9] bpo-38787: Clarify docs for PyType_GetModule and warn against common ↵Miss Islington (bot)2020-09-041-1/+11
| | | | | | | | | | mistake (GH-20215) (GH-21984) (cherry picked from commit d9a966ae08258da2ce2a432c943d8194760f09c4) Co-authored-by: Petr Viktorin <encukou@gmail.com> Automerge-Triggered-By: @Mariatta
* [3.9] Improve asyncio-dev 'Concurrency and Multithreading' docs (GH-20882) ↵Miss Islington (bot)2020-09-041-0/+10
| | | | | | | | | | | | | (GH-22009) I added some information to the `Concurrency and Multithreading` section of the `Developing with asyncio` guide. This is all information that would have helped me when I started using asyncio. I incorrectly assumed that `loop.call_soon_threadsafe()` and `run_coroutine_threadsafe()` could be called from a thread in a process separate from the one that the event loop is running in. Explicitly stating that this will not work will probably help some people starting out with asyncio in the future. I also added references to some other functions that can be used for inter-process communication without blocking the event loop. The section already mentions running blocking code in a ThreadPoolExecutor, but I think listing these other options in this section will also be helpful. (cherry picked from commit c68c5af2dc5ada8875a662f2beaac6234eae2a5a) Co-authored-by: Roger Iyengar <ri@rogeriyengar.com>
* [3.9] bpo-40486: Specify what happens if directory content change diring ↵Miss Islington (bot)2020-09-043-3/+17
| | | | | | | | iteration (GH-22025) (GH-22093) (cherry picked from commit 306cfb3a37e1438f6ba9f0a9f3af3c00aae4ec64) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.9] Fix error in argparse documentation example (GH-17399) (GH-21992)Miss Islington (bot)2020-09-041-2/+2
| | | | | | | Automerge-Triggered-By: @rhettinger (cherry picked from commit 8784d3300ec4ffc58bc0e9ab3cff9a24187dbe4c) Co-authored-by: SarahPythonista <4283226+SarahPythonista@users.noreply.github.com>
* [3.9] [doc] Fix a typo in the graphlib docs (GH-22030) (GH-22076)Miss Islington (bot)2020-09-041-1/+1
| | | | | | (cherry picked from commit 851606007665dc30089e5e1953208c5428e455b1) Co-authored-by: Mario Šaško <mariosasko777@gmail.com>
* bpo-38585: Remove references to defusedexpat (GH-22095)Miss Islington (bot)2020-09-041-11/+3
| | | | | | defusedexpat is not maintained. (cherry picked from commit 51b84f8e96a441c498210f827c1297ee4973525f) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* bpo-41721: Add xlc options (GH-22097)Miss Islington (bot)2020-09-042-2/+8
| | | | | | (cherry picked from commit 84a7917b4c9afec07575065cffa143b91fe98c14) Authored-by: Stefan Krah <skrah@bytereef.org>
* bpo-41700: Skip test if the locale is not supported (GH-22081) (GH-22085)Miss Islington (bot)2020-09-041-1/+4
| | | | | | | (cherry picked from commit 54a66ade2067c373d31003ad260e1b7d14c81564) Co-authored-by: Dong-hee Na <donghee.na92@gmail.com> Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
* bpo-39010: Improve test shutdown (GH-22066) (#22082)Miss Islington (bot)2020-09-031-3/+11
| | | | | | | | | | | | Simply closing the event loop isn't enough to avoid warnings. If we don't also shut down the event loop's default executor, it sometimes logs a "dangling thread" warning. Follow-up to GH-22017 (cherry picked from commit be435ae2b064dc64f04475bec632862e1dbf605f) Co-authored-by: Ben Darnell <ben@bendarnell.com> Co-authored-by: Ben Darnell <ben@bendarnell.com>
* bpo-41696: Fix handling of debug mode in asyncio.run (GH-22069) (#22071)Miss Islington (bot)2020-09-033-2/+7
| | | | | | | | | | | | | | | | * 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-035-2/+37
| | | | | | | | | | | 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>
* [3.9] Fix 'gather' rules in the python parser generator (GH-22021) (GH-22080)Pablo Galindo2020-09-032-1/+18
| | | | | | | | | Currently, empty sequences in gather rules make the conditional for gather rules fail as empty sequences evaluate as "False". We need to explicitly check for "None" (the failure condition) to avoid false negatives. (cherry picked from commit e55a0e9) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* [3.9] bpo-41697: Correctly handle KeywordOrStarred when parsing arguments in ↵Pablo Galindo2020-09-034-11/+23
| | | | | | | the parser (GH-22077) (GH-22079) (cherry picked from commit 315a61f7a9418d904e0eea14b1f054fac3a90e9f) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-39883: Use BSD0 license for code in docs (GH-17635) (GH-22073)Miss Islington (bot)2020-09-033-0/+60
| | | | | | | 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-025-515/+628
| | | | | | | | | | | | | | | | | | | | | | | 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-39349: Add cancel_futures to Executor.shutdown base class ↵Shantanu2020-09-021-1/+4
| | | | | | (GH-22023) (GH-22048) * Add cancel_futures parameter to the Executor base class, since it was missed in the original PR (https://github.com/python/cpython/pull/18057) that added cancel_futures. (cherry picked from commit 17dc1b7)
* Fix invalid escape sequences in the peg_highlight Sphinx extension ↵Miss Islington (bot)2020-09-021-1/+1
| | | | | | | | | (GH-22047) (GH-22065) (cherry picked from commit 5a4a963a6c798fa9207a9998618a9c0ec3b6b6d7) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com> Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* [doc] Remove references to PyChecker. (GH-22054)Miss Islington (bot)2020-09-022-14/+5
| | | | | (cherry picked from commit dea82b67315a6b873f7d4e558dd00a851137dcbb) Co-authored-by: Andre Delfino <adelfino@gmail.com>
* Remove reference to Boa Constructor. (GH-22056)Miss Islington (bot)2020-09-021-6/+0
| | | | | (cherry picked from commit 1d25f5bf7b795b47e753aca56d7579d4ad7ee468) Co-authored-by: Andre Delfino <adelfino@gmail.com>
* Fixed mistake in test for f-string error description (GH-22036) (GH-22059) ↵Miss Islington (bot)2020-09-022-2/+2
| | | | | | | | | (GH-22060) (cherry picked from commit 749ed85e4446f548e22934931241f644a33d81ce) Co-authored-by: han-solo <hanish0019@gmail.com> Co-authored-by: han-solo <hanish0019@gmail.com>
* Note the buffer slots can be set with PyType_Spec with the unlimited API. ↵Miss Islington (bot)2020-09-021-1/+10
| | | | | | | | (GH-22052) Follow up to f7c4e236429606e1c982cacf24e10fc86ef4462f. (cherry picked from commit 700fa1b836f315048e8b89ede5018a0c0a213946) Co-authored-by: Benjamin Peterson <benjamin@python.org>
* [3.9] bpo-41654: Fix deallocator of MemoryError to account for subclasses ↵Pablo Galindo2020-09-013-2/+45
| | | | | | | | | | | | (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-012-4/+8
| | | | | __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-014-2/+46
| | | | | | | | | | | | 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-303-0/+15
| | | | | | | | | (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-302-7/+13
|
* bpo-41634: Fix a typo in the curses documentation (GH-21958)Miss Islington (bot)2020-08-291-1/+1
| | | | | | (cherry picked from commit 398575c210f79627830c5c470184f54ace950ac6) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* bpo-19521: Fix parallel build race condition on AIX (GH-22001)Miss Islington (bot)2020-08-293-20/+50
| | | | | | Patch by Michael Haubenwallner. (cherry picked from commit e6dcd371b2c54a94584dd124e8c592a496d46a47) Co-authored-by: Stefan Krah <skrah@bytereef.org>
* [3.9] bpo-41624: fix documentation of typing.Coroutine (GH-21952) (#21982)Karthikeyan Singaravelan2020-08-282-1/+2
| | | | | | | (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-273-6/+48
| | | | | | | (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-273-1/+15
| | | | | (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-263-3/+24
| | | | | | | | | | | (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-263-2/+41
| | | | | | | | | | | (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>
* Document vars behavior when __dict__ is missing (GH-21466) (GH-21939)Miss Islington (bot)2020-08-221-0/+3
| | | | | (cherry picked from commit 802726acf6048338394a6a4750835c2cdd6a947b) Co-authored-by: Andre Delfino <adelfino@gmail.com>
* Fix grammar in Doc/tutorial/controlflow.rst (GH-21885) (#21922)Miss Islington (bot)2020-08-221-1/+1
| | | | | | | Automerge-Triggered-By: @csabella (cherry picked from commit 0be7c216e16f0d459f1c8f6209734c9b2b82fbd4) Co-authored-by: Denis Ovsienko <denis@ovsienko.info>
* bpo-40994: Ungroup items in collections.abc documentation for improved ↵Miss Islington (bot)2020-08-221-5/+13
| | | | | | | | | | | clarity (GH-21880) (#21926) Use a less surprising document structure. Automerge-Triggered-By: @csabella (cherry picked from commit 2ce39631f679e14132a54dc90ce764259d26e166) Co-authored-by: Sydney Pemberton <46042811+sydneypemberton1986@users.noreply.github.com>
* bpo-41573: Update release versions in General FAQ (GH-21915) (#21938)Miss Islington (bot)2020-08-221-4/+4
| | | | | (cherry picked from commit 7173fc84e61b80b19261e47fca38030206a3a78e) Co-authored-by: wyz23x2 <52805709+wyz23x2@users.noreply.github.com>
* bpo-41572: Fix grammar in BaseTransport.close docstring (GH-21914) (#21929)Miss Islington (bot)2020-08-211-2/+2
| | | | | | | | | | Fix grammar in BaseTransport.close docstring. https://bugs.python.org/issue41572 Signed-off-by: Cleber Rosa <crosa@redhat.com> (cherry picked from commit 1afb42cfa82dad0ddd726f59c6c5fcb3962314db) Co-authored-by: Cleber Rosa <cleber.gnu@gmail.com>
* Doc: add a missing period (GH-21819) (#21932)Miss Islington (bot)2020-08-201-1/+1
| | | | | | | (cherry picked from commit 12695f4c6d1167c0863098a586f3dfeb77a7cb9a) Co-authored-by: Mathieu Dupuy <deronnax@gmail.com> Co-authored-by: Mathieu Dupuy <deronnax@gmail.com>
* [3.9] bpo-40204: Allow pre-Sphinx 3 syntax in the doc (GH-21844) (GH-21901)Victor Stinner2020-08-1947-246/+260
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-41568: Fix refleaks in zoneinfo subclasses (GH-21907)Miss Islington (bot)2020-08-171-3/+3
| | | | | | | | | | | | | | | | | * Fix refleak in C module __init_subclass__ This was leaking a reference to the weak cache dictionary for every ZoneInfo subclass created. * Fix refleak in ZoneInfo subclass's clear_cache The previous version of the code accidentally cleared the global ZONEINFO_STRONG_CACHE variable (and inducing `ZoneInfo` to create a new strong cache) on calls to a subclass's `clear_cache()`. This would not affect guaranteed behavior, but it's still not the right thing to do (and it caused reference leaks). (cherry picked from commit c3dd7e45cc5d36bbe2295c2840faabb5c75d83e4) Co-authored-by: Paul Ganssle <paul@ganssle.io>
* bpo-40782: Change asyncio.AbstractEventLoop.run_in_executor to be a method ↵Miss Islington (bot)2020-08-172-1/+2
| | | | | | | | | 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-163-1/+27
| | | | | | | | | | 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-41540: AIX: skip test that is flaky with a default ulimit. (GH-21890) ↵Miss Islington (bot)2020-08-151-0/+3
| | | | | | | | | | | (#21893) - AIX has extreme over-allocation that is in no relation to the physical RAM and swap. (cherry picked from commit 39dab24621122338d01c1219bb0acc46ba9c9956) Authored-by: Stefan Krah <skrah@bytereef.org>
* bpo-40878: xlc cannot handle C99 extern inline. (GH-21891)Miss Islington (bot)2020-08-151-1/+1
| | | | | | | This applies to the default "extc99" mode. Python does not compile with "stdc99". (cherry picked from commit 40e700ad042089120456cc2ee79b8ca69479416b) Authored-by: Stefan Krah <skrah@bytereef.org>