summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Add test for underscore in numberfeature-versionGuido van Rossum2019-03-071-0/+8
|
* Rename parses() to parse_all()Guido van Rossum2019-03-071-15/+15
|
* Clarify range of feature_version in docs.Guido van Rossum2019-03-071-1/+2
|
* Add tests for feature_versionGuido van Rossum2019-03-051-41/+94
|
* Fix indentation of many ast_error() callsGuido van Rossum2019-03-051-11/+11
|
* Simplify compile() call in ast.parse()Guido van Rossum2019-03-051-4/+1
|
* Manually add async and await to kwlist in keywords.py, since they are not ↵Guido van Rossum2019-03-051-0/+4
| | | | regular keywords
* Fix test_parser.pyGuido van Rossum2019-03-051-1/+1
| | | | | | The PyST_Object header in parsermodule.c became one int larger because it contains a PyCompilerFlags struct, which grew extra space for the st_feature_version field. Took me long enough!
* 'async' and 'await' are no longer plain keywords -- fix test_keyword.pyGuido van Rossum2019-03-051-2/+0
|
* Check flags isn't NULL before dereferencing (this broke regen-importlib)Guido van Rossum2019-03-051-1/+1
|
* Add blurbGuido van Rossum2019-03-051-0/+7
|
* Complete feature_version implementation (except loose ends)Guido van Rossum2019-03-0515-134/+246
| | | | | | | | This adds: - Add ASYNC/AWAIT tokens back to Grammar and regenerate - Recognize async/await keywords conditionally if feature_version < 7 - Reject await expressions if feature_version < 5 - Docs for ASYNC/AWAIT tokens and for ast.parse(..., feature_version=N)
* Implement further restrictions on feature_versionGuido van Rossum2019-03-051-1/+54
| | | | | | | | | | | | | | | This is everything currently in typeshed except await expressions (but it does reject async functions etc.): - Reject async functions and async for/with in minor versions < 5 - Reject async comprehensions in minor versions < 6 - Reject underscores in numeric literals in minor versions < 6 - Reject variable annotations in minor versions < 6 - Reject `X @= Y` in minor versions < 5
* Work towards feature_version supportGuido van Rossum2019-03-0512-16/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Visible behavior: - Issue error for `X @ Y` (matrix multiply) if c_feature_version < 5 - Add optional feature_version kw arg to ast.parse() (default -1 which implies PY_MINOR_VERSION) - Add feature_version: int = -1 to compile() (via Argument Clinic); this sets cf_feature_version to the given value if >= 0, else defaults to PY_MINOR_VERSION Implementation: - Add PyAST_obj2mod_ex(): like PyAST_obj2mod() but with feature_version arg; the latter calls the former with PY_MINOR_VERSION - Add cf_feature_version to PyCompilerFlags structure; initialized to PY_MINOR_VERSION everywhere - Add c_feature_version to struct compiling; initialize from cf_feature_version - Add 'c' argument to get_operator() - In builtin eval() and exec(), default to PY_MINOR_VERSION TODO: - Put version-dependent ASYNC/AWAIT keyword scanning back - Reject async functions, await expressions, and async for/with in minor versions < 5 - Reject async comprehensions in minor versions < 6 - Reject underscores in numeric literals in minor versions < 6 - Reject variable annotations in minor versions < 6 - Reject `X @= Y` in minor versions < 5
* bpo-36187: Remove NamedStore. (GH-12167)Serhiy Storchaka2019-03-057-143/+103
| | | | | NamedStore has been replaced with Store. The difference between NamedStore and Store is handled when precess the NamedExpr node one level upper.
* Fix the C function signature for _collections._tuplegetter.__reduce__. ↵Serhiy Storchaka2019-03-051-2/+2
| | | | | (GH-12180) Correctly fixes bpo-36197.
* bpo-36142: Add _PyPreConfig.allocator (GH-12181)Victor Stinner2019-03-057-53/+129
| | | | | | * Move 'allocator' and 'dev_mode' fields from _PyCoreConfig to _PyPreConfig. * Fix InitConfigTests of test_embed: dev_mode sets allocator to "debug", add a new tests for env vars with dev mode enabled.
* bpo-33012: Fix compilation warnings in memoryobject.c and ↵Stéphane Wirtel2019-03-052-2/+2
| | | | | | _collectionsmodule.c (GH-12179) Cast function pointers to (void(*)(void)) before casting to (PyCFunction) to make "warning: cast between incompatible function types" false alarm quiet.
* bpo-36142: Add _PyPreConfig.utf8_mode (GH-12174)Victor Stinner2019-03-057-366/+465
| | | | | | | | | | | | * Move following fields from _PyCoreConfig to _PyPreConfig: * coerce_c_locale * coerce_c_locale_warn * legacy_windows_stdio * utf8_mode * _PyPreConfig_ReadFromArgv() is now responsible to choose the filesystem encoding * _PyPreConfig_Write() now sets the LC_CTYPE locale
* bpo-22831: Use "with" to avoid possible fd leaks in tests (part 2). (GH-10929)Serhiy Storchaka2019-03-0525-323/+264
|
* bpo-22831: Use "with" to avoid possible fd leaks in tests (part 1). (GH-10928)Serhiy Storchaka2019-03-055-298/+254
|
* closes bpo-36188: Clean up 'unbound' method left-overs. (GH-12169)Martijn Pieters2019-03-043-24/+5
| | | | | | | | | | Methods are always bound, and `__self__` can no longer be `NULL` (`method_new()` and `PyMethod_New()` both explicitly check for this). Moreover, once a bound method is bound, it *stays* bound and won't be re-bound to something else, so the section in the datamodel that talks about accessing an methods in a different descriptor-binding context doesn't apply any more in Python 3.
* Doc: Use `option` word for command line interface. (GH-12142)NAKAMURA Osamu2019-03-041-1/+1
| | | For command line option, `option` is better than `parameter`.
* bpo-36142: Add _PyPreConfig_ReadFromArgv() (GH-12173)Victor Stinner2019-03-058-52/+209
| | | | The new function is now responsible to parse -E and -I command line arguments.
* bpo-36142: Add _PyPreConfig structure (GH-12172)Victor Stinner2019-03-059-52/+193
| | | | | | * Add _PyPreConfig structure * Move 'ignored' and 'use_environment' fields from _PyCoreConfig to _PyPreConfig * Add a new "_PyPreConfig preconfig;" field to _PyCoreConfig
* Fixed a missing . and a missing capital letter. (GH-12170)Jules Lasne (jlasne)2019-03-041-2/+2
|
* bpo-36179: Fix ref leaks in _hashopenssl (GH-12158)Christian Heimes2019-03-042-5/+9
| | | | | | | | | | Fix two unlikely reference leaks in _hashopenssl. The leaks only occur in out-of-memory cases. Thanks to Charalampos Stratakis. Signed-off-by: Christian Heimes <christian@python.org> https://bugs.python.org/issue36179
* bpo-35198 Fix C++ extension compilation on AIX (GH-10437)Kevin Adler2019-03-042-1/+10
| | | | | | | | | | | | | | For C++ extensions, distutils tries to replace the C compiler with the C++ compiler, but it assumes that C compiler is the first element after any environment variables set. On AIX, linking goes through ld_so_aix, so it is the first element and the compiler is the next element. Thus the replacement is faulty: ld_so_aix gcc ... -> g++ gcc ... Also, it assumed that self.compiler_cxx had only 1 element or that there were the same number of elements as the linker has and in the same order. This might not be the case, so instead concatenate everything together.
* Revert: bpo-33608: Factor out a private, per-interpreter ↵Victor Stinner2019-03-0420-745/+576
| | | | | | | | | | | | | | | | | | | _Py_AddPendingCall(). (GH-11617) (GH-12159) * Revert "bpo-36097: Use only public C-API in the_xxsubinterpreters module (adding as necessary). (#12003)" This reverts commit bcfa450f210074e16feb761ae5b3e966a2532fcf. * Revert "bpo-33608: Simplify ceval's DISPATCH by hoisting eval_breaker ahead of time. (gh-12062)" This reverts commit bda918bf65a88560ec453aaba0758a9c0d49b449. * Revert "bpo-33608: Use _Py_AddPendingCall() in _PyCrossInterpreterData_Release(). (gh-12024)" This reverts commit b05b711a2cef6c6c381e01069dedac372e0b9fb2. * Revert "bpo-33608: Factor out a private, per-interpreter _Py_AddPendingCall(). (GH-11617)" This reverts commit ef4ac967e2f3a9a18330cc6abe14adb4bc3d0465.
* bpo-31904: Add encoding support for VxWorks RTOS (GH-12051)pxinwr2019-03-047-14/+19
| | | | | | | | Use UTF-8 as the system encoding on VxWorks. The main reason are: 1. The locale is frequently misconfigured. 2. Missing some functions to deal with locale in VxWorks C library.
* Clean implementation of Parser/pgen and fix some style issues (GH-12156)Pablo Galindo2019-03-044-28/+14
|
* bpo-20906: Various revisions to the Unicode howto (#8394)Andrew Kuchling2019-03-031-158/+183
| | | | | | * bpo-20906: Corrections & revisions to Unicode HOWTO * bpo-34484: don't describe range as a Private Use Area
* fix typo in configparser doc (GH-12154)Woko2019-03-031-1/+1
|
* bpo-35899: Fix Enum handling of empty and weird strings (GH-11891)Brennan D Baraban2019-03-033-8/+27
| | | | | | | | | | Co-authored-by: Maxwell <maxwellpxt@gmail.com> Co-authored-by: Stéphane Wirtel <stephane@wirtel.be> https://bugs.python.org/issue35899
* bpo-36170: posix_spawn doesn't exist on 3.7 (GH-12143)Mark Williams2019-03-031-1/+1
| | | The 3.8 docs claim that `os.posix_spawn` was introduced in 3.7, but it wasn't; it will be introduced in 3.8.
* add missing break statement (GH-12147)Inada Naoki2019-03-031-0/+4
| | | Bug introduced by 848037c.
* fixed duplicated method name of test_getuserbase() (GH-12140)native-api2019-03-041-1/+3
|
* bpo-36091: Remove reference to async generator in Lib/types.py. (GH-11996)Henry Chen2019-03-032-1/+2
|
* Use names SEEK_SET, etc instead of magic number (GH-12057)ngie-eign2019-03-032-9/+11
| | | | | | | The previous code hardcoded `SEEK_SET`, etc. While it's very unlikely that these values will change, it's best to use the definitions to avoid there being mismatches in behavior with the code in the future. Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
* Remove some code which has been dead since 1994 (#12136)Alex Gaynor2019-03-011-11/+0
|
* bpo-36103: change default buffer size of shutil.copyfileobj() (GH-12115)Inada Naoki2019-03-023-2/+5
| | | | | | | | | | | | | | | | It is changed from 16KiB to 64KiB. The previous default value is used since 1990. coreutils chose 128 KiB as minimum buffer size for block device I/O. But shutil.copyfileobj() can be used for non block devices. So I choose more conservative value. As my quick benchmark, performance difference between 64KiB and 128 KiB is up to ~5%. On the other hand, performance difference between 32 KiB and 64 KiB can be more than 10% when file is fully buffered. This is why 64 KiB is rational value.
* bpo-36097: Use only public C-API in the_xxsubinterpreters module (adding as ↵Eric Snow2019-03-0112-393/+483
| | | | necessary). (#12003)
* bpo-35808: Retire pgen and use pgen2 to generate the parser (GH-11814)Pablo Galindo2019-03-0127-2684/+1480
| | | | | Pgen is the oldest piece of technology in the CPython repository, building it requires various #if[n]def PGEN hacks in other parts of the code and it also depends more and more on CPython internals. This commit removes the old pgen C code and replaces it for a new version implemented in pure Python. This is a modified and adapted version of lib2to3/pgen2 that can generate grammar files compatibles with the current parser. This commit also eliminates all the #ifdef and code branches related to pgen, simplifying the code and making it more maintainable. The regen-grammar step now uses $(PYTHON_FOR_REGEN) that can be any version of the interpreter, so the new pgen code maintains compatibility with older versions of the interpreter (this also allows regenerating the grammar with the current CI solution that uses Python3.5). The new pgen Python module also makes use of the Grammar/Tokens file that holds the token specification, so is always kept in sync and avoids having to maintain duplicate token definitions.
* bpo-32129: Avoid blurry IDLE application icon on macOS with Tk 8.6. (GH-12031)Ned Deily2019-03-012-1/+3
| | | Patch by Kevin Walzer.
* bpo-36043: FileCookieJar supports os.PathLike (GH-11945)Stéphane Wirtel2019-03-014-4/+35
| | | https://bugs.python.org/issue36043
* bpo-33608: Simplify ceval's DISPATCH by hoisting eval_breaker ahead of time. ↵Eric Snow2019-03-012-26/+27
| | | | | (gh-12062) This includes fixes to various _Py_atomic_* macros.
* bpo-33608: Use _Py_AddPendingCall() in _PyCrossInterpreterData_Release(). ↵Eric Snow2019-03-011-39/+42
| | | | | | (gh-12024)
* bpo-36146: Add TEST_EXTENSIONS to setup.py (GH-12129)Victor Stinner2019-03-012-81/+86
| | | | | | | | | | | | | Add TEST_EXTENSIONS constant to setup.py to allow to not build test extensions like _testcapi. Changes: * Add add_ldflags_cppflags() subfunction * Rename add_compiler_directories() to configure_compiler(). * Remove unused COMPILED_WITH_PYDEBUG constant. * Use self.add() rather than accessing directly self.extensions. * Remove module_enabled() function: check differently if curses extension is built or not.
* bpo-35178: Fix warnings._formatwarnmsg() (GH-12033)Xtreak2019-03-013-1/+22
| | | | | Ensure custom formatwarning function can receive line as positional argument. Co-Authored-By: Tashrif Billah <tashrifbillah@gmail.com>
* bpo-36142: Add preconfig.c (GH-12128)Victor Stinner2019-03-018-87/+115
| | | | | * Add _PyArgv_Decode() function * Move _Py_ClearFileSystemEncoding() and _Py_SetFileSystemEncoding() to preconfig.c.