summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
Commit message (Collapse)AuthorAgeFilesLines
* [3.8] bpo-43285: Whats New entry for 3.8.9. (GH-24889)Gregory P. Smith2021-03-161-0/+9
| | | Covers the ftplib security fix.
* [3.8] bpo-42967: only use '&' as a query string separator (GH-24297) (#24529)Senthil Kumaran2021-02-153-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bpo-42967: only use '&' as a query string separator (#24297) bpo-42967: [security] Address a web cache-poisoning issue reported in urllib.parse.parse_qsl(). urllib.parse will only us "&" as query string separator by default instead of both ";" and "&" as allowed in earlier versions. An optional argument seperator with default value "&" is added to specify the separator. Co-authored-by: Éric Araujo <merwok@netwok.org> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Co-authored-by: Éric Araujo <merwok@netwok.org> (cherry picked from commit fcbe0cb04d35189401c0c880ebfb4311e952d776) * [3.8] bpo-42967: only use '&' as a query string separator (GH-24297) bpo-42967: [security] Address a web cache-poisoning issue reported in urllib.parse.parse_qsl(). urllib.parse will only us "&" as query string separator by default instead of both ";" and "&" as allowed in earlier versions. An optional argument seperator with default value "&" is added to specify the separator. Co-authored-by: Éric Araujo <merwok@netwok.org> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Co-authored-by: Éric Araujo <merwok@netwok.org>. (cherry picked from commit fcbe0cb04d35189401c0c880ebfb4311e952d776) Co-authored-by: Adam Goldschmidt <adamgold7@gmail.com> * Update correct version information. * fix docs and make logic clearer Co-authored-by: Adam Goldschmidt <adamgold7@gmail.com> Co-authored-by: Fidget-Spinner <28750310+Fidget-Spinner@users.noreply.github.com>
* bpo-37221: PyCode_New() didn't change in Python 3.8 (GH-23595)Miss Islington (bot)2020-12-011-3/+0
| | | | | (cherry picked from commit 1867b462de427bcb8dfbcd256028410aea6ae929) Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-33822: Update IDLE section of What's New 3.8 (GH-22383)Miss Islington (bot)2020-09-231-0/+10
| | | | | (cherry picked from commit 9c4eac7f02ddcf32fc1cdaf7c08c37fe9718c1fb) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* [3.8] Remove duplicated words words (GH-20413). (GH-22297)Serhiy Storchaka2020-09-181-1/+1
| | | | (cherry picked from commit 1c5d1d7304a119040fd3118128bdb412f0cce6a6)
* bpo-40204: Allow pre-Sphinx 3 syntax in the doc (GH-21844) (GH-21901) (GH-21928)Victor Stinner2020-08-205-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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) (cherry picked from commit 8f88190af529543c84d5dc78f19abbfd73335cf4)
* bpo-41475: Fix note in "What's new in 3.7" (GH-21733) (GH-21833)Miss Islington (bot)2020-08-121-1/+1
| | | | | (cherry picked from commit 76643c10ede2813ca921464fe839e81caee21a84) Co-authored-by: Ram Rachum <ram@rachum.com>
* bpo-32528: Document the change in inheritance of asyncio.CancelledError ↵Miss Islington (bot)2020-07-191-2/+4
| | | | | | | | | | | | (GH-21474) GH-msg373510 [bpo-32528]()/GH-13528 changed `asyncio.CancelledError` such that it no longer inherits from `concurrent.futures.CancelledError`. As this affects existing code, specifically when catching the latter instead of the former in exception handling, it should be documented in the "What's new in 3.8?" document. Automerge-Triggered-By: @1st1 (cherry picked from commit 2a5181829af394b82e8e8c917183c709ee72a2b7) Co-authored-by: JustAnotherArchivist <JustAnotherArchivist@users.noreply.github.com>
* bpo-39699: Remove accidentally committed test change (GH-21089)Ammar Askar2020-06-231-2/+0
|
* bpo-39562: Correctly updated the version section in the what's new document ↵Pablo Galindo2020-05-011-0/+3
| | | | (GH-19838)
* [3.8] bpo-39562: Prevent collision of future and compiler flags (GH-19230) ↵Pablo Galindo2020-05-011-0/+5
| | | | | | | | | | | (GH-19835) The constant values of future flags in the __future__ module is updated in order to prevent collision with compiler flags. Previously PyCF_ALLOW_TOP_LEVEL_AWAIT was clashing with CO_FUTURE_DIVISION.. (cherry picked from commit 4454057269b995341b04d13f0bf97f96080f27d0) Co-authored-by: Batuhan Taşkaya <batuhanosmantaskaya@gmail.com>
* bpo-40197: Better describe the benchmark results table (GH-19386)Miss Islington (bot)2020-04-101-1/+7
| | | | | (cherry picked from commit c63629e7c09da80a6b7d0253d04a9b3f57f88eff) Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
* bpo-38237: Use divmod for positional arguments whatsnew example (GH-19171)Miss Islington (bot)2020-03-271-5/+4
| | | | | (cherry picked from commit 5a58c5280b8df4ca5d6a19892b24fff96e9ea868) Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
* bpo-39699: Don't silence make on Azure and Github CIs (GH-18583)Steve Dower2020-02-261-0/+2
| | | | Co-authored-by: Ammar Askar <ammar_askar@hotmail.com>
* bpo-32892: Update the documentation for handling constants in AST. (GH-18514)Miss Islington (bot)2020-02-171-0/+6
| | | | | (cherry picked from commit 85a2eef473a2c9ed3ab9c6ee339891fe99adbbc9) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-39545: Document changes in the support of await in f-strings. (GH-18456)Miss Islington (bot)2020-02-141-0/+5
| | | | | | https://bugs.python.org/issue39545 (cherry picked from commit f632736023502816f2e6bd714d1b48c81aa2ccc1) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* Fix MinGW library generation command (GH-17917)Miss Islington (bot)2020-02-061-1/+1
| | | | | | | | To print the exports to stdout, the gendef command requires the option "-". Without this option, no output is generated. (cherry picked from commit 2545fa87628b4caca519da8aeb0eeef368b9dc0d) Co-authored-by: Baljak <baljci@hotmail.com>
* [3.8] bpo-39390 shutil: fix argument types for ignore callback (GH-18122)mbarkhau2020-01-271-0/+7
|
* Update 3.8.rst (GH-18173) (#18182)Miss Islington (bot)2020-01-251-1/+1
| | | | | | | | Fixed the name of the contributor (@selik). (cherry picked from commit 9bfb4a7061a3bc4fc5632bccfdf9ed61f62679f7) Co-authored-by: fireattack <human.peng@gmail.com>
* [3.8] Add whatsnew for removal of asyncio.loop.create_datagram_endpoint()'s ↵Kyle Stanley2019-12-173-0/+30
| | | | | | | *reuse_address* parameter (GH-17595). (#17630) (cherry picked from commit f501db2b93a9d3d840b6fb38d6bdda8bcc400d4a) Co-authored-by: Kyle Stanley <aeros167@gmail.com>
* [3.8] bpo-38738: Fix formatting of True and False. (GH-17083) (GH-17125)Serhiy Storchaka2019-11-121-4/+4
| | | | | | | | | | * "Return true/false" is replaced with "Return ``True``/``False``" if the function actually returns a bool. * Fixed formatting of some True and False literals (now in monospace). * Replaced "True/False" with "true/false" if it can be not only bool. * Replaced some 1/0 with True/False if it corresponds the code. * "Returns <bool>" is replaced with "Return <bool>". (cherry picked from commit 138ccbb02216ca086047c3139857fb44f3dab1f9)
* bpo-37759: Show output from var_access_benchmark (GH-17040) (GH-17041)Miss Skeleton (bot)2019-11-041-3/+52
| | | | | (cherry picked from commit 1cdadf414b9934bba9294efa1f4b8d97eef08434) Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
* [3.8] bpo-38600: NULL -> ``NULL``. (GH-17001) (GH-17003)Serhiy Storchaka2019-10-302-2/+2
| | | | | Also fix some other formatting. (cherry picked from commit e835b31d2b212c3c7820364398979cae2a9740b2)
* [3.8] bpo-38600: Change the mark up of NULL in the C API documentation. ↵Serhiy Storchaka2019-10-302-2/+2
| | | | | | | (GH-16950) (GH-16999) Replace all *NULL* with ``NULL``. (cherry picked from commit 25fc088607c855060ed142296dc1bd0125fad1af)
* Fix asyncio.wait() 3.8 whatsnew entry (GH-16975)Miss Skeleton (bot)2019-10-291-1/+2
| | | | | (cherry picked from commit 457306bddbc0021396504b7349fe0c322b65f7a7) Co-authored-by: Kyle Stanley <aeros167@gmail.com>
* bpo-38534: Replace wrong KB number references (GH-16955)Miss Skeleton (bot)2019-10-281-1/+1
| | | | | (cherry picked from commit 794616f837c254c68d8384ab48fb78123a3c8a8b) Co-authored-by: benedwards14 <53377856+benedwards14@users.noreply.github.com>
* Add missing asyncio changes from 3.8 whatsnew (GH-16911)Miss Skeleton (bot)2019-10-241-10/+85
| | | | | (cherry picked from commit 3bbb6db545eff73ba4031bd9b8f2ef71b84c906e) Co-authored-by: Kyle Stanley <aeros167@gmail.com>
* bpo-37759: More updates to Whatsnew 3.8 (GH-16854) (GH-16867)Miss Islington (bot)2019-10-201-26/+183
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * math.perm() and math.comb() * math.isqrt() * Add singledispatchmethod() * itertools.accumulate() * Optional headers for xmlrpc.client.ServerProxy * IDLE non-BMP characters * import collections.abc directly * @coroutine is deprecated * pprint.pp() * New options for object.__reduce__() * DictReader no longer returns OrderedDicts * "force" option for logging.basicConfig() * Fix spelling * cProfile context manager * Various markup/grammar fixes from Kyle Stanley. Other minor fixes as well. Also, dedup the __reduce__ entry. * Fix markup * Fix grammar nits found by MS Word (cherry picked from commit c93883c6afbd99929516764263fc49c3e996b10a) Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
* Fix minor typos in What's New in Python 3.8. (GH-16770)Miss Islington (bot)2019-10-181-4/+4
| | | | | | Added periods at the end of the sentences. (cherry picked from commit b1fa72a5b7e8666a40b6899d5d54778a2a42c3e8) Co-authored-by: Jero Bado <tokidokitalkyou@gmail.com>
* Doc: Add missing entry for functools.cached_property (GH-16803)Miss Islington (bot)2019-10-181-0/+16
| | | | | (cherry picked from commit 93b81e1fcbeb61c1b49ac2fa52c5a0dff929940b) Co-authored-by: Stéphane Wirtel <stephane@wirtel.be>
* Merge tag 'v3.8.0' into 3.8Łukasz Langa2019-10-141-0/+2
|\ | | | | | | Python 3.8.0
| * v3.8.0v3.8.0Łukasz Langa2019-10-141-0/+2
| |
* | Remove draft status. Add asyncio REPL example (GH-16785) (GH-16786)Miss Islington (bot)2019-10-141-8/+29
|/ | | | | (cherry picked from commit 274bd013da707f9fb4a6f9e531fdc4288a9dd1ca) Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
* [3.8] bpo-37759: Polish What's New in Python 3.8. (GH-16769) (#16777)Łukasz Langa2019-10-141-88/+123
| | | | | (cherry picked from commit 298439ce3fb01de6c3110cc4847e6afe3253ba7a) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-37759: Add examples for the new typing features (GH-16763) (GH-16764)Miss Islington (bot)2019-10-141-5/+21
| | | | | (cherry picked from commit a3291531ea51455cfa5989119db496267425323c) Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
* bpo-38461 and bpo-38463: Minor fixes to Whatsnew 3.8 (GH-16761) (GH-16762)Miss Islington (bot)2019-10-141-9/+10
| | | | | | | | * bpo-38461: ncurses misspelled as curses * bpo-38463: Fix broken link (cherry picked from commit 61a6db5e79921b89b9e2a154990f01f5f3150213) Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
* Fix minor typos in Whatsnew (GH-16759)Raymond Hettinger2019-10-141-12/+10
|
* Rebased version of what's new PR (GH-16745) (#16748)Miss Islington (bot)2019-10-131-83/+67
| | | | | | | | * Use Unicode character for accent * Various grammar fixes * Sort library modules alphabetically; remove duplicated idlelib/IDLE section (cherry picked from commit bb78f6cfa6f2b84fa4611d39c35baf1c7dce7f8d) Co-authored-by: Andrew Kuchling <amk@amk.ca>
* Announce the change in the CancelledError inheritance (GH-16730)Miss Islington (bot)2019-10-121-0/+4
| | | | | | | This is a fairly noticeable change that requires adjustments in existing asyncio code. It should therefore be announced. (cherry picked from commit e634da27471a76f4abe685e86e6e302e0ed6b553) Co-authored-by: Phil Jones <philip.graham.jones@googlemail.com>
* Fix typo in the "Porting to Python 3.8" section. (GH-16435)Miss Islington (bot)2019-10-111-1/+1
| | | | | (cherry picked from commit dd6117c6d7859fee57751593cd56f0862131de8b) Co-authored-by: bariod <35639254+bariod@users.noreply.github.com>
* bpo-26510: Add versionchanged for required arg of add_subparsers (GH-16588)Miss Islington (bot)2019-10-071-0/+4
| | | | | | | | | | The `required` argument to `argparse.add_subparsers` was added in GH-3027. This PR specifies the earliest version of Python where it is available. https://bugs.python.org/issue26510 Automerge-Triggered-By: @merwok (cherry picked from commit 9e71917e0290972f65711f75510078f799cf0b59) Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
* [3.8] bpo-38234: Backport init path config changes from master (GH-16423)Victor Stinner2019-09-261-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bpo-38234: Py_SetPath() uses the program full path (GH-16357) Py_SetPath() now sets sys.executable to the program full path (Py_GetProgramFullPath()), rather than to the program name (Py_GetProgramName()). Fix also memory leaks in pathconfig_set_from_config(). (cherry picked from commit 1ce152a42eaa917d7763bce93f1e1ca72530d7ca) * bpo-38234: Add tests for Python init path config (GH-16358) (cherry picked from commit bb6bf7d342b4503a6227fd209fac934905b6a1aa) * bpo-38234: test_embed: test pyvenv.cfg and pybuilddir.txt (GH-16366) Add test_init_pybuilddir() and test_init_pyvenv_cfg() to test_embed to test pyvenv.cfg and pybuilddir.txt configuration files. Fix sysconfig._generate_posix_vars(): pybuilddir.txt uses UTF-8 encoding, not ASCII. (cherry picked from commit 52ad33abbfb6637d74932617c7013bae0ccf6e32) * bpo-38234: Cleanup getpath.c (GH-16367) * search_for_prefix() directly calls reduce() if found is greater than 0. * Add calculate_pybuilddir() subfunction. * search_for_prefix(): add path string buffer for readability. * Fix some error handling code paths: release resources on error. * calculate_read_pyenv(): rename tmpbuffer to filename. * test.pythoninfo now also logs windows.dll_path (cherry picked from commit 221fd84703c545408bbb4a6e0b58459651331f5c) * bpo-38234: Fix test_embed pathconfig tests (GH-16390) bpo-38234: On macOS and FreeBSD, the temporary directory can be symbolic link. For example, /tmp can be a symbolic link to /var/tmp. Call realpath() to resolve all symbolic links. (cherry picked from commit 00508a7407d7d300b487532e2271534b20e378a7) * bpo-38234: Add test_init_setpath_config() to test_embed (GH-16402) * Add test_embed.test_init_setpath_config(): test Py_SetPath() with PyConfig. * test_init_setpath() and test_init_setpythonhome() no longer call Py_SetProgramName(), but use the default program name. * _PyPathConfig: isolated, site_import and base_executable fields are now only available on Windows. * If executable is set explicitly in the configuration, ignore calculated base_executable: _PyConfig_InitPathConfig() copies executable to base_executable. * Complete path config documentation. (cherry picked from commit 8bf39b606ef7b02c0279a80789f3c4824b0da5e9) * bpo-38234: Complete init config documentation (GH-16404) (cherry picked from commit 88feaecd46a8f427e30ef7ad8cfcddfe392a2402) * bpo-38234: Fix test_embed.test_init_setpath_config() on FreeBSD (GH-16406) Explicitly preinitializes with a Python preconfiguration to avoid Py_SetPath() implicit preinitialization with a compat preconfiguration. Fix also test_init_setpath() and test_init_setpythonhome() on macOS: use self.test_exe as the executable (and base_executable), rather than shutil.which('python3'). (cherry picked from commit 49d99f01e6e51acec5ca57a02e857f0796bc418b) * bpo-38234: Py_Initialize() sets global path configuration (GH-16421) * Py_InitializeFromConfig() now writes PyConfig path configuration to the global path configuration (_Py_path_config). * Add test_embed.test_get_pathconfig(). * Fix typo in _PyWideStringList_Join(). (cherry picked from commit 12f2f177fc483723406d7917194e7f655a20631b)
* bpo-38096: Clean up the "struct sequence" / "named tuple" docs (GH-15895) ↵Paul Ganssle2019-09-122-3/+3
| | | | (GH-15961)
* bpo-35224: Additional documentation for Assignment Expressions (GH-15935) ↵Miss Islington (bot)2019-09-111-2/+0
| | | | | | | | | | | | | | | (GH-15967) Add or update assignment expression documentation for: - FAQ - Design - Reference - Expressions - Reference - Lexical Analysis https://bugs.python.org/issue35224 Automerge-Triggered-By: @matrixise (cherry picked from commit 6357c95716d89ac1f80587fbc4133df8d2e8396c) Co-authored-by: Emily Morehouse <emily@cuttlesoft.com>
* Doc: Indicate locations of parse_qs, parse_qsl, escape (GH-14828)Miss Islington (bot)2019-09-111-1/+2
| | | | | | | Since they have been removed from cgi it's useful to remind people where they can be found instead. (cherry picked from commit 1abf54336fd2cb545c453d22dd5501392b3350b2) Co-authored-by: Simon Willison <swillison@gmail.com>
* bpo-32972: Document IsolatedAsyncioTestCase of unittest module (GH-15878) ↵Miss Islington (bot)2019-09-111-0/+26
| | | | | | | | | | | | | (GH-15918) * Document `unittest.IsolatedAsyncioTestCase` API * Add a simple example with respect to order of evaluation of setup and teardown calls. https://bugs.python.org/issue32972 Automerge-Triggered-By: @asvetlov (cherry picked from commit 6a9fd66f6e4445a418c43c92585b9e06d76df4b1) Co-authored-by: Xtreak <tir.karthi@gmail.com>
* Fix typo in math.prod example (GH-15614)Miss Islington (bot)2019-09-091-1/+1
| | | | | (cherry picked from commit 1a8de82d3a30ecc7ed18a5ad51a0e17417ebfb89) Co-authored-by: Ashwin Vishnu <9155111+ashwinvis@users.noreply.github.com>
* closes bpo-37966: Fully implement the UAX GH-15 quick-check algorithm. ↵Miss Islington (bot)2019-09-041-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (GH-15558) The purpose of the `unicodedata.is_normalized` function is to answer the question `str == unicodedata.normalized(form, str)` more efficiently than writing just that, by using the "quick check" optimization described in the Unicode standard in UAX GH-15. However, it turns out the code doesn't implement the full algorithm from the standard, and as a result we often miss the optimization and end up having to compute the whole normalized string after all. Implement the standard's algorithm. This greatly speeds up `unicodedata.is_normalized` in many cases where our partial variant of quick-check had been returning MAYBE and the standard algorithm returns NO. At a quick test on my desktop, the existing code takes about 4.4 ms/MB (so 4.4 ns per byte) when the partial quick-check returns MAYBE and it has to do the slow normalize-and-compare: $ build.base/python -m timeit -s 'import unicodedata; s = "\uf900"*500000' \ -- 'unicodedata.is_normalized("NFD", s)' 50 loops, best of 5: 4.39 msec per loop With this patch, it gets the answer instantly (58 ns) on the same 1 MB string: $ build.dev/python -m timeit -s 'import unicodedata; s = "\uf900"*500000' \ -- 'unicodedata.is_normalized("NFD", s)' 5000000 loops, best of 5: 58.2 nsec per loop This restores a small optimization that the original version of this code had for the `unicodedata.normalize` use case. With this, that case is actually faster than in master! $ build.base/python -m timeit -s 'import unicodedata; s = "\u0338"*500000' \ -- 'unicodedata.normalize("NFD", s)' 500 loops, best of 5: 561 usec per loop $ build.dev/python -m timeit -s 'import unicodedata; s = "\u0338"*500000' \ -- 'unicodedata.normalize("NFD", s)' 500 loops, best of 5: 512 usec per loop (cherry picked from commit 2f09413947d1ce0043de62ed2346f9a2b4e5880b) Co-authored-by: Greg Price <gnprice@gmail.com>
* bpo-37951: Lift subprocess's fork() restriction (GH-15544)Miss Islington (bot)2019-08-271-0/+6
| | | | | (cherry picked from commit 98d90f745d35d5d07bffcb46788b50e05eea56c6) Co-authored-by: Christian Heimes <christian@python.org>
* [3.8] bpo-36917: Add default implementation of ↵Miss Islington (bot)2019-08-261-0/+7
| | | | | | | | ast.NodeVisitor.visit_Constant(). (GH-15490) (GH-15509) It emits a deprecation warning and calls corresponding method visit_Num(), visit_Str(), etc. (cherry picked from commit c3ea41e9bf100a5396b851488c3efe208e5e2179)