| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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>
|
|
|
|
|
| |
(cherry picked from commit 1a8de82d3a30ecc7ed18a5ad51a0e17417ebfb89)
Co-authored-by: Ashwin Vishnu <9155111+ashwinvis@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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>
|
|
|
|
|
| |
(cherry picked from commit 98d90f745d35d5d07bffcb46788b50e05eea56c6)
Co-authored-by: Christian Heimes <christian@python.org>
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
| |
(cherry picked from commit 75e064962ee0e31ec19a8081e9d9cc957baf6415)
Co-authored-by: Steve Dower <steve.dower@python.org>
|
|
|
| |
(cherry picked from commit 66a34d35e4c97da9840a29ba9fba76721021c463)
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
(cherry picked from commit 4f9ffc9d1a6a293563deaaaaf4a13331302219b4)
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
|
|
|
|
|
|
|
|
| |
* bpo-33821: Update IDLE section of What's New 3.7
* Fix roles.
(cherry picked from commit 5982b7201b84bfd24a1c2b2836401afee1cad8a7)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|
|
|
|
|
|
|
|
| |
* bpo-33822: Add IDLE section of What's New 3.8
* Fix role.
(cherry picked from commit a72ca90eb9f13ee2abc7e19b669974d2d0b3d63e)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|
|
|
|
|
|
|
| |
(GH-14845)
(cherry picked from commit 84846b0187919551b1b08dca447658bbbbb710b1)
Co-authored-by: Jake Tesler <jake.tesler@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 7123ea009b0b004062d91f69859bddf422c34ab4)
Co-authored-by: Tal Einat <taleinat@gmail.com>
|
|
|
|
|
|
|
| |
The distutils bdist_wininst command is now deprecated, use
bdist_wheel (wheel packages) instead.
(cherry picked from commit 1da4462765b084dfa8d869b6cb5855e8f6014a11)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
|
|
|
|
| |
(cherry picked from commit ec6c1bd0491590f3c0e2908a7b2dfb91b6acdae9)
Co-authored-by: Pierre Glaser <pierreglaser@msn.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The os.getcwdb() function now uses the UTF-8 encoding on Windows,
rather than the ANSI code page: see PEP 529 for the rationale. The
function is no longer deprecated on Windows.
os.getcwd() and os.getcwdb() now detect integer overflow on memory
allocations. On Unix, these functions properly report MemoryError on
memory allocation failure.
(cherry picked from commit 689830ee6243126798a6c519c05aa11ba73db7cd)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
|
|
|
|
| |
(cherry picked from commit de9b606c90c16cea2780948431bb24e50cc5cd99)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
|
|
|
|
|
|
| |
(GH-14319)
(cherry picked from commit b51b7137faa22e12c570c70fe0462c662ccd935e)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
| |
|
|
|
|
|
| |
Fix bpo number of PyByteArray_Init removal
(cherry picked from commit c68e3fb15d29607a1af2c19ebec552a87c24cb48)
|
|
|
|
|
|
|
| |
* Mention issue in which ByByteArray_Init() has been removed.
* Fix typo
(cherry picked from commit af41c567af81de7c4408e2e2617f1d3747408434)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-14214) (GH-14215)
I didn't find any entries in the docs about these functions, so I just mentioned them, in "What's New".
(cherry picked from commit 47c2de7725025341318860b9a2601ba7013d27a9)
Co-authored-by: Ivan Levkivskyi <levkivskyi@gmail.com>
https://bugs.python.org/issue33416
|
|
|
|
|
| |
(cherry picked from commit c879ff247ae1b67a790ff98d2d59145302cd4e4e)
Co-authored-by: Antoine Pitrou <antoine@python.org>
|
|
|
|
|
| |
(cherry picked from commit 7efc526e5cfb929a79c192ac2dcf7eb78d3a4401)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
|
|
|
|
| |
(cherry picked from commit bd5798f6d4f6960fd6b49976bdf4326be77f4277)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
|
|
|
|
|
|
|
|
| |
(GH-14038)
* Update PyCompilerFlags structure documentation.
* Document the new cf_feature_version field in the Changes in the C
API section of the What's New in Python 3.8 doc.
(cherry picked from commit 2c9b498759f4fc74da82a0a96d059d666fa73f16)
|
|
|
|
|
| |
(cherry picked from commit b9438ceb20635b00f10615c5b6d8dbe56e1d486b)
Co-authored-by: Nick Coghlan <ncoghlan@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
(GH-13993)
(A single int is still allowed, but undocumented.)
https://bugs.python.org/issue35766
(cherry picked from commit 10b55c1643b512b3a2cae8ab89c53683a13ca43e)
Co-authored-by: Guido van Rossum <guido@python.org>
|
|
|
|
|
| |
(cherry picked from commit 9b33ce48a7846dbdad32d4f8936b08e6b78a2faf)
Co-authored-by: Guido van Rossum <guido@python.org>
|
| |
|
|
|
|
|
|
| |
What's new now mentions SSLContext.hostname_checks_common_name instead of SSLContext.host_flags.
https://bugs.python.org/issue36868
|
|
|
|
| |
* Credit myself and others.
* Complete asyncio changes.
|
|
|
|
|
|
| |
This patch implements per opcode cache mechanism, and use it in
only LOAD_GLOBAL opcode.
Based on Yury's opcache3.patch in bpo-26219.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
arguments in the code object (GH-13726)
|
| |
|
| |
|
| |
|
|
|
|
| |
...and avoid using it on Solaris as it can raise EINVAL if offset is equal or bigger than the size of the file
|
|
|
|
| |
if_nameindex() on Windows (GH-13522)
|
|
|
|
|
|
|
|
| |
(GH-4944)
It is now allowed to add new fields at the end of the PyTypeObject struct without having to allocate a dedicated compatibility flag in tp_flags.
This will reduce the risk of running out of bits in the 32-bit tp_flags value.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-26836: Add os.memfd_create()
* Use the glibc wrapper for memfd_create()
Co-Authored-By: Christian Heimes <christian@python.org>
* Fix deletions caused by autoreconf.
* Use MFD_CLOEXEC as the default value for *flags*.
* Add memset_s to configure.ac.
* Revert memset_s changes.
* Apply the requested changes.
* Tweak the docs.
|
| |
|
|
|
|
|
|
|
|
| |
Original Pr was reformed and news not updated.
https://bugs.python.org/issue36933
|