summaryrefslogtreecommitdiff
path: root/Lib
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
|
* Add tests for feature_versionGuido van Rossum2019-03-051-41/+94
|
* 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
|
* Complete feature_version implementation (except loose ends)Guido van Rossum2019-03-051-7/+9
| | | | | | | | 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)
* Work towards feature_version supportGuido van Rossum2019-03-051-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-051-0/+4
| | | | | NamedStore has been replaced with Store. The difference between NamedStore and Store is handled when precess the NamedExpr node one level upper.
* bpo-36142: Add _PyPreConfig.allocator (GH-12181)Victor Stinner2019-03-051-23/+29
| | | | | | * 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-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
|
* bpo-35198 Fix C++ extension compilation on AIX (GH-10437)Kevin Adler2019-03-041-1/+9
| | | | | | | | | | | | | | 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.
* 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-032-8/+26
| | | | | | | | | | Co-authored-by: Maxwell <maxwellpxt@gmail.com> Co-authored-by: Stéphane Wirtel <stephane@wirtel.be> https://bugs.python.org/issue35899
* 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-031-1/+1
|
* Use names SEEK_SET, etc instead of magic number (GH-12057)ngie-eign2019-03-031-3/+3
| | | | | | | 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>
* bpo-36103: change default buffer size of shutil.copyfileobj() (GH-12115)Inada Naoki2019-03-021-1/+1
| | | | | | | | | | | | | | | | 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-32129: Avoid blurry IDLE application icon on macOS with Tk 8.6. (GH-12031)Ned Deily2019-03-011-1/+1
| | | Patch by Kevin Walzer.
* bpo-36043: FileCookieJar supports os.PathLike (GH-11945)Stéphane Wirtel2019-03-012-4/+27
| | | https://bugs.python.org/issue36043
* bpo-35178: Fix warnings._formatwarnmsg() (GH-12033)Xtreak2019-03-012-1/+20
| | | | | Ensure custom formatwarning function can receive line as positional argument. Co-Authored-By: Tashrif Billah <tashrifbillah@gmail.com>
* bpo-36142: Remove _PyMain structure (GH-12120)Victor Stinner2019-03-011-0/+5
| | | | | | | | | | | | | * Move fields from _PyMain to _PyCoreConfig: * skip_first_line * run_command * run_module * run_filename * Replace _PyMain.stdin_is_interactive with a new stdin_is_interactive(config) function * Rename _PyMain to _PyArgv. Add "const _PyArgv *args" field to _PyCmdline.
* bpo-36152: IDLE: Remove unused parameter from colorizer (GH-12109)Cheryl Sabella2019-03-012-18/+3
| | | | Remove colorizer.ColorDelegator.close_when_done and the corresponding argument of .close(). In IDLE, both have always been None or False since 2007.
* bpo-36155: Check for identity on test_gc.test_get_objects (GH-12116)Pablo Galindo2019-03-011-12/+36
|
* bpo-29571: Fix test_re.test_locale_flag() (GH-12099)Victor Stinner2019-03-011-2/+1
| | | | | | | | | Use locale.getpreferredencoding() rather than locale.getlocale() to get the locale encoding. With some locales, locale.getlocale() returns the wrong encoding. For example, on Fedora 29, locale.getlocale() returns ISO-8859-1 encoding for the "en_IN" locale, whereas locale.getpreferredencoding() reports the correct encoding: UTF-8.
* bpo-36018: Add special value tests and make minor tweaks to the docs (GH-12096)Raymond Hettinger2019-02-282-1/+9
| | | https://bugs.python.org/issue36018
* bpo-36096: IDLE: Refactor class variables in colorizer (GH-12002)Cheryl Sabella2019-02-272-21/+57
|
* bpo-36123: Fix test_socket.testWithTimeoutTriggeredSend() race condition ↵Joannah Nanjekye2019-02-261-2/+3
| | | | | | (GH-12053) Use longer timeout for accept() in the server and block on accept in the client. The client now only sets the timeout once the socket is connected.
* bpo-35652: shutil.copytree(copy_function=...) erroneously pass DirEntry ↵Giampaolo Rodola2019-02-262-1/+19
| | | | instead of path str (GH-11997)
* bpo-36109: Fix random test_descr failure. (GH-12044)Serhiy Storchaka2019-02-251-1/+5
|
* bpo-36102: Prepend slash to all POSIX shared memory block names (#12036)Davin Potts2019-02-251-4/+10
|
* Clean up code which checked presence of os.{stat,lstat,chmod} (#11643)Anthony Sottile2019-02-2516-65/+19
|
* Autospec functions should propagate mock calls to parent GH-11273Xtreak2019-02-252-0/+21
|
* Merge tag 'v3.8.0a2'Łukasz Langa2019-02-251-4/+8
|\ | | | | | | Python 3.8.0a2
| * v3.8.0a2v3.8.0a2Łukasz Langa2019-02-251-4/+8
| |
* | bpo-36048: Use __index__() instead of __int__() for implicit conversion if ↵Serhiy Storchaka2019-02-257-25/+143
|/ | | | | | available. (GH-11952) Deprecate using the __int__() method in implicit conversions of Python numbers to C integers.
* bpo-33671: allow setting shutil.copyfile() bufsize globally (GH-12016)Giampaolo Rodola2019-02-251-1/+3
|
* bpo-36018: Add properties for mean and stdev (GH-12022)Raymond Hettinger2019-02-242-0/+16
| | | | | | | | | | | | Responding to suggestions on the tracker and some off-line suggestions. Davin suggested that english named accessors instead of greek letters would result in more intelligible user code. Steven suggested that the parameters still need to be *mu* and *theta* which are used elsewhere (and I noted those parameter names are used in linked-to resources). Michael suggested proving-out the API by seeing whether it generalized to *Lognormal*. I did so and found that Lognormal distribution parameters *mu* and *sigma* do not represent the mean and standard deviation of the lognormal distribution (instead, they are for the underlying regular normal distribution). Putting these ideas together, we have NormalDist parameterized by *mu* and *sigma* but offering English named properties for accessors. That gives lets us match other API that access mu and sigma, it matches the external resources on the topic, gives us clear english names in user code. The API extends nicely to LogNormal where the parameters and the summary statistic accessors are not the same. https://bugs.python.org/issue36018
* bpo-35512: Resolve string target to patch.dict decorator during function ↵Xtreak2019-02-243-2/+22
| | | | | | | | | | | | | | call GH#12000 * Resolve string target to patch.dict during function call * Add NEWS entry * Remove unneeded call * Restore original value for support.target and refactor assertions * Add extra assertion to verify unpatched dict
* bpo-27313: Avoid test_ttk_guionly ComboboxTest fail with macOS Cocoa Tk ↵Ned Deily2019-02-241-1/+6
| | | | (GH-12011)
* bpo-36018: Make __pos__ return a distinct instance of NormDist (GH-12009)Raymond Hettinger2019-02-232-1/+13
| | | https://bugs.python.org/issue36018
* bpo-35813: Tests and docs for shared_memory (#11816)Davin Potts2019-02-233-352/+677
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added tests for shared_memory submodule. * Added tests for ShareableList. * Fix bug in allocationn size during creation of empty ShareableList illuminated by existing test run on Linux. * Initial set of docs for shared_memory module. * Added docs for ShareableList, added doctree entry for shared_memory submodule, name refactoring for greater clarity. * Added examples to SharedMemoryManager docs, for ease of documentation switched away from exclusively registered functions to some explicit methods on SharedMemoryManager. * Wording tweaks to docs. * Fix test failures on Windows. * Added tests around SharedMemoryManager. * Documentation tweaks. * Fix inappropriate test on Windows. * Further documentation tweaks. * Fix bare exception. * Removed __copyright__. * Fixed typo in doc, removed comment. * Updated SharedMemoryManager preliminary tests to reflect change of not supporting all registered functions on SyncManager. * Added Sphinx doctest run controls. * CloseHandle should be in a finally block in case MapViewOfFile fails. * Missed opportunity to use with statement. * Switch to self.addCleanup to spare long try/finally blocks and save one indentation, change to use decorator to skip test instead. * Simplify the posixshmem extension module. Provide shm_open() and shm_unlink() functions. Move other functionality into the shared_memory.py module. * Added to doc around size parameter of SharedMemory. * Changed PosixSharedMemory.size to use os.fstat. * Change SharedMemory.buf to a read-only property as well as NamedSharedMemory.size. * Marked as provisional per PEP411 in docstring. * Changed SharedMemoryTracker to be private. * Removed registered Proxy Objects from SharedMemoryManager. * Removed shareable_wrap(). * Removed shareable_wrap() and dangling references to it. * For consistency added __reduce__ to key classes. * Fix for potential race condition on Windows for O_CREX. * Remove unused imports. * Update access to kernel32 on Windows per feedback from eryksun. * Moved kernel32 calls to _winapi. * Removed ShareableList.copy as redundant. * Changes to _winapi use from eryksun feedback. * Adopt simpler SharedMemory API, collapsing PosixSharedMemory and WindowsNamedSharedMemory into one. * Fix missing docstring on class, add test for ignoring size when attaching. * Moved SharedMemoryManager to managers module, tweak to fragile test. * Tweak to exception in OpenFileMapping suggested by eryksun. * Mark a few dangling bits as private as suggested by Giampaolo.
* bpo-24310: Document IDLE settings dialog font tab sample (GH-12007)Terry Jan Reedy2019-02-232-1/+9
|
* bpo-36018: Add the NormalDist class to the statistics module (GH-11973)Raymond Hettinger2019-02-232-1/+332
|
* bpo-36016: Add generation option to gc.getobjects() (GH-11909)Pablo Galindo2019-02-231-0/+32
|
* bpo-36019: Use pythontest.net instead of example.com in network tests (GH-11941)Stéphane Wirtel2019-02-224-10/+16
|
* bpo-35904: Add statistics.fmean() (GH-11892)Raymond Hettinger2019-02-212-1/+73
|
* bpo-36068: Make _tuplegetter objects serializable (GH-11981)Joe Jevnik2019-02-211-1/+10
|