summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* 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-031-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-02-281-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-261-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-241-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-242-1/+13
| | | https://bugs.python.org/issue36018
* bpo-35813: Tests and docs for shared_memory (#11816)Davin Potts2019-02-243-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-242-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
|
* bpo-36057 Update docs and tests for ordering in collections.Counter [no ↵Raymond Hettinger2019-02-212-2/+59
| | | | | | | | | | behavior change] (#11962) * Add tests for Counter order. No behavior change. * Update docs and tests * Fix doctest output and capitalization
* bpo-36060: Document how collections.ChainMap() determines iteration order ↵Raymond Hettinger2019-02-211-0/+14
| | | | (GH-11969)
* bpo-36052: Raise a SyntaxError when assigning a value to __debug__ with := ↵Stéphane Wirtel2019-02-211-0/+4
| | | | | | | (GH-11958) Trying to assign a value to __debug__ using the assignment operator is supposed to fail, but a missing check for forbidden names when setting the context in the ast was preventing this behaviour.
* bpo-36037: Fix test_ssl for strict OpenSSL policy (GH-11940)Victor Stinner2019-02-191-1/+29
| | | | | Fix test_ssl for strict OpenSSL configuration like RHEL8 strict crypto policy. Use older TLS version for minimum TLS version of the server SSL context if needed, to test TLS version older than default minimum TLS version.
* bpo-35153: Add headers parameter to xmlrpc.client.ServerProxy (GH-10308)Cédric Krier2019-02-192-7/+73
| | | Allow to add HTTP headers to XML-RPC requests sent to the server.
* bpo-31506: Clarify error messages for object.__new__ and object.__init__ ↵Sanyam Khurana2019-02-191-7/+13
| | | | | | | | | (GH-11641) `object.__new__` and `object.__init__` do take one argument each, they just don't take extra user supplied arguments. Patch by Sanyam Khurana.
* Fix a misnamed test for lists. (GH-11933)Serhiy Storchaka2019-02-191-1/+7
|
* Fix syntax warnings in tests introduced in bpo-35942. (GH-11934)Serhiy Storchaka2019-02-191-12/+4
|
* Fix syntax warnings in tests introduced in bpo-15248. (GH-11932)Serhiy Storchaka2019-02-193-6/+10
|
* bpo-35798: Add test.support.check_syntax_warning(). (#11895)Serhiy Storchaka2019-02-193-52/+43
| | | | | | | It checks that a SyntaxWarning is raised when compile specified statement, that it is raised only once, that it is converted to a SyntaxError when raised as exception, and that both warning and exception objects have corresponding attributes.
* bpo-35689: IDLE: Add docstrings and unittests for colorizer.py (GH-11472)Cheryl Sabella2019-02-193-16/+407
|
* bpo-34572: change _pickle unpickling to use import rather than retrieving ↵tjb9002019-02-181-1/+66
| | | | | from sys.modules (GH-9047) Fix C implementation of pickle.loads to use importlib's locking mechanisms, and thereby avoid using partially-loaded modules.
* bpo-34294: re module, fix wrong capturing groups in rare cases. (GH-11546)animalize2019-02-181-0/+34
| | | | | | Need to reset capturing groups between two SRE(match) callings in loops, this fixes wrong capturing groups in rare cases. Also add a missing index in re.rst.
* bpo-35704: Prevent test_shutil fail result when AIX is 32-bit and MAXDATA < ↵Michael Felt2019-02-181-0/+13
| | | | | 0x20000000 (GH-11500) https://bugs.python.org/issue35704
* bpo-35942: Improve the error message if __fspath__ returns invalid types in ↵Pablo Galindo2019-02-181-1/+18
| | | | | path_converter (GH-11831) The error message emitted when returning invalid types from __fspath__ in interfaces that allow passing PathLike objects has been improved and now it does explain the origin of the error.