As described in Doc/c-api/init.rst, PyEval_InitThreads() cannot be called
before Py_Initialize() function.
(cherry picked from commit 9e61066355)
Co-authored-by: Kenta Murata <mrkn@users.noreply.github.com>
feed_eof(), feed_data(), set_exception(), and set_transport() are prefixed with underscore now.
https://bugs.python.org/issue38066
(cherry picked from commit 12c122ae95)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
Update the docs as patch can now return an AsyncMock if the patched
object is an async function.
(cherry picked from commit f5e7f39d29)
Co-authored-by: Mario Corchero <mcorcherojim@bloomberg.net>
This PR deprecate explicit loop parameters in all public asyncio APIs
This issues is split to be easier to review.
fourth step: queue.py
https://bugs.python.org/issue36373
(cherry picked from commit 9008be303a)
Co-authored-by: Emmanuel Arias <emmanuelarias30@gmail.com>
This PR deprecate explicit loop parameters in all public asyncio APIs
This issues is split to be easier to review.
Third step: locks.py
https://bugs.python.org/issue36373
(cherry picked from commit 537877d85d)
Co-authored-by: Emmanuel Arias <emmanuelarias30@gmail.com>
Accumulate certificates in a set instead of doing a costly list contain
operation. A Windows cert store can easily contain over hundred
certificates. The old code would result in way over 5,000 comparison
operations
Signed-off-by: Christian Heimes <christian@python.org>
* bpo-351428: Updates documentation to reflect AsyncMock call_count after await.
* Adds skip and fixes warning.
* Removes extra >>>.
* Adds ... in front of await mock().
(cherry picked from commit b9f65f01fd)
Co-authored-by: Lisa Roach <lisaroach14@gmail.com>
This only happened when initializing the subprocess to run a module.
This recent bug only affected 3.7.4 and 3.8.0b2 to 3.8.0b4.
(cherry picked from commit c59295a1ca)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
The "A4" pdfs were previously the wrong size due to a change in the options in Sphinx 1.5.
See also sphinx-doc/sphinxGH-5235
(cherry picked from commit b5381f6697)
Authored-by: Jean-François B <jfbu@free.fr>
The link we have points to the version from Unicode 6.0.0, dated 2010.
There have been numerous updates to it since then:
https://www.unicode.org/reports/tr44/GH-Modifications
Change the link to one that points to the current version. Also, use HTTPS.
(cherry picked from commit 64c6ac74e2)
Co-authored-by: Greg Price <gnprice@gmail.com>
In debug mode, visit_decref() now calls _PyObject_IsFreed() to ensure
that the object is not freed. If it's freed, the program fails with
an assertion error and Python dumps informations about the freed
object.
(cherry picked from commit d91d4de317)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
weakref.WeakValueDictionary defines a local remove() function used as
callback for weak references. This function was created with a
closure. Modify the implementation to avoid the closure.
(cherry picked from commit a2af05a0d3)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
The Rot-13 codec is for educational use but does not have unit tests,
dragging down test coverage. This adds a few very simple tests.
(cherry picked from commit b3b48c81f0)
Co-authored-by: Zeth <theology@gmail.com>
Constants added by the site module like exit() "should not be used in programs"
(cherry picked from commit e3c59a7527)
Co-authored-by: Alan Yee <alanyee@users.noreply.github.com>
* bpo-34596: Fallback to a default reason when @unittest.skip is uncalled
* Change default reason to empty string
* Fix rst formatting of NEWS entry
(cherry picked from commit d5fd75c53f)
Co-authored-by: Naitree Zhu <Naitreey@gmail.com>
ssl_collect_certificates function in _ssl.c has a memory leak.
Calling CertOpenStore() and CertAddStoreToCollection(), a store's refcnt gets incremented by 2.
But CertCloseStore() is called only once and the refcnt leaves 1.
The missing dependencies prevented incremental builds from working when you touched any
of these files. Based on GH-14758 by @vemakereporter.
(cherry picked from commit b4612f5d54)
Co-authored-by: T. Wouters <thomas@python.org>
winerror_to_errno() is no longer automatically generated.
Do not rely on the old _dosmapperr() function.
Add ERROR_NO_UNICODE_TRANSLATION (1113) -> EILSEQ.
(cherry picked from commit 19052a1131)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
There were about 14 files that are actually in the repo but that are
covered by the rules in .gitignore.
Git itself takes no notice of what .gitignore says about files that
it's already tracking... but the discrepancy can be confusing to a
human that adds a new file unexpectedly covered by these rules, as
well as to non-Git software that looks at .gitignore but doesn't
implement this wrinkle in its semantics. (E.g., `rg`.)
Several of these are from rules that apply more broadly than
intended: for example, `Makefile` applies to `Doc/Makefile` and
`Tools/freeze/test/Makefile`, whereas `/Makefile` means only the
`Makefile` at the repo's root.
And the `Modules/Setup` rule simply wasn't updated after 961d54c5c.
https://bugs.python.org/issue37936
(cherry picked from commit 5e5e951502)
Co-authored-by: Greg Price <gnprice@gmail.com>
The gdb manual[1] says the following for "document":
The command commandname must already be defined.
[1] https://sourceware.org/gdb/current/onlinedocs/gdb/Define.html
And indeed when trying to use the gdbinit file with gdb 8.3, I get:
.../cpython/Misc/gdbinit:17: Error in sourced command file:
Undefined command: "pyo". Try "help".
Fix this by moving all documentation blocks after the define blocks.
This was introduced in GH-6384.
(cherry picked from commit 1f86fdcfc5)
Authored-by: Florian Bruhin <me@the-compiler.org>
If FormatMessageW() is passed the FORMAT_MESSAGE_FROM_SYSTEM flag without FORMAT_MESSAGE_IGNORE_INSERTS, it will fail if there are insert sequences in the message definition.
(cherry picked from commit a6563650c8)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>