summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
...
* [3.8] bpo-37942: Improve argument clinic float converter (GH-15470) (GH-15480)Raymond Hettinger2019-08-252-6/+12
| | | (cherry picked from commit aef9ad82f7f667cd001a7112d3bc636e918626f7)
* [3.8] bpo-37830: Fix compilation of break and continue in finally. ↵Serhiy Storchaka2019-08-244-180/+224
| | | | | | | | | (GH-15320) (GH-15456) Fix compilation of "break" and "continue" in the "finally" block when the corresponding "try" block contains "return" with a non-constant value. (cherry picked from commit ef61c524ddeeb56da3858b86e349e7288d68178e)
* bpo-28269: Replace strcasecmp with system function _stricmp. (GH-13095)Miss Islington (bot)2019-08-241-19/+1
| | | | | (cherry picked from commit 05f2d84cae4ba1ff15b7a1d0347305393f4bdcc5) Co-authored-by: Minmin Gong <gongminmin@msn.com>
* bpo-29535: Remove promize about hash randomization of datetime objects. ↵Miss Islington (bot)2019-08-241-2/+2
| | | | | | | (GH-15269) (cherry picked from commit e9c90aa43144b0be1e4e393e8cb549573437a5da) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-36763: PyConfig_Read() handles PySys_AddXOption() (GH-15431) (GH-15435)Victor Stinner2019-08-232-31/+46
| | | | | | | | | | | | PyConfig_Read() is now responsible to handle early calls to PySys_AddXOption() and PySys_AddWarnOption(). Options added by PySys_AddXOption() are now handled the same way than PyConfig.xoptions and command line -X options. For example, PySys_AddXOption(L"faulthandler") enables faulthandler as expected. (cherry picked from commit 120b707a6d43452e067daa55a8fdca69f9424abc)
* bpo-37549: os.dup() fails for standard streams on Windows 7 (GH-15389)Miss Islington (bot)2019-08-231-1/+8
| | | | | (cherry picked from commit 5be666010e4df65dc4d831435cc92340ea369f94) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* bpo-36763: Implement PyWideStringList_Insert() of PEP 587 (GH-15423)Miss Islington (bot)2019-08-231-4/+25
| | | | | (cherry picked from commit 3842f2997fbd4dc840986aad2bb94656815e243b) Co-authored-by: Victor Stinner <vstinner@redhat.com>
* bpo-37926: Fix PySys_SetArgvEx(0, NULL, 0) crash (GH-15415) (GH-15420)Victor Stinner2019-08-231-1/+2
| | | | | | | | | | | | empty_argv is no longer static in Python 3.8, but it is declared in a temporary scope, whereas argv keeps a reference to it. empty_argv memory (allocated on the stack) is reused by make_sys_argv() code which is inlined when using gcc -O3. Define empty_argv in PySys_SetArgvEx() body, to ensure that it remains valid for the whole lifetime of the PySys_SetArgvEx() call. (cherry picked from commit c48682509dc49b43fe914fe6c502bc390345d1c2)
* bpo-37834: Normalise handling of reparse points on Windows (GH-15370)Steve Dower2019-08-211-1/+6
| | | | | | | | | | bpo-37834: Normalise handling of reparse points on Windows * ntpath.realpath() and nt.stat() will traverse all supported reparse points (previously was mixed) * nt.lstat() will let the OS traverse reparse points that are not name surrogates (previously would not traverse any reparse point) * nt.[l]stat() will only set S_IFLNK for symlinks (previous behaviour) * nt.readlink() will read destinations for symlinks and junction points only bpo-1311: os.path.exists('nul') now returns True on Windows * nt.stat('nul').st_mode is now S_IFCHR (previously was an error)
* bpo-36266: Add module name in ImportError when DLL not found on Windows ↵Miss Islington (bot)2019-08-171-4/+4
| | | | | | | (GH-15180) (cherry picked from commit 24fe46081be3d1c01b3d21cb39bc3492ab4485a3) Co-authored-by: shireenrao <shireenrao@gmail.com>
* [3.8] bpo-32912: Revert SyntaxWarning on invalid escape sequences (GH-15142)Serhiy Storchaka2019-08-091-3/+3
| | | | | | | * bpo-32912: Revert warnings for invalid escape sequences. DeprecationWarning will continue to be emitted for invalid escape sequences in string and bytes literals in 3.8 just as it did in 3.7. SyntaxWarning may be emitted in the future. But per mailing list discussion, we don't yet know when because we haven't settled on how to do so in a non-disruptive manner.
* bpo-18049: Sync thread stack size to main thread size on macOS (GH-14748)Miss Islington (bot)2019-08-011-1/+2
| | | | | | | | | This changeset increases the default size of the stack for threads on macOS to the size of the stack of the main thread and reenables the relevant recursion test. (cherry picked from commit 1a057bab0f18d6ad843ce321d1d77a4819497ae4) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
* bpo-37500: Make sure dead code does not generate bytecode but also detect ↵Miss Islington (bot)2019-07-291-5/+64
| | | | | | | | | | | | | | syntax errors (GH-14612) https://bugs.python.org/issue37500 Add a new field to the compiler structure that allows to be configured so no bytecode is emitted. In this way is possible to detect errors by walking the nodes while preserving optimizations. https://bugs.python.org/issue37500 (cherry picked from commit 18c5f9d44dde37c0fae5585a604c6027825252d2) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-37697: Sync with importlib_metadata 0.19 (GH-14993) (GH-14995)Miss Islington (bot)2019-07-281-779/+796
| | | | | | | | | | * bpo-37697: Sync with importlib_metadata 0.19 * Run make regen-importlib * 📜🤖 Added by blurb_it. (cherry picked from commit 049460da9c7b5f51732e2966195c44713af9dc4c) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* [3.8] bpo-36974: separate vectorcall functions for each calling convention ↵Jeroen Demeyer2019-07-231-8/+8
| | | | (GH-13781) (#14782)
* [3.8] Fix typos in docs, comments and test assert messages (GH-14872). (#14900)Kyle Stanley2019-07-221-1/+1
| | | | | (cherry picked from commit 96e12d5f4f3c5a20986566038ee763dff3c228a1) Co-authored-by: Min ho Kim <minho42@gmail.com>
* Adjust builtins.zip() docstring to better communicate its signature (GH-14833)Miss Islington (bot)2019-07-191-1/+1
| | | | | (cherry picked from commit af2f5b1723b95e45e1f15b5bd52102b7de560f7c) Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
* bpo-37593: Swap the positions of posonlyargs and args in the constructor of ↵Miss Islington (bot)2019-07-143-145/+145
| | | | | | | | ast.parameters nodes (GH-14778) https://bugs.python.org/issue37593 (cherry picked from commit cd6e83b4810549c308ab2d7315dbab526e35ccf6) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-18374: fix wrong col_offset of some ast.BinOp instances (GH-14607)Miss Islington (bot)2019-07-081-1/+1
| | | | | | | | Nested BinOp instances (e.g. a+b+c) had a wrong col_offset for the second BinOp (e.g. 2 instead of 0 in the example). Fix it by using the correct st node to copy the line and col_offset from in ast.c. (cherry picked from commit 110a47c4f42cf4db88edc1876899fff8f05190fb) Co-authored-by: Carl Friedrich Bolz-Tereick <cfbolz@gmx.de>
* bpo-36763: Add PyConfig_SetWideStringList() (GH-14444)Miss Islington (bot)2019-07-011-1/+18
| | | | | (cherry picked from commit 36242fd871d0f0977e720d4fae5700774bd8c09a) Co-authored-by: Victor Stinner <vstinner@redhat.com>
* bpo-37467: Fix PyErr_Display() for bytes filename (GH-14504)Miss Islington (bot)2019-07-011-1/+1
| | | | | | | | | | | | | | | | | Fix sys.excepthook() and PyErr_Display() if a filename is a bytes string. For example, for a SyntaxError exception where the filename attribute is a bytes string. Cleanup also test_sys: * Sort imports. * Rename numruns global var to INTERN_NUMRUNS. * Add DisplayHookTest and ExceptHookTest test case classes. * Don't save/restore sys.stdout and sys.displayhook using setUp()/tearDown(): do it in each test method. * Test error case (call hook with no argument) after the success case. (cherry picked from commit f9b7457bd7f438263e0d2dd1f70589ad56a2585e) Co-authored-by: Victor Stinner <vstinner@redhat.com>
* bpo-37221: Add PyCode_NewWithPosOnlyArgs to be used internally and set ↵Miss Islington (bot)2019-07-012-8/+6
| | | | | | | | PyCode_New as a compatibility wrapper (GH-13959) (#14505) Add PyCode_NewEx to be used internally and set PyCode_New as a compatibility wrapper (cherry picked from commit 4a2edc34a405150d0b23ecfdcb401e7cf59f4650) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-37369: Fix initialization of sys members when launched via an app ↵Steve Dower2019-06-293-0/+35
| | | | | | container (GH-14467) sys._base_executable is now always defined on all platforms, and can be overridden through configuration. Also adds test.support.PythonSymlink to encapsulate platform-specific logic for symlinking sys.executable
* bpo-37363: Add audit events for a range of modules (GH-14301)Miss Islington (bot)2019-06-241-0/+5
| | | | | (cherry picked from commit 60419a7e96577cf783b3b45bf3984f9fb0d7ddff) Co-authored-by: Steve Dower <steve.dower@python.org>
* bpo-35224: Bump the pyc magic number by 1 instead of by 10 in last ↵Miss Islington (bot)2019-06-231-1/+1
| | | | | | | modification (GH-14320) (cherry picked from commit b3ca7972c8d8c6479b6542ce28e0f7a6ebd5b8fe) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-35224: Bump the pyc magic number after the change in MAP_ADD (GH-14313)Miss Islington (bot)2019-06-221-121/+121
| | | | | (cherry picked from commit 663131a6e2c6c8b83e9f982d8c6ca38fc7c238b4) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-35224: Reverse evaluation order of key: value in dict comprehensions ↵Miss Islington (bot)2019-06-222-6/+6
| | | | | | | | | | (GH-14139) … as proposed in PEP 572; key is now evaluated before value. https://bugs.python.org/issue35224 (cherry picked from commit c8a35417db8853a253517a3e5190e174075c6384) Co-authored-by: Jörn Heissler <joernheissler@users.noreply.github.com>
* bpo-37316: mmap.mmap() passes the wrong variable to PySys_Audit() (GH-14152)Steve Dower2019-06-211-0/+1
| | | Also, add a missing call to va_end() in PySys_Audit().
* bpo-37267: Do not check for FILE_TYPE_CHAR in os.dup() on Windows (GH-14051) ↵Miss Islington (bot)2019-06-171-12/+5
| | | | | | | | | (GH-14140) On Windows, os.dup() no longer creates an inheritable fd when handling a character file. (cherry picked from commit 28fca0c422b425a6be43be31add0a5328c16b0b8) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* bpo-37289: Remove 'if False' handling in the peephole optimizer (GH-14099) ↵Miss Islington (bot)2019-06-151-9/+3
| | | | | | | (GH-14112) (cherry picked from commit 7a68f8c28bb78d957555a5001dac4df6345434a0) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-37269: Correctly optimise conditionals with constant booleans (GH-14071)Miss Islington (bot)2019-06-141-0/+5
| | | | | | | | | | | Fix a regression introduced by af8646c8054d0f4180a2013383039b6a472f9698 that was causing code of the form: if True and False: do_something() to be optimized incorrectly, eliminating the block. (cherry picked from commit 05f831865545b08c9a21cfb7773af58b76ec64cb) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-37077: Add native thread ID (TID) for AIX (GH-13624)Miss Islington (bot)2019-06-131-2/+7
| | | | | | | | This is the followup for issue36084 https://bugs.python.org/issue37077 (cherry picked from commit d0eeb936d8daf05d7d89f6935e3f4c0dee49c5be) Co-authored-by: Michael Felt <aixtools@users.noreply.github.com>
* bpo-37213: Handle negative line deltas correctly in the peephole optimizer ↵Miss Islington (bot)2019-06-134-4144/+4147
| | | | | | | | (GH-13969) The peephole optimizer was not optimizing correctly bytecode after negative deltas were introduced. This is due to the fact that some special values (255) were being searched for in both instruction pointer delta and line number deltas. (cherry picked from commit 3498c642f4e83f3d8e2214654c0fa8e0d51cebe5) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-37253: Remove PyAST_obj2mod_ex() function (GH-14020)Miss Islington (bot)2019-06-131-5/+0
| | | | | | | PyAST_obj2mod_ex() is similar to PyAST_obj2mod() with an additional 'feature_version' parameter which is unused. (cherry picked from commit 022ac0a497b668d8b15e34e582a6396ead1a35e1) Co-authored-by: Victor Stinner <vstinner@redhat.com>
* bpo-37253: Add _PyCompilerFlags_INIT macro (GH-14018)Miss Islington (bot)2019-06-134-24/+9
| | | | | | | | Add a new _PyCompilerFlags_INIT macro to initialize PyCompilerFlags variables, rather than initializing cf_flags and cf_feature_version explicitly in each variable. (cherry picked from commit 37d66d7d4bc7dbac9809d69966a774ebb32563be) Co-authored-by: Victor Stinner <vstinner@redhat.com>
* bpo-37160: Thread native ID NetBSD support (GH-13835)Miss Islington (bot)2019-06-121-0/+5
| | | | | (cherry picked from commit 5287022eeeb3c017d49fc8580b52e18377bf23f3) Co-authored-by: David Carlier <dcarlier@afilias.info>
* bpo-35766: compile(): rename feature_version parameter (GH-13994) (GH-14001)Victor Stinner2019-06-122-7/+12
| | | | | | | | Rename compile() feature_version parameter to _feature_version and convert it to a keyword-only parameter. Update also test_type_comments to pass feature_version as a tuple. (cherry picked from commit efdf6ca90f7702824e7aeee1ceca949e7c20288a)
* Revert "bpo-36818: Add PyInterpreterState.runtime field. (gh-13129)" (GH-13795)Victor Stinner2019-06-045-82/+82
| | | This reverts commit 396e0a8d9dc65453cb9d53500d0a620602656cfe.
* bpo-37146: disable opcache when Py_DEBUG is defined (GH-13787)Inada Naoki2019-06-031-0/+7
| | | | | --with-pydebug is commonly used to find memory leaks. But opcache makes it harder. So disable opcache when Py_DEBUG is defined.
* Revert "bpo-33608: Factor out a private, per-interpreter ↵Victor Stinner2019-06-034-285/+175
| | | | | _Py_AddPendingCall(). (gh-13714)" (GH-13780) This reverts commit 6a150bcaeb190d1731b38ab9c7a5d1a352847ddc.
* bpo-37087: Adding native ID support for OpenBSD (GH-13654)David Carlier2019-06-031-0/+5
|
* bpo-26219: remove unused code (GH-13775)Inada Naoki2019-06-031-3/+0
| | | | This code was for deoptimization, which is removed from PR-12884.
* bpo-26219: per opcode cache for LOAD_GLOBAL (GH-12884)Inada Naoki2019-06-032-1/+145
| | | | | | This patch implements per opcode cache mechanism, and use it in only LOAD_GLOBAL opcode. Based on Yury's opcache3.patch in bpo-26219.
* bpo-35814: Allow unpacking in r.h.s of annotated assignment expressions ↵Pablo Galindo2019-06-032-2/+2
| | | | (GH-13760)
* bpo-33608: Factor out a private, per-interpreter _Py_AddPendingCall(). ↵Eric Snow2019-06-014-176/+285
| | | | (gh-13714)
* Fix compiler warnings in the pystrehex module (GH-13730)Pablo Galindo2019-06-011-2/+2
|
* bpo-37122: Make co->co_argcount represent the total number of positonal ↵Pablo Galindo2019-06-012-35/+19
| | | | arguments in the code object (GH-13726)
* bpo-36818: Add PyInterpreterState.runtime field. (gh-13129)Eric Snow2019-06-015-82/+82
| | | https://bugs.python.org/issue36818
* bpo-37115: Support annotations in positional-only arguments (GH-13698)Pablo Galindo2019-05-311-0/+2
|
* bpo-37112: Allow compile to work on AST with positional only arguments with ↵Pablo Galindo2019-05-311-1/+1
| | | | defaults (GH-13697)