Python-checkins
Threads by month
- ----- 2025 -----
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
February 2020
- 1 participants
- 315 discussions
12 Feb '20
https://github.com/python/cpython/commit/e6be9b59a911626d6597fe148c32f0342b…
commit: e6be9b59a911626d6597fe148c32f0342bd2bd24
branch: master
author: Andy Lester <andy(a)petdance.com>
committer: GitHub <noreply(a)github.com>
date: 2020-02-11T18:28:35-08:00
summary:
closes bpo-39605: Fix some casts to not cast away const. (GH-18453)
gcc -Wcast-qual turns up a number of instances of casting away constness of pointers. Some of these can be safely modified, by either:
Adding the const to the type cast, as in:
- return _PyUnicode_FromUCS1((unsigned char*)s, size);
+ return _PyUnicode_FromUCS1((const unsigned char*)s, size);
or, Removing the cast entirely, because it's not necessary (but probably was at one time), as in:
- PyDTrace_FUNCTION_ENTRY((char *)filename, (char *)funcname, lineno);
+ PyDTrace_FUNCTION_ENTRY(filename, funcname, lineno);
These changes will not change code, but they will make it much easier to check for errors in consts
files:
M Modules/_io/textio.c
M Objects/bytes_methods.c
M Objects/memoryobject.c
M Objects/stringlib/asciilib.h
M Objects/stringlib/codecs.h
M Objects/stringlib/find_max_char.h
M Objects/unicodeobject.c
M Python/ceval.c
M Python/marshal.c
M Python/pyhash.c
M Python/sysmodule.c
diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c
index 1d45c7ae2fab9..3a9ce93a5eb5e 100644
--- a/Modules/_io/textio.c
+++ b/Modules/_io/textio.c
@@ -2025,7 +2025,7 @@ find_control_char(int kind, const char *s, const char *end, Py_UCS4 ch)
{
if (kind == PyUnicode_1BYTE_KIND) {
assert(ch < 256);
- return (char *) memchr((void *) s, (char) ch, end - s);
+ return (char *) memchr((const void *) s, (char) ch, end - s);
}
for (;;) {
while (PyUnicode_READ(kind, s, 0) > ch)
@@ -2043,7 +2043,7 @@ _PyIO_find_line_ending(
int translated, int universal, PyObject *readnl,
int kind, const char *start, const char *end, Py_ssize_t *consumed)
{
- Py_ssize_t len = ((char*)end - (char*)start)/kind;
+ Py_ssize_t len = (end - start)/kind;
if (translated) {
/* Newlines are already translated, only search for \n */
diff --git a/Objects/bytes_methods.c b/Objects/bytes_methods.c
index 7d13184205922..db030be4fe756 100644
--- a/Objects/bytes_methods.c
+++ b/Objects/bytes_methods.c
@@ -12,7 +12,7 @@ PyObject*
_Py_bytes_isspace(const char *cptr, Py_ssize_t len)
{
const unsigned char *p
- = (unsigned char *) cptr;
+ = (const unsigned char *) cptr;
const unsigned char *e;
/* Shortcut for single character strings */
@@ -42,7 +42,7 @@ PyObject*
_Py_bytes_isalpha(const char *cptr, Py_ssize_t len)
{
const unsigned char *p
- = (unsigned char *) cptr;
+ = (const unsigned char *) cptr;
const unsigned char *e;
/* Shortcut for single character strings */
@@ -72,7 +72,7 @@ PyObject*
_Py_bytes_isalnum(const char *cptr, Py_ssize_t len)
{
const unsigned char *p
- = (unsigned char *) cptr;
+ = (const unsigned char *) cptr;
const unsigned char *e;
/* Shortcut for single character strings */
@@ -123,7 +123,7 @@ _Py_bytes_isascii(const char *cptr, Py_ssize_t len)
/* Help allocation */
const char *_p = p;
while (_p < aligned_end) {
- unsigned long value = *(unsigned long *) _p;
+ unsigned long value = *(const unsigned long *) _p;
if (value & ASCII_CHAR_MASK) {
Py_RETURN_FALSE;
}
@@ -154,7 +154,7 @@ PyObject*
_Py_bytes_isdigit(const char *cptr, Py_ssize_t len)
{
const unsigned char *p
- = (unsigned char *) cptr;
+ = (const unsigned char *) cptr;
const unsigned char *e;
/* Shortcut for single character strings */
@@ -184,7 +184,7 @@ PyObject*
_Py_bytes_islower(const char *cptr, Py_ssize_t len)
{
const unsigned char *p
- = (unsigned char *) cptr;
+ = (const unsigned char *) cptr;
const unsigned char *e;
int cased;
@@ -218,7 +218,7 @@ PyObject*
_Py_bytes_isupper(const char *cptr, Py_ssize_t len)
{
const unsigned char *p
- = (unsigned char *) cptr;
+ = (const unsigned char *) cptr;
const unsigned char *e;
int cased;
@@ -254,7 +254,7 @@ PyObject*
_Py_bytes_istitle(const char *cptr, Py_ssize_t len)
{
const unsigned char *p
- = (unsigned char *) cptr;
+ = (const unsigned char *) cptr;
const unsigned char *e;
int cased, previous_is_cased;
diff --git a/Objects/memoryobject.c b/Objects/memoryobject.c
index 906d1cef69b1f..6887c4335f1f1 100644
--- a/Objects/memoryobject.c
+++ b/Objects/memoryobject.c
@@ -1682,8 +1682,8 @@ unpack_single(const char *ptr, const char *fmt)
switch (fmt[0]) {
/* signed integers and fast path for 'B' */
- case 'B': uc = *((unsigned char *)ptr); goto convert_uc;
- case 'b': ld = *((signed char *)ptr); goto convert_ld;
+ case 'B': uc = *((const unsigned char *)ptr); goto convert_uc;
+ case 'b': ld = *((const signed char *)ptr); goto convert_ld;
case 'h': UNPACK_SINGLE(ld, ptr, short); goto convert_ld;
case 'i': UNPACK_SINGLE(ld, ptr, int); goto convert_ld;
case 'l': UNPACK_SINGLE(ld, ptr, long); goto convert_ld;
@@ -2684,8 +2684,8 @@ unpack_cmp(const char *p, const char *q, char fmt,
switch (fmt) {
/* signed integers and fast path for 'B' */
- case 'B': return *((unsigned char *)p) == *((unsigned char *)q);
- case 'b': return *((signed char *)p) == *((signed char *)q);
+ case 'B': return *((const unsigned char *)p) == *((const unsigned char *)q);
+ case 'b': return *((const signed char *)p) == *((const signed char *)q);
case 'h': CMP_SINGLE(p, q, short); return equal;
case 'i': CMP_SINGLE(p, q, int); return equal;
case 'l': CMP_SINGLE(p, q, long); return equal;
diff --git a/Objects/stringlib/asciilib.h b/Objects/stringlib/asciilib.h
index e95552624aa50..e69a2c076e3a3 100644
--- a/Objects/stringlib/asciilib.h
+++ b/Objects/stringlib/asciilib.h
@@ -18,7 +18,7 @@
#define STRINGLIB_TODECIMAL Py_UNICODE_TODECIMAL
#define STRINGLIB_STR PyUnicode_1BYTE_DATA
#define STRINGLIB_LEN PyUnicode_GET_LENGTH
-#define STRINGLIB_NEW(STR,LEN) _PyUnicode_FromASCII((char*)(STR),(LEN))
+#define STRINGLIB_NEW(STR,LEN) _PyUnicode_FromASCII((const char*)(STR),(LEN))
#define STRINGLIB_CHECK PyUnicode_Check
#define STRINGLIB_CHECK_EXACT PyUnicode_CheckExact
diff --git a/Objects/stringlib/codecs.h b/Objects/stringlib/codecs.h
index d6f2b98f2b30a..269a5581f7005 100644
--- a/Objects/stringlib/codecs.h
+++ b/Objects/stringlib/codecs.h
@@ -46,7 +46,7 @@ STRINGLIB(utf8_decode)(const char **inptr, const char *end,
/* Read a whole long at a time (either 4 or 8 bytes),
and do a fast unrolled copy if it only contains ASCII
characters. */
- unsigned long value = *(unsigned long *) _s;
+ unsigned long value = *(const unsigned long *) _s;
if (value & ASCII_CHAR_MASK)
break;
#if PY_LITTLE_ENDIAN
@@ -515,7 +515,7 @@ STRINGLIB(utf16_decode)(const unsigned char **inptr, const unsigned char *e,
/* Fast path for runs of in-range non-surrogate chars. */
const unsigned char *_q = q;
while (_q < aligned_end) {
- unsigned long block = * (unsigned long *) _q;
+ unsigned long block = * (const unsigned long *) _q;
if (native_ordering) {
/* Can use buffer directly */
if (block & FAST_CHAR_MASK)
diff --git a/Objects/stringlib/find_max_char.h b/Objects/stringlib/find_max_char.h
index 8ccbc3094463d..f4e0a7761d311 100644
--- a/Objects/stringlib/find_max_char.h
+++ b/Objects/stringlib/find_max_char.h
@@ -28,7 +28,7 @@ STRINGLIB(find_max_char)(const STRINGLIB_CHAR *begin, const STRINGLIB_CHAR *end)
/* Help register allocation */
const unsigned char *_p = p;
while (_p < aligned_end) {
- unsigned long value = *(unsigned long *) _p;
+ unsigned long value = *(const unsigned long *) _p;
if (value & UCS1_ASCII_CHAR_MASK)
return 255;
_p += SIZEOF_LONG;
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 68e4f6af1314d..fdc2ca6612cc5 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -172,8 +172,8 @@ extern "C" {
#define _PyUnicode_CONVERT_BYTES(from_type, to_type, begin, end, to) \
do { \
to_type *_to = (to_type *)(to); \
- const from_type *_iter = (from_type *)(begin); \
- const from_type *_end = (from_type *)(end); \
+ const from_type *_iter = (const from_type *)(begin);\
+ const from_type *_end = (const from_type *)(end);\
Py_ssize_t n = (_end) - (_iter); \
const from_type *_unrolled_end = \
_iter + _Py_SIZE_ROUND_DOWN(n, 4); \
@@ -964,21 +964,21 @@ findchar(const void *s, int kind,
if ((Py_UCS1) ch != ch)
return -1;
if (direction > 0)
- return ucs1lib_find_char((Py_UCS1 *) s, size, (Py_UCS1) ch);
+ return ucs1lib_find_char((const Py_UCS1 *) s, size, (Py_UCS1) ch);
else
- return ucs1lib_rfind_char((Py_UCS1 *) s, size, (Py_UCS1) ch);
+ return ucs1lib_rfind_char((const Py_UCS1 *) s, size, (Py_UCS1) ch);
case PyUnicode_2BYTE_KIND:
if ((Py_UCS2) ch != ch)
return -1;
if (direction > 0)
- return ucs2lib_find_char((Py_UCS2 *) s, size, (Py_UCS2) ch);
+ return ucs2lib_find_char((const Py_UCS2 *) s, size, (Py_UCS2) ch);
else
- return ucs2lib_rfind_char((Py_UCS2 *) s, size, (Py_UCS2) ch);
+ return ucs2lib_rfind_char((const Py_UCS2 *) s, size, (Py_UCS2) ch);
case PyUnicode_4BYTE_KIND:
if (direction > 0)
- return ucs4lib_find_char((Py_UCS4 *) s, size, ch);
+ return ucs4lib_find_char((const Py_UCS4 *) s, size, ch);
else
- return ucs4lib_rfind_char((Py_UCS4 *) s, size, ch);
+ return ucs4lib_rfind_char((const Py_UCS4 *) s, size, ch);
default:
Py_UNREACHABLE();
}
@@ -3420,7 +3420,7 @@ PyUnicode_Decode(const char *s,
/* Decode via the codec registry */
buffer = NULL;
- if (PyBuffer_FillInfo(&info, NULL, (void *)s, size, 1, PyBUF_FULL_RO) < 0)
+ if (PyBuffer_FillInfo(&info, NULL, (const void *)s, size, 1, PyBUF_FULL_RO) < 0)
goto onError;
buffer = PyMemoryView_FromBuffer(&info);
if (buffer == NULL)
@@ -4921,7 +4921,7 @@ ascii_decode(const char *start, const char *end, Py_UCS1 *dest)
/* Help allocation */
const char *_p = p;
while (_p < aligned_end) {
- unsigned long value = *(unsigned long *) _p;
+ unsigned long value = *(const unsigned long *) _p;
if (value & ASCII_CHAR_MASK)
break;
_p += SIZEOF_LONG;
@@ -5472,7 +5472,7 @@ PyUnicode_DecodeUTF32Stateful(const char *s,
PyObject *errorHandler = NULL;
PyObject *exc = NULL;
- q = (unsigned char *)s;
+ q = (const unsigned char *)s;
e = q + size;
if (byteorder)
@@ -5797,7 +5797,7 @@ PyUnicode_DecodeUTF16Stateful(const char *s,
PyObject *exc = NULL;
const char *encoding;
- q = (unsigned char *)s;
+ q = (const unsigned char *)s;
e = q + size;
if (byteorder)
@@ -6726,7 +6726,7 @@ PyUnicode_DecodeLatin1(const char *s,
const char *errors)
{
/* Latin-1 is equivalent to the first 256 ordinals in Unicode. */
- return _PyUnicode_FromUCS1((unsigned char*)s, size);
+ return _PyUnicode_FromUCS1((const unsigned char*)s, size);
}
/* create or adjust a UnicodeEncodeError */
@@ -13803,7 +13803,7 @@ _PyUnicodeWriter_WriteASCIIString(_PyUnicodeWriter *writer,
if (len == -1)
len = strlen(ascii);
- assert(ucs1lib_find_max_char((Py_UCS1*)ascii, (Py_UCS1*)ascii + len) < 128);
+ assert(ucs1lib_find_max_char((const Py_UCS1*)ascii, (const Py_UCS1*)ascii + len) < 128);
if (writer->buffer == NULL && !writer->overallocate) {
PyObject *str;
@@ -13862,7 +13862,7 @@ _PyUnicodeWriter_WriteLatin1String(_PyUnicodeWriter *writer,
{
Py_UCS4 maxchar;
- maxchar = ucs1lib_find_max_char((Py_UCS1*)str, (Py_UCS1*)str + len);
+ maxchar = ucs1lib_find_max_char((const Py_UCS1*)str, (const Py_UCS1*)str + len);
if (_PyUnicodeWriter_Prepare(writer, len, maxchar) == -1)
return -1;
unicode_write_cstr(writer->buffer, writer->pos, str, len);
diff --git a/Python/ceval.c b/Python/ceval.c
index eb0f131ae8c86..426d0bbee8901 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -5440,7 +5440,7 @@ dtrace_function_entry(PyFrameObject *f)
funcname = PyUnicode_AsUTF8(f->f_code->co_name);
lineno = PyCode_Addr2Line(f->f_code, f->f_lasti);
- PyDTrace_FUNCTION_ENTRY((char *)filename, (char *)funcname, lineno);
+ PyDTrace_FUNCTION_ENTRY(filename, funcname, lineno);
}
static void
@@ -5454,7 +5454,7 @@ dtrace_function_return(PyFrameObject *f)
funcname = PyUnicode_AsUTF8(f->f_code->co_name);
lineno = PyCode_Addr2Line(f->f_code, f->f_lasti);
- PyDTrace_FUNCTION_RETURN((char *)filename, (char *)funcname, lineno);
+ PyDTrace_FUNCTION_RETURN(filename, funcname, lineno);
}
/* DTrace equivalent of maybe_call_line_trace. */
@@ -5486,7 +5486,7 @@ maybe_dtrace_line(PyFrameObject *frame,
co_name = PyUnicode_AsUTF8(frame->f_code->co_name);
if (!co_name)
co_name = "?";
- PyDTrace_LINE((char *)co_filename, (char *)co_name, line);
+ PyDTrace_LINE(co_filename, co_name, line);
}
*instr_prev = frame->f_lasti;
}
diff --git a/Python/marshal.c b/Python/marshal.c
index 04a8dc598988a..4a23df1dcd865 100644
--- a/Python/marshal.c
+++ b/Python/marshal.c
@@ -734,7 +734,7 @@ r_byte(RFILE *p)
else {
const char *ptr = r_string(1, p);
if (ptr != NULL)
- c = *(unsigned char *) ptr;
+ c = *(const unsigned char *) ptr;
}
return c;
}
diff --git a/Python/pyhash.c b/Python/pyhash.c
index d381dc0230c5b..faac730d79dee 100644
--- a/Python/pyhash.c
+++ b/Python/pyhash.c
@@ -366,7 +366,7 @@ static PyHash_FuncDef PyHash_Func = {fnv, "fnv", 8 * SIZEOF_PY_HASH_T,
static uint64_t
siphash24(uint64_t k0, uint64_t k1, const void *src, Py_ssize_t src_sz) {
uint64_t b = (uint64_t)src_sz << 56;
- const uint8_t *in = (uint8_t*)src;
+ const uint8_t *in = (const uint8_t*)src;
uint64_t v0 = k0 ^ 0x736f6d6570736575ULL;
uint64_t v1 = k1 ^ 0x646f72616e646f6dULL;
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index a7f8c0b719639..cacff529758c6 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -204,7 +204,7 @@ PySys_Audit(const char *event, const char *argFormat, ...)
/* Dtrace USDT point */
if (dtrace) {
- PyDTrace_AUDIT((char *)event, (void *)eventArgs);
+ PyDTrace_AUDIT(event, (void *)eventArgs);
}
/* Call interpreter hooks */
1
0
docs: macos - change "versiona" to "versions" (GH-18467) (GH-18470)
by Miss Islington (bot) 12 Feb '20
by Miss Islington (bot) 12 Feb '20
12 Feb '20
https://github.com/python/cpython/commit/a933f74aba6eb11e7bf13d4d814dbeb4dd…
commit: a933f74aba6eb11e7bf13d4d814dbeb4ddcb82b9
branch: 3.7
author: Miss Islington (bot) <31488909+miss-islington(a)users.noreply.github.com>
committer: GitHub <noreply(a)github.com>
date: 2020-02-11T20:40:39-05:00
summary:
docs: macos - change "versiona" to "versions" (GH-18467) (GH-18470)
(cherry picked from commit 029e8401b7741cc0964b5f38d2c2264749dbff6b)
Co-authored-by: @RandyMcMillan <randy.lee.mcmillan(a)gmail.com>
files:
M Mac/README.rst
diff --git a/Mac/README.rst b/Mac/README.rst
index 4f2e2ce6623df..ec7d873df277d 100644
--- a/Mac/README.rst
+++ b/Mac/README.rst
@@ -49,7 +49,7 @@ macOS specific arguments to configure
system header files in their traditional locations, like ``/usr/include`` and
``/System/Library/Frameworks``; instead they are found within a MacOSX SDK.
The Apple-supplied build tools handle this transparently and current
- versiona of Python now handle this as well. So it is no longer necessary,
+ versions of Python now handle this as well. So it is no longer necessary,
and since macOS 10.14, no longer possible to force the installation of system
headers with ``xcode-select``.
1
0
docs: macos - change "versiona" to "versions" (GH-18467) (GH-18469)
by Miss Islington (bot) 12 Feb '20
by Miss Islington (bot) 12 Feb '20
12 Feb '20
https://github.com/python/cpython/commit/0f0d2e496205c345b182b6572ee09db23f…
commit: 0f0d2e496205c345b182b6572ee09db23f8f9daf
branch: 3.8
author: Miss Islington (bot) <31488909+miss-islington(a)users.noreply.github.com>
committer: GitHub <noreply(a)github.com>
date: 2020-02-11T20:39:33-05:00
summary:
docs: macos - change "versiona" to "versions" (GH-18467) (GH-18469)
(cherry picked from commit 029e8401b7741cc0964b5f38d2c2264749dbff6b)
Co-authored-by: @RandyMcMillan <randy.lee.mcmillan(a)gmail.com>
files:
M Mac/README.rst
diff --git a/Mac/README.rst b/Mac/README.rst
index 4f2e2ce6623df..ec7d873df277d 100644
--- a/Mac/README.rst
+++ b/Mac/README.rst
@@ -49,7 +49,7 @@ macOS specific arguments to configure
system header files in their traditional locations, like ``/usr/include`` and
``/System/Library/Frameworks``; instead they are found within a MacOSX SDK.
The Apple-supplied build tools handle this transparently and current
- versiona of Python now handle this as well. So it is no longer necessary,
+ versions of Python now handle this as well. So it is no longer necessary,
and since macOS 10.14, no longer possible to force the installation of system
headers with ``xcode-select``.
1
0
https://github.com/python/cpython/commit/029e8401b7741cc0964b5f38d2c2264749…
commit: 029e8401b7741cc0964b5f38d2c2264749dbff6b
branch: master
author: @RandyMcMillan <randy.lee.mcmillan(a)gmail.com>
committer: GitHub <noreply(a)github.com>
date: 2020-02-11T20:20:05-05:00
summary:
docs: macos - change "versiona" to "versions" (GH-18467)
files:
M Mac/README.rst
diff --git a/Mac/README.rst b/Mac/README.rst
index 4f2e2ce6623df..ec7d873df277d 100644
--- a/Mac/README.rst
+++ b/Mac/README.rst
@@ -49,7 +49,7 @@ macOS specific arguments to configure
system header files in their traditional locations, like ``/usr/include`` and
``/System/Library/Frameworks``; instead they are found within a MacOSX SDK.
The Apple-supplied build tools handle this transparently and current
- versiona of Python now handle this as well. So it is no longer necessary,
+ versions of Python now handle this as well. So it is no longer necessary,
and since macOS 10.14, no longer possible to force the installation of system
headers with ``xcode-select``.
1
0
https://github.com/python/cpython/commit/b138dd296a206e92ebec09b540bb88a153…
commit: b138dd296a206e92ebec09b540bb88a1539563e4
branch: master
author: Steve Dower <steve.dower(a)python.org>
committer: GitHub <noreply(a)github.com>
date: 2020-02-11T09:32:52-08:00
summary:
Fix ordering issue in Windows release upload script (GH-18465)
Automerge-Triggered-By: @zooba
files:
M .azure-pipelines/windows-release/stage-publish-pythonorg.yml
diff --git a/.azure-pipelines/windows-release/stage-publish-pythonorg.yml b/.azure-pipelines/windows-release/stage-publish-pythonorg.yml
index 8c95f1b950cd7..0474d40e4bc02 100644
--- a/.azure-pipelines/windows-release/stage-publish-pythonorg.yml
+++ b/.azure-pipelines/windows-release/stage-publish-pythonorg.yml
@@ -39,11 +39,6 @@ jobs:
artifactName: embed
downloadPath: $(Build.BinariesDirectory)
- - powershell: 'gci *embed-arm*.zip | %{ Write-Host "Not publishing: $($_.Name)"; gi $_ } | del'
- displayName: 'Prevent publishing ARM/ARM64 packages'
- workingDirectory: '$(Build.BinariesDirectory)\embed'
- condition: and(succeeded(), not(variables['PublishArmPackages']))
-
- task: DownloadPipelineArtifact@1
displayName: 'Download artifact from $(BuildToPublish): Doc'
condition: and(succeeded(), variables['BuildToPublish'])
@@ -80,6 +75,11 @@ jobs:
buildVersionToDownload: specific
buildId: $(BuildToPublish)
+ - powershell: 'gci *embed-arm*.zip | %{ Write-Host "Not publishing: $($_.Name)"; gi $_ } | del'
+ displayName: 'Prevent publishing ARM/ARM64 packages'
+ workingDirectory: '$(Build.BinariesDirectory)\embed'
+ condition: and(succeeded(), not(variables['PublishArmPackages']))
+
- template: ./gpg-sign.yml
parameters:
1
0
https://github.com/python/cpython/commit/f3fda374685dffa31ebda9e681e00ef703…
commit: f3fda374685dffa31ebda9e681e00ef7032b8a1d
branch: master
author: Victor Stinner <vstinner(a)python.org>
committer: GitHub <noreply(a)github.com>
date: 2020-02-11T17:50:10+01:00
summary:
bpo-38644: Rephrase What's New entry (GH-18461)
files:
M Doc/whatsnew/3.9.rst
diff --git a/Doc/whatsnew/3.9.rst b/Doc/whatsnew/3.9.rst
index 4f4c7f2808d01..c0404101d7ce2 100644
--- a/Doc/whatsnew/3.9.rst
+++ b/Doc/whatsnew/3.9.rst
@@ -356,8 +356,9 @@ Build and C API Changes
* Provide :c:func:`Py_EnterRecursiveCall` and :c:func:`Py_LeaveRecursiveCall`
as regular functions for the limited API. Previously, there were defined as
- macros, but these macros didn't work with the limited API which cannot
- access ``PyThreadState.recursion_depth`` field.
+ macros, but these macros didn't compile with the limited C API which cannot
+ access ``PyThreadState.recursion_depth`` field (the structure is opaque in
+ the limited C API).
* Exclude the following functions from the limited C API:
1
0
https://github.com/python/cpython/commit/ffd9753a944916ced659b2c77aebe66a6c…
commit: ffd9753a944916ced659b2c77aebe66a6c9fbab5
branch: master
author: Petr Viktorin <encukou(a)gmail.com>
committer: GitHub <noreply(a)github.com>
date: 2020-02-11T17:46:57+01:00
summary:
bpo-39245: Switch to public API for Vectorcall (GH-18460)
The bulk of this patch was generated automatically with:
for name in \
PyObject_Vectorcall \
Py_TPFLAGS_HAVE_VECTORCALL \
PyObject_VectorcallMethod \
PyVectorcall_Function \
PyObject_CallOneArg \
PyObject_CallMethodNoArgs \
PyObject_CallMethodOneArg \
;
do
echo $name
git grep -lwz _$name | xargs -0 sed -i "s/\b_$name\b/$name/g"
done
old=_PyObject_FastCallDict
new=PyObject_VectorcallDict
git grep -lwz $old | xargs -0 sed -i "s/\b$old\b/$new/g"
and then cleaned up:
- Revert changes to in docs & news
- Revert changes to backcompat defines in headers
- Nudge misaligned comments
files:
M Include/cpython/abstract.h
M Lib/test/test_call.py
M Modules/_asynciomodule.c
M Modules/_collectionsmodule.c
M Modules/_csv.c
M Modules/_ctypes/callproc.c
M Modules/_elementtree.c
M Modules/_functoolsmodule.c
M Modules/_io/bufferedio.c
M Modules/_io/iobase.c
M Modules/_io/stringio.c
M Modules/_io/textio.c
M Modules/_json.c
M Modules/_operator.c
M Modules/_pickle.c
M Modules/_posixsubprocess.c
M Modules/_randommodule.c
M Modules/_sqlite/cache.c
M Modules/_sqlite/connection.c
M Modules/_sqlite/cursor.c
M Modules/_sqlite/microprotocols.c
M Modules/_sre.c
M Modules/_struct.c
M Modules/_testcapimodule.c
M Modules/_xxtestfuzz/fuzzer.c
M Modules/cjkcodecs/cjkcodecs.h
M Modules/cjkcodecs/multibytecodec.c
M Modules/gcmodule.c
M Modules/itertoolsmodule.c
M Modules/pyexpat.c
M Objects/abstract.c
M Objects/bytearrayobject.c
M Objects/bytesobject.c
M Objects/call.c
M Objects/classobject.c
M Objects/descrobject.c
M Objects/dictobject.c
M Objects/fileobject.c
M Objects/floatobject.c
M Objects/funcobject.c
M Objects/genobject.c
M Objects/listobject.c
M Objects/longobject.c
M Objects/memoryobject.c
M Objects/methodobject.c
M Objects/moduleobject.c
M Objects/typeobject.c
M Objects/unicodeobject.c
M Objects/weakrefobject.c
M Python/_warnings.c
M Python/bltinmodule.c
M Python/ceval.c
M Python/codecs.c
M Python/errors.c
M Python/import.c
M Python/sysmodule.c
diff --git a/Include/cpython/abstract.h b/Include/cpython/abstract.h
index 76eaedfc4b72b..c0b0182fd5d36 100644
--- a/Include/cpython/abstract.h
+++ b/Include/cpython/abstract.h
@@ -67,7 +67,7 @@ PyVectorcall_Function(PyObject *callable)
{
assert(callable != NULL);
PyTypeObject *tp = Py_TYPE(callable);
- if (!PyType_HasFeature(tp, _Py_TPFLAGS_HAVE_VECTORCALL)) {
+ if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) {
return NULL;
}
assert(PyCallable_Check(callable));
@@ -178,7 +178,7 @@ PyAPI_FUNC(PyObject *) PyObject_VectorcallMethod(
static inline PyObject *
PyObject_CallMethodNoArgs(PyObject *self, PyObject *name)
{
- return _PyObject_VectorcallMethod(name, &self,
+ return PyObject_VectorcallMethod(name, &self,
1 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
}
@@ -187,7 +187,7 @@ PyObject_CallMethodOneArg(PyObject *self, PyObject *name, PyObject *arg)
{
assert(arg != NULL);
PyObject *args[2] = {self, arg};
- return _PyObject_VectorcallMethod(name, args,
+ return PyObject_VectorcallMethod(name, args,
2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
}
diff --git a/Lib/test/test_call.py b/Lib/test/test_call.py
index d178aa4ec2bd2..b3077ad1d1cb8 100644
--- a/Lib/test/test_call.py
+++ b/Lib/test/test_call.py
@@ -468,7 +468,7 @@ def test_fastcall(self):
self.check_result(result, expected)
def test_vectorcall_dict(self):
- # Test _PyObject_FastCallDict()
+ # Test PyObject_VectorcallDict()
for func, args, expected in self.CALLS_POSARGS:
with self.subTest(func=func, args=args):
@@ -487,7 +487,7 @@ def test_vectorcall_dict(self):
self.check_result(result, expected)
def test_vectorcall(self):
- # Test _PyObject_Vectorcall()
+ # Test PyObject_Vectorcall()
for func, args, expected in self.CALLS_POSARGS:
with self.subTest(func=func, args=args):
@@ -594,7 +594,7 @@ def test_vectorcall(self):
# 1. vectorcall using PyVectorcall_Call()
# (only for objects that support vectorcall directly)
# 2. normal call
- # 3. vectorcall using _PyObject_Vectorcall()
+ # 3. vectorcall using PyObject_Vectorcall()
# 4. call as bound method
# 5. call using functools.partial
diff --git a/Modules/_asynciomodule.c b/Modules/_asynciomodule.c
index 2e293757fb731..5aea74332c5ef 100644
--- a/Modules/_asynciomodule.c
+++ b/Modules/_asynciomodule.c
@@ -142,7 +142,7 @@ _is_coroutine(PyObject *coro)
Do this check after 'future_init()'; in case we need to raise
an error, __del__ needs a properly initialized object.
*/
- PyObject *res = _PyObject_CallOneArg(asyncio_iscoroutine_func, coro);
+ PyObject *res = PyObject_CallOneArg(asyncio_iscoroutine_func, coro);
if (res == NULL) {
return -1;
}
@@ -367,7 +367,7 @@ call_soon(PyObject *loop, PyObject *func, PyObject *arg, PyObject *ctx)
}
stack[nargs] = (PyObject *)ctx;
- handle = _PyObject_Vectorcall(callable, stack, nargs, context_kwname);
+ handle = PyObject_Vectorcall(callable, stack, nargs, context_kwname);
Py_DECREF(callable);
}
@@ -1287,7 +1287,7 @@ static PyObject *
_asyncio_Future__repr_info_impl(FutureObj *self)
/*[clinic end generated code: output=fa69e901bd176cfb input=f21504d8e2ae1ca2]*/
{
- return _PyObject_CallOneArg(asyncio_future_repr_info_func, (PyObject *)self);
+ return PyObject_CallOneArg(asyncio_future_repr_info_func, (PyObject *)self);
}
static PyObject *
@@ -1363,7 +1363,7 @@ FutureObj_finalize(FutureObj *fut)
func = _PyObject_GetAttrId(fut->fut_loop, &PyId_call_exception_handler);
if (func != NULL) {
- PyObject *res = _PyObject_CallOneArg(func, context);
+ PyObject *res = PyObject_CallOneArg(func, context);
if (res == NULL) {
PyErr_WriteUnraisable(func);
}
@@ -2126,13 +2126,13 @@ _asyncio_Task_current_task_impl(PyTypeObject *type, PyObject *loop)
Py_DECREF(current_task_func);
return NULL;
}
- ret = _PyObject_CallOneArg(current_task_func, loop);
+ ret = PyObject_CallOneArg(current_task_func, loop);
Py_DECREF(current_task_func);
Py_DECREF(loop);
return ret;
}
else {
- ret = _PyObject_CallOneArg(current_task_func, loop);
+ ret = PyObject_CallOneArg(current_task_func, loop);
Py_DECREF(current_task_func);
return ret;
}
@@ -2168,7 +2168,7 @@ _asyncio_Task_all_tasks_impl(PyTypeObject *type, PyObject *loop)
return NULL;
}
- res = _PyObject_CallOneArg(all_tasks_func, loop);
+ res = PyObject_CallOneArg(all_tasks_func, loop);
Py_DECREF(all_tasks_func);
return res;
}
@@ -2181,7 +2181,7 @@ static PyObject *
_asyncio_Task__repr_info_impl(TaskObj *self)
/*[clinic end generated code: output=6a490eb66d5ba34b input=3c6d051ed3ddec8b]*/
{
- return _PyObject_CallOneArg(asyncio_task_repr_info_func, (PyObject *)self);
+ return PyObject_CallOneArg(asyncio_task_repr_info_func, (PyObject *)self);
}
/*[clinic input]
@@ -2431,7 +2431,7 @@ TaskObj_finalize(TaskObj *task)
func = _PyObject_GetAttrId(task->task_loop, &PyId_call_exception_handler);
if (func != NULL) {
- PyObject *res = _PyObject_CallOneArg(func, context);
+ PyObject *res = PyObject_CallOneArg(func, context);
if (res == NULL) {
PyErr_WriteUnraisable(func);
}
@@ -2571,7 +2571,7 @@ task_set_error_soon(TaskObj *task, PyObject *et, const char *format, ...)
return NULL;
}
- PyObject *e = _PyObject_CallOneArg(et, msg);
+ PyObject *e = PyObject_CallOneArg(et, msg);
Py_DECREF(msg);
if (e == NULL) {
return NULL;
@@ -2841,7 +2841,7 @@ task_step_impl(TaskObj *task, PyObject *exc)
PyObject *stack[2];
stack[0] = wrapper;
stack[1] = (PyObject *)task->task_context;
- res = _PyObject_Vectorcall(add_cb, stack, 1, context_kwname);
+ res = PyObject_Vectorcall(add_cb, stack, 1, context_kwname);
Py_DECREF(add_cb);
Py_DECREF(wrapper);
if (res == NULL) {
diff --git a/Modules/_collectionsmodule.c b/Modules/_collectionsmodule.c
index 25e4c96943e46..057d40441835c 100644
--- a/Modules/_collectionsmodule.c
+++ b/Modules/_collectionsmodule.c
@@ -512,7 +512,7 @@ deque_copy(PyObject *deque, PyObject *Py_UNUSED(ignored))
return NULL;
}
if (old_deque->maxlen < 0)
- result = _PyObject_CallOneArg((PyObject *)(Py_TYPE(deque)), deque);
+ result = PyObject_CallOneArg((PyObject *)(Py_TYPE(deque)), deque);
else
result = PyObject_CallFunction((PyObject *)(Py_TYPE(deque)), "Oi",
deque, old_deque->maxlen, NULL);
diff --git a/Modules/_csv.c b/Modules/_csv.c
index 2d541bb3af8ea..42437728f2ed2 100644
--- a/Modules/_csv.c
+++ b/Modules/_csv.c
@@ -514,10 +514,10 @@ _call_dialect(PyObject *dialect_inst, PyObject *kwargs)
{
PyObject *type = (PyObject *)&Dialect_Type;
if (dialect_inst) {
- return _PyObject_FastCallDict(type, &dialect_inst, 1, kwargs);
+ return PyObject_VectorcallDict(type, &dialect_inst, 1, kwargs);
}
else {
- return _PyObject_FastCallDict(type, NULL, 0, kwargs);
+ return PyObject_VectorcallDict(type, NULL, 0, kwargs);
}
}
@@ -1240,7 +1240,7 @@ csv_writerow(WriterObj *self, PyObject *seq)
if (line == NULL) {
return NULL;
}
- result = _PyObject_CallOneArg(self->write, line);
+ result = PyObject_CallOneArg(self->write, line);
Py_DECREF(line);
return result;
}
diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c
index 65c6eb15a298b..5f29f95b128ff 100644
--- a/Modules/_ctypes/callproc.c
+++ b/Modules/_ctypes/callproc.c
@@ -945,7 +945,7 @@ static PyObject *GetResult(PyObject *restype, void *result, PyObject *checker)
if (!checker || !retval)
return retval;
- v = _PyObject_CallOneArg(checker, retval);
+ v = PyObject_CallOneArg(checker, retval);
if (v == NULL)
_PyTraceback_Add("GetResult", "_ctypes/callproc.c", __LINE__-2);
Py_DECREF(retval);
@@ -1138,7 +1138,7 @@ PyObject *_ctypes_callproc(PPROC pProc,
if (argtypes && argtype_count > i) {
PyObject *v;
converter = PyTuple_GET_ITEM(argtypes, i);
- v = _PyObject_CallOneArg(converter, arg);
+ v = PyObject_CallOneArg(converter, arg);
if (v == NULL) {
_ctypes_extend_error(PyExc_ArgError, "argument %zd: ", i+1);
goto cleanup;
@@ -1835,7 +1835,7 @@ pointer(PyObject *self, PyObject *arg)
typ = PyDict_GetItemWithError(_ctypes_ptrtype_cache, (PyObject *)Py_TYPE(arg));
if (typ) {
- return _PyObject_CallOneArg(typ, arg);
+ return PyObject_CallOneArg(typ, arg);
}
else if (PyErr_Occurred()) {
return NULL;
@@ -1843,7 +1843,7 @@ pointer(PyObject *self, PyObject *arg)
typ = POINTER(NULL, (PyObject *)Py_TYPE(arg));
if (typ == NULL)
return NULL;
- result = _PyObject_CallOneArg(typ, arg);
+ result = PyObject_CallOneArg(typ, arg);
Py_DECREF(typ);
return result;
}
diff --git a/Modules/_elementtree.c b/Modules/_elementtree.c
index c096eab43ea6a..a04b295378e4f 100644
--- a/Modules/_elementtree.c
+++ b/Modules/_elementtree.c
@@ -2671,7 +2671,7 @@ treebuilder_append_event(TreeBuilderObject *self, PyObject *action,
PyObject *event = PyTuple_Pack(2, action, node);
if (event == NULL)
return -1;
- res = _PyObject_CallOneArg(self->events_append, event);
+ res = PyObject_CallOneArg(self->events_append, event);
Py_DECREF(event);
if (res == NULL)
return -1;
@@ -2837,7 +2837,7 @@ treebuilder_handle_comment(TreeBuilderObject* self, PyObject* text)
}
if (self->comment_factory) {
- comment = _PyObject_CallOneArg(self->comment_factory, text);
+ comment = PyObject_CallOneArg(self->comment_factory, text);
if (!comment)
return NULL;
@@ -3179,7 +3179,7 @@ expat_set_error(enum XML_Error error_code, Py_ssize_t line, Py_ssize_t column,
if (errmsg == NULL)
return;
- error = _PyObject_CallOneArg(st->parseerror_obj, errmsg);
+ error = PyObject_CallOneArg(st->parseerror_obj, errmsg);
Py_DECREF(errmsg);
if (!error)
return;
@@ -3242,7 +3242,7 @@ expat_default_handler(XMLParserObject* self, const XML_Char* data_in,
(TreeBuilderObject*) self->target, value
);
else if (self->handle_data)
- res = _PyObject_CallOneArg(self->handle_data, value);
+ res = PyObject_CallOneArg(self->handle_data, value);
else
res = NULL;
Py_XDECREF(res);
@@ -3353,7 +3353,7 @@ expat_data_handler(XMLParserObject* self, const XML_Char* data_in,
/* shortcut */
res = treebuilder_handle_data((TreeBuilderObject*) self->target, data);
else if (self->handle_data)
- res = _PyObject_CallOneArg(self->handle_data, data);
+ res = PyObject_CallOneArg(self->handle_data, data);
else
res = NULL;
@@ -3380,7 +3380,7 @@ expat_end_handler(XMLParserObject* self, const XML_Char* tag_in)
else if (self->handle_end) {
tag = makeuniversal(self, tag_in);
if (tag) {
- res = _PyObject_CallOneArg(self->handle_end, tag);
+ res = PyObject_CallOneArg(self->handle_end, tag);
Py_DECREF(tag);
}
}
@@ -3467,7 +3467,7 @@ expat_end_ns_handler(XMLParserObject* self, const XML_Char* prefix_in)
if (!prefix)
return;
- res = _PyObject_CallOneArg(self->handle_end_ns, prefix);
+ res = PyObject_CallOneArg(self->handle_end_ns, prefix);
Py_DECREF(prefix);
}
@@ -3499,7 +3499,7 @@ expat_comment_handler(XMLParserObject* self, const XML_Char* comment_in)
if (!comment)
return;
- res = _PyObject_CallOneArg(self->handle_comment, comment);
+ res = PyObject_CallOneArg(self->handle_comment, comment);
Py_XDECREF(res);
Py_DECREF(comment);
}
diff --git a/Modules/_functoolsmodule.c b/Modules/_functoolsmodule.c
index 50d8c58e954f8..88c02d82dca0a 100644
--- a/Modules/_functoolsmodule.c
+++ b/Modules/_functoolsmodule.c
@@ -213,7 +213,7 @@ partial_vectorcall(partialobject *pto, PyObject *const *args,
static void
partial_setvectorcall(partialobject *pto)
{
- if (_PyVectorcall_Function(pto->fn) == NULL) {
+ if (PyVectorcall_Function(pto->fn) == NULL) {
/* Don't use vectorcall if the underlying function doesn't support it */
pto->vectorcall = NULL;
}
@@ -440,7 +440,7 @@ static PyTypeObject partial_type = {
0, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
Py_TPFLAGS_BASETYPE |
- _Py_TPFLAGS_HAVE_VECTORCALL, /* tp_flags */
+ Py_TPFLAGS_HAVE_VECTORCALL, /* tp_flags */
partial_doc, /* tp_doc */
(traverseproc)partial_traverse, /* tp_traverse */
0, /* tp_clear */
diff --git a/Modules/_io/bufferedio.c b/Modules/_io/bufferedio.c
index ddd17a2863c24..6f55577813c9f 100644
--- a/Modules/_io/bufferedio.c
+++ b/Modules/_io/bufferedio.c
@@ -461,7 +461,7 @@ static PyObject *
buffered_simple_flush(buffered *self, PyObject *args)
{
CHECK_INITIALIZED(self)
- return _PyObject_CallMethodNoArgs(self->raw, _PyIO_str_flush);
+ return PyObject_CallMethodNoArgs(self->raw, _PyIO_str_flush);
}
static int
@@ -513,7 +513,7 @@ buffered_close(buffered *self, PyObject *args)
}
/* flush() will most probably re-take the lock, so drop it first */
LEAVE_BUFFERED(self)
- res = _PyObject_CallMethodNoArgs((PyObject *)self, _PyIO_str_flush);
+ res = PyObject_CallMethodNoArgs((PyObject *)self, _PyIO_str_flush);
if (!ENTER_BUFFERED(self))
return NULL;
if (res == NULL)
@@ -521,7 +521,7 @@ buffered_close(buffered *self, PyObject *args)
else
Py_DECREF(res);
- res = _PyObject_CallMethodNoArgs(self->raw, _PyIO_str_close);
+ res = PyObject_CallMethodNoArgs(self->raw, _PyIO_str_close);
if (self->buffer) {
PyMem_Free(self->buffer);
@@ -545,7 +545,7 @@ buffered_detach(buffered *self, PyObject *Py_UNUSED(ignored))
{
PyObject *raw, *res;
CHECK_INITIALIZED(self)
- res = _PyObject_CallMethodNoArgs((PyObject *)self, _PyIO_str_flush);
+ res = PyObject_CallMethodNoArgs((PyObject *)self, _PyIO_str_flush);
if (res == NULL)
return NULL;
Py_DECREF(res);
@@ -562,21 +562,21 @@ static PyObject *
buffered_seekable(buffered *self, PyObject *Py_UNUSED(ignored))
{
CHECK_INITIALIZED(self)
- return _PyObject_CallMethodNoArgs(self->raw, _PyIO_str_seekable);
+ return PyObject_CallMethodNoArgs(self->raw, _PyIO_str_seekable);
}
static PyObject *
buffered_readable(buffered *self, PyObject *Py_UNUSED(ignored))
{
CHECK_INITIALIZED(self)
- return _PyObject_CallMethodNoArgs(self->raw, _PyIO_str_readable);
+ return PyObject_CallMethodNoArgs(self->raw, _PyIO_str_readable);
}
static PyObject *
buffered_writable(buffered *self, PyObject *Py_UNUSED(ignored))
{
CHECK_INITIALIZED(self)
- return _PyObject_CallMethodNoArgs(self->raw, _PyIO_str_writable);
+ return PyObject_CallMethodNoArgs(self->raw, _PyIO_str_writable);
}
static PyObject *
@@ -599,14 +599,14 @@ static PyObject *
buffered_fileno(buffered *self, PyObject *Py_UNUSED(ignored))
{
CHECK_INITIALIZED(self)
- return _PyObject_CallMethodNoArgs(self->raw, _PyIO_str_fileno);
+ return PyObject_CallMethodNoArgs(self->raw, _PyIO_str_fileno);
}
static PyObject *
buffered_isatty(buffered *self, PyObject *Py_UNUSED(ignored))
{
CHECK_INITIALIZED(self)
- return _PyObject_CallMethodNoArgs(self->raw, _PyIO_str_isatty);
+ return PyObject_CallMethodNoArgs(self->raw, _PyIO_str_isatty);
}
/* Forward decls */
@@ -670,7 +670,7 @@ _buffered_raw_tell(buffered *self)
{
Py_off_t n;
PyObject *res;
- res = _PyObject_CallMethodNoArgs(self->raw, _PyIO_str_tell);
+ res = PyObject_CallMethodNoArgs(self->raw, _PyIO_str_tell);
if (res == NULL)
return -1;
n = PyNumber_AsOff_t(res, PyExc_ValueError);
@@ -1324,7 +1324,7 @@ _io__Buffered_truncate_impl(buffered *self, PyObject *pos)
goto end;
Py_CLEAR(res);
}
- res = _PyObject_CallMethodOneArg(self->raw, _PyIO_str_truncate, pos);
+ res = PyObject_CallMethodOneArg(self->raw, _PyIO_str_truncate, pos);
if (res == NULL)
goto end;
/* Reset cached position */
@@ -1351,7 +1351,7 @@ buffered_iternext(buffered *self)
line = _buffered_readline(self, -1);
}
else {
- line = _PyObject_CallMethodNoArgs((PyObject *)self,
+ line = PyObject_CallMethodNoArgs((PyObject *)self,
_PyIO_str_readline);
if (line && !PyBytes_Check(line)) {
PyErr_Format(PyExc_OSError,
@@ -1470,7 +1470,7 @@ _bufferedreader_raw_read(buffered *self, char *start, Py_ssize_t len)
raised (see issue #10956).
*/
do {
- res = _PyObject_CallMethodOneArg(self->raw, _PyIO_str_readinto, memobj);
+ res = PyObject_CallMethodOneArg(self->raw, _PyIO_str_readinto, memobj);
} while (res == NULL && _PyIO_trap_eintr());
Py_DECREF(memobj);
if (res == NULL)
@@ -1569,7 +1569,7 @@ _bufferedreader_read_all(buffered *self)
}
/* Read until EOF or until read() would block. */
- data = _PyObject_CallMethodNoArgs(self->raw, _PyIO_str_read);
+ data = PyObject_CallMethodNoArgs(self->raw, _PyIO_str_read);
if (data == NULL)
goto cleanup;
if (data != Py_None && !PyBytes_Check(data)) {
@@ -1818,7 +1818,7 @@ _bufferedwriter_raw_write(buffered *self, char *start, Py_ssize_t len)
*/
do {
errno = 0;
- res = _PyObject_CallMethodOneArg(self->raw, _PyIO_str_write, memobj);
+ res = PyObject_CallMethodOneArg(self->raw, _PyIO_str_write, memobj);
errnum = errno;
} while (res == NULL && _PyIO_trap_eintr());
Py_DECREF(memobj);
diff --git a/Modules/_io/iobase.c b/Modules/_io/iobase.c
index d51fc944e1a62..1ff35648e550f 100644
--- a/Modules/_io/iobase.c
+++ b/Modules/_io/iobase.c
@@ -235,7 +235,7 @@ _io__IOBase_close_impl(PyObject *self)
Py_RETURN_NONE;
}
- res = _PyObject_CallMethodNoArgs(self, _PyIO_str_flush);
+ res = PyObject_CallMethodNoArgs(self, _PyIO_str_flush);
PyErr_Fetch(&exc, &val, &tb);
rc = _PyObject_SetAttrId(self, &PyId___IOBase_closed, Py_True);
@@ -281,7 +281,7 @@ iobase_finalize(PyObject *self)
finalization process. */
if (_PyObject_SetAttrId(self, &PyId__finalizing, Py_True))
PyErr_Clear();
- res = _PyObject_CallMethodNoArgs((PyObject *)self, _PyIO_str_close);
+ res = PyObject_CallMethodNoArgs((PyObject *)self, _PyIO_str_close);
/* Silencing I/O errors is bad, but printing spurious tracebacks is
equally as bad, and potentially more frequent (because of
shutdown issues). */
@@ -382,7 +382,7 @@ _io__IOBase_seekable_impl(PyObject *self)
PyObject *
_PyIOBase_check_seekable(PyObject *self, PyObject *args)
{
- PyObject *res = _PyObject_CallMethodNoArgs(self, _PyIO_str_seekable);
+ PyObject *res = PyObject_CallMethodNoArgs(self, _PyIO_str_seekable);
if (res == NULL)
return NULL;
if (res != Py_True) {
@@ -415,7 +415,7 @@ _io__IOBase_readable_impl(PyObject *self)
PyObject *
_PyIOBase_check_readable(PyObject *self, PyObject *args)
{
- PyObject *res = _PyObject_CallMethodNoArgs(self, _PyIO_str_readable);
+ PyObject *res = PyObject_CallMethodNoArgs(self, _PyIO_str_readable);
if (res == NULL)
return NULL;
if (res != Py_True) {
@@ -448,7 +448,7 @@ _io__IOBase_writable_impl(PyObject *self)
PyObject *
_PyIOBase_check_writable(PyObject *self, PyObject *args)
{
- PyObject *res = _PyObject_CallMethodNoArgs(self, _PyIO_str_writable);
+ PyObject *res = PyObject_CallMethodNoArgs(self, _PyIO_str_writable);
if (res == NULL)
return NULL;
if (res != Py_True) {
@@ -477,7 +477,7 @@ iobase_enter(PyObject *self, PyObject *args)
static PyObject *
iobase_exit(PyObject *self, PyObject *args)
{
- return _PyObject_CallMethodNoArgs(self, _PyIO_str_close);
+ return PyObject_CallMethodNoArgs(self, _PyIO_str_close);
}
/* Lower-level APIs */
@@ -556,7 +556,7 @@ _io__IOBase_readline_impl(PyObject *self, Py_ssize_t limit)
PyObject *b;
if (peek != NULL) {
- PyObject *readahead = _PyObject_CallOneArg(peek, _PyLong_One);
+ PyObject *readahead = PyObject_CallOneArg(peek, _PyLong_One);
if (readahead == NULL) {
/* NOTE: PyErr_SetFromErrno() calls PyErr_CheckSignals()
when EINTR occurs so we needn't do it ourselves. */
@@ -655,7 +655,7 @@ iobase_iter(PyObject *self)
static PyObject *
iobase_iternext(PyObject *self)
{
- PyObject *line = _PyObject_CallMethodNoArgs(self, _PyIO_str_readline);
+ PyObject *line = PyObject_CallMethodNoArgs(self, _PyIO_str_readline);
if (line == NULL)
return NULL;
diff --git a/Modules/_io/stringio.c b/Modules/_io/stringio.c
index 89b29bb8fbb72..28d54e00d8a7b 100644
--- a/Modules/_io/stringio.c
+++ b/Modules/_io/stringio.c
@@ -408,7 +408,7 @@ stringio_iternext(stringio *self)
}
else {
/* XXX is subclassing StringIO really supported? */
- line = _PyObject_CallMethodNoArgs((PyObject *)self,
+ line = PyObject_CallMethodNoArgs((PyObject *)self,
_PyIO_str_readline);
if (line && !PyUnicode_Check(line)) {
PyErr_Format(PyExc_OSError,
diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c
index c4c56cb04def2..1d45c7ae2fab9 100644
--- a/Modules/_io/textio.c
+++ b/Modules/_io/textio.c
@@ -527,7 +527,7 @@ _io_IncrementalNewlineDecoder_getstate_impl(nldecoder_object *self)
unsigned long long flag;
if (self->decoder != Py_None) {
- PyObject *state = _PyObject_CallMethodNoArgs(self->decoder,
+ PyObject *state = PyObject_CallMethodNoArgs(self->decoder,
_PyIO_str_getstate);
if (state == NULL)
return NULL;
@@ -601,7 +601,7 @@ _io_IncrementalNewlineDecoder_reset_impl(nldecoder_object *self)
self->seennl = 0;
self->pendingcr = 0;
if (self->decoder != Py_None)
- return _PyObject_CallMethodNoArgs(self->decoder, _PyIO_str_reset);
+ return PyObject_CallMethodNoArgs(self->decoder, _PyIO_str_reset);
else
Py_RETURN_NONE;
}
@@ -963,7 +963,7 @@ _textiowrapper_fix_encoder_state(textio *self)
self->encoding_start_of_stream = 1;
- PyObject *cookieObj = _PyObject_CallMethodNoArgs(
+ PyObject *cookieObj = PyObject_CallMethodNoArgs(
self->buffer, _PyIO_str_tell);
if (cookieObj == NULL) {
return -1;
@@ -977,7 +977,7 @@ _textiowrapper_fix_encoder_state(textio *self)
if (cmp == 0) {
self->encoding_start_of_stream = 0;
- PyObject *res = _PyObject_CallMethodOneArg(
+ PyObject *res = PyObject_CallMethodOneArg(
self->encoder, _PyIO_str_setstate, _PyLong_Zero);
if (res == NULL) {
return -1;
@@ -1386,7 +1386,7 @@ _io_TextIOWrapper_reconfigure_impl(textio *self, PyObject *encoding,
return NULL;
}
- PyObject *res = _PyObject_CallMethodNoArgs((PyObject *)self, _PyIO_str_flush);
+ PyObject *res = PyObject_CallMethodNoArgs((PyObject *)self, _PyIO_str_flush);
if (res == NULL) {
return NULL;
}
@@ -1525,7 +1525,7 @@ _io_TextIOWrapper_detach_impl(textio *self)
{
PyObject *buffer, *res;
CHECK_ATTACHED(self);
- res = _PyObject_CallMethodNoArgs((PyObject *)self, _PyIO_str_flush);
+ res = PyObject_CallMethodNoArgs((PyObject *)self, _PyIO_str_flush);
if (res == NULL)
return NULL;
Py_DECREF(res);
@@ -1597,7 +1597,7 @@ _textiowrapper_writeflush(textio *self)
PyObject *ret;
do {
- ret = _PyObject_CallMethodOneArg(self->buffer, _PyIO_str_write, b);
+ ret = PyObject_CallMethodOneArg(self->buffer, _PyIO_str_write, b);
} while (ret == NULL && _PyIO_trap_eintr());
Py_DECREF(b);
if (ret == NULL)
@@ -1667,7 +1667,7 @@ _io_TextIOWrapper_write_impl(textio *self, PyObject *text)
self->encoding_start_of_stream = 0;
}
else
- b = _PyObject_CallMethodOneArg(self->encoder, _PyIO_str_encode, text);
+ b = PyObject_CallMethodOneArg(self->encoder, _PyIO_str_encode, text);
Py_DECREF(text);
if (b == NULL)
@@ -1718,7 +1718,7 @@ _io_TextIOWrapper_write_impl(textio *self, PyObject *text)
}
if (needflush) {
- ret = _PyObject_CallMethodNoArgs(self->buffer, _PyIO_str_flush);
+ ret = PyObject_CallMethodNoArgs(self->buffer, _PyIO_str_flush);
if (ret == NULL)
return NULL;
Py_DECREF(ret);
@@ -1808,7 +1808,7 @@ textiowrapper_read_chunk(textio *self, Py_ssize_t size_hint)
/* To prepare for tell(), we need to snapshot a point in the file
* where the decoder's input buffer is empty.
*/
- PyObject *state = _PyObject_CallMethodNoArgs(self->decoder,
+ PyObject *state = PyObject_CallMethodNoArgs(self->decoder,
_PyIO_str_getstate);
if (state == NULL)
return -1;
@@ -1849,7 +1849,7 @@ textiowrapper_read_chunk(textio *self, Py_ssize_t size_hint)
if (chunk_size == NULL)
goto fail;
- input_chunk = _PyObject_CallMethodOneArg(self->buffer,
+ input_chunk = PyObject_CallMethodOneArg(self->buffer,
(self->has_read1 ? _PyIO_str_read1: _PyIO_str_read),
chunk_size);
Py_DECREF(chunk_size);
@@ -2393,7 +2393,7 @@ _textiowrapper_decoder_setstate(textio *self, cookie_type *cookie)
utf-16, that we are expecting a BOM).
*/
if (cookie->start_pos == 0 && cookie->dec_flags == 0)
- res = _PyObject_CallMethodNoArgs(self->decoder, _PyIO_str_reset);
+ res = PyObject_CallMethodNoArgs(self->decoder, _PyIO_str_reset);
else
res = _PyObject_CallMethodId(self->decoder, &PyId_setstate,
"((yi))", "", cookie->dec_flags);
@@ -2408,11 +2408,11 @@ _textiowrapper_encoder_reset(textio *self, int start_of_stream)
{
PyObject *res;
if (start_of_stream) {
- res = _PyObject_CallMethodNoArgs(self->encoder, _PyIO_str_reset);
+ res = PyObject_CallMethodNoArgs(self->encoder, _PyIO_str_reset);
self->encoding_start_of_stream = 1;
}
else {
- res = _PyObject_CallMethodOneArg(self->encoder, _PyIO_str_setstate,
+ res = PyObject_CallMethodOneArg(self->encoder, _PyIO_str_setstate,
_PyLong_Zero);
self->encoding_start_of_stream = 0;
}
@@ -2537,7 +2537,7 @@ _io_TextIOWrapper_seek_impl(textio *self, PyObject *cookieObj, int whence)
goto fail;
}
- res = _PyObject_CallMethodNoArgs((PyObject *)self, _PyIO_str_flush);
+ res = PyObject_CallMethodNoArgs((PyObject *)self, _PyIO_str_flush);
if (res == NULL)
goto fail;
Py_DECREF(res);
@@ -2552,7 +2552,7 @@ _io_TextIOWrapper_seek_impl(textio *self, PyObject *cookieObj, int whence)
posobj = PyLong_FromOff_t(cookie.start_pos);
if (posobj == NULL)
goto fail;
- res = _PyObject_CallMethodOneArg(self->buffer, _PyIO_str_seek, posobj);
+ res = PyObject_CallMethodOneArg(self->buffer, _PyIO_str_seek, posobj);
Py_DECREF(posobj);
if (res == NULL)
goto fail;
@@ -2700,14 +2700,14 @@ _io_TextIOWrapper_tell_impl(textio *self)
chars_to_skip = self->decoded_chars_used;
/* Decoder state will be restored at the end */
- saved_state = _PyObject_CallMethodNoArgs(self->decoder,
+ saved_state = PyObject_CallMethodNoArgs(self->decoder,
_PyIO_str_getstate);
if (saved_state == NULL)
goto fail;
#define DECODER_GETSTATE() do { \
PyObject *dec_buffer; \
- PyObject *_state = _PyObject_CallMethodNoArgs(self->decoder, \
+ PyObject *_state = PyObject_CallMethodNoArgs(self->decoder, \
_PyIO_str_getstate); \
if (_state == NULL) \
goto fail; \
@@ -2870,12 +2870,12 @@ _io_TextIOWrapper_truncate_impl(textio *self, PyObject *pos)
CHECK_ATTACHED(self)
- res = _PyObject_CallMethodNoArgs((PyObject *)self, _PyIO_str_flush);
+ res = PyObject_CallMethodNoArgs((PyObject *)self, _PyIO_str_flush);
if (res == NULL)
return NULL;
Py_DECREF(res);
- return _PyObject_CallMethodOneArg(self->buffer, _PyIO_str_truncate, pos);
+ return PyObject_CallMethodOneArg(self->buffer, _PyIO_str_truncate, pos);
}
static PyObject *
@@ -3084,7 +3084,7 @@ textiowrapper_iternext(textio *self)
line = _textiowrapper_readline(self, -1);
}
else {
- line = _PyObject_CallMethodNoArgs((PyObject *)self,
+ line = PyObject_CallMethodNoArgs((PyObject *)self,
_PyIO_str_readline);
if (line && !PyUnicode_Check(line)) {
PyErr_Format(PyExc_OSError,
diff --git a/Modules/_json.c b/Modules/_json.c
index a70043b605f6b..ee2070c043efc 100644
--- a/Modules/_json.c
+++ b/Modules/_json.c
@@ -777,14 +777,14 @@ _parse_object_unicode(PyScannerObject *s, PyObject *pystr, Py_ssize_t idx, Py_ss
*next_idx_ptr = idx + 1;
if (has_pairs_hook) {
- val = _PyObject_CallOneArg(s->object_pairs_hook, rval);
+ val = PyObject_CallOneArg(s->object_pairs_hook, rval);
Py_DECREF(rval);
return val;
}
/* if object_hook is not None: rval = object_hook(rval) */
if (s->object_hook != Py_None) {
- val = _PyObject_CallOneArg(s->object_hook, rval);
+ val = PyObject_CallOneArg(s->object_hook, rval);
Py_DECREF(rval);
return val;
}
@@ -890,7 +890,7 @@ _parse_constant(PyScannerObject *s, const char *constant, Py_ssize_t idx, Py_ssi
return NULL;
/* rval = parse_constant(constant) */
- rval = _PyObject_CallOneArg(s->parse_constant, cstr);
+ rval = PyObject_CallOneArg(s->parse_constant, cstr);
idx += PyUnicode_GET_LENGTH(cstr);
Py_DECREF(cstr);
*next_idx_ptr = idx;
@@ -989,7 +989,7 @@ _match_number_unicode(PyScannerObject *s, PyObject *pystr, Py_ssize_t start, Py_
idx - start);
if (numstr == NULL)
return NULL;
- rval = _PyObject_CallOneArg(custom_func, numstr);
+ rval = PyObject_CallOneArg(custom_func, numstr);
}
else {
Py_ssize_t i, n;
@@ -1399,7 +1399,7 @@ encoder_encode_string(PyEncoderObject *s, PyObject *obj)
if (s->fast_encode) {
return s->fast_encode(NULL, obj);
}
- encoded = _PyObject_CallOneArg(s->encoder, obj);
+ encoded = PyObject_CallOneArg(s->encoder, obj);
if (encoded != NULL && !PyUnicode_Check(encoded)) {
PyErr_Format(PyExc_TypeError,
"encoder() must return a string, not %.80s",
@@ -1485,7 +1485,7 @@ encoder_listencode_obj(PyEncoderObject *s, _PyAccu *acc,
return -1;
}
}
- newobj = _PyObject_CallOneArg(s->defaultfn, obj);
+ newobj = PyObject_CallOneArg(s->defaultfn, obj);
if (newobj == NULL) {
Py_XDECREF(ident);
return -1;
diff --git a/Modules/_operator.c b/Modules/_operator.c
index 5aa229fa781eb..adee5fd79689d 100644
--- a/Modules/_operator.c
+++ b/Modules/_operator.c
@@ -1682,7 +1682,7 @@ methodcaller_reduce(methodcallerobject *mc, PyObject *Py_UNUSED(ignored))
newargs[0] = (PyObject *)Py_TYPE(mc);
newargs[1] = mc->name;
- constructor = _PyObject_FastCallDict(partial, newargs, 2, mc->kwds);
+ constructor = PyObject_VectorcallDict(partial, newargs, 2, mc->kwds);
Py_DECREF(partial);
return Py_BuildValue("NO", constructor, mc->args);
diff --git a/Modules/_pickle.c b/Modules/_pickle.c
index 5f11fe5c88c2b..2ba7a168d0ee9 100644
--- a/Modules/_pickle.c
+++ b/Modules/_pickle.c
@@ -359,7 +359,7 @@ _Pickle_FastCall(PyObject *func, PyObject *obj)
{
PyObject *result;
- result = _PyObject_CallOneArg(func, obj);
+ result = PyObject_CallOneArg(func, obj);
Py_DECREF(obj);
return result;
}
@@ -420,7 +420,7 @@ call_method(PyObject *func, PyObject *self, PyObject *obj)
return PyObject_CallFunctionObjArgs(func, self, obj, NULL);
}
else {
- return _PyObject_CallOneArg(func, obj);
+ return PyObject_CallOneArg(func, obj);
}
}
@@ -2298,7 +2298,7 @@ _Pickler_write_bytes(PicklerObject *self,
return -1;
}
}
- result = _PyObject_CallOneArg(self->write, payload);
+ result = PyObject_CallOneArg(self->write, payload);
Py_XDECREF(mem);
if (result == NULL) {
return -1;
@@ -2506,7 +2506,7 @@ save_picklebuffer(PicklerObject *self, PyObject *obj)
}
int in_band = 1;
if (self->buffer_callback != NULL) {
- PyObject *ret = _PyObject_CallOneArg(self->buffer_callback, obj);
+ PyObject *ret = PyObject_CallOneArg(self->buffer_callback, obj);
if (ret == NULL) {
return -1;
}
@@ -4323,7 +4323,7 @@ save(PicklerObject *self, PyObject *obj, int pers_save)
* regular reduction mechanism.
*/
if (self->reducer_override != NULL) {
- reduce_value = _PyObject_CallOneArg(self->reducer_override, obj);
+ reduce_value = PyObject_CallOneArg(self->reducer_override, obj);
if (reduce_value == NULL) {
goto error;
}
diff --git a/Modules/_posixsubprocess.c b/Modules/_posixsubprocess.c
index 80bb44dce9092..2aed79e14c4b5 100644
--- a/Modules/_posixsubprocess.c
+++ b/Modules/_posixsubprocess.c
@@ -80,7 +80,7 @@ _enable_gc(int need_to_reenable_gc, PyObject *gc_module)
if (need_to_reenable_gc) {
PyErr_Fetch(&exctype, &val, &tb);
- result = _PyObject_CallMethodNoArgs(
+ result = PyObject_CallMethodNoArgs(
gc_module, _posixsubprocessstate_global->enable);
if (exctype != NULL) {
PyErr_Restore(exctype, val, tb);
@@ -657,7 +657,7 @@ subprocess_fork_exec(PyObject* self, PyObject *args)
gc_module = PyImport_ImportModule("gc");
if (gc_module == NULL)
return NULL;
- result = _PyObject_CallMethodNoArgs(
+ result = PyObject_CallMethodNoArgs(
gc_module, _posixsubprocessstate_global->isenabled);
if (result == NULL) {
Py_DECREF(gc_module);
@@ -669,7 +669,7 @@ subprocess_fork_exec(PyObject* self, PyObject *args)
Py_DECREF(gc_module);
return NULL;
}
- result = _PyObject_CallMethodNoArgs(
+ result = PyObject_CallMethodNoArgs(
gc_module, _posixsubprocessstate_global->disable);
if (result == NULL) {
Py_DECREF(gc_module);
diff --git a/Modules/_randommodule.c b/Modules/_randommodule.c
index 1f4bf74fc7a1e..f0fdb0382c5d3 100644
--- a/Modules/_randommodule.c
+++ b/Modules/_randommodule.c
@@ -287,7 +287,7 @@ random_seed(RandomObject *self, PyObject *arg)
/* Calling int.__abs__() prevents calling arg.__abs__(), which might
return an invalid value. See issue #31478. */
args[0] = arg;
- n = _PyObject_Vectorcall(_randomstate_global->Long___abs__, args, 0,
+ n = PyObject_Vectorcall(_randomstate_global->Long___abs__, args, 0,
NULL);
}
else {
diff --git a/Modules/_sqlite/cache.c b/Modules/_sqlite/cache.c
index 7552d1b145394..758fc022f7810 100644
--- a/Modules/_sqlite/cache.c
+++ b/Modules/_sqlite/cache.c
@@ -183,7 +183,7 @@ PyObject* pysqlite_cache_get(pysqlite_Cache* self, PyObject* key)
}
}
- /* We cannot replace this by _PyObject_CallOneArg() since
+ /* We cannot replace this by PyObject_CallOneArg() since
* PyObject_CallFunction() has a special case when using a
* single tuple as argument. */
data = PyObject_CallFunction(self->factory, "O", key);
diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c
index 64051669185ba..697295da9ce39 100644
--- a/Modules/_sqlite/connection.c
+++ b/Modules/_sqlite/connection.c
@@ -308,7 +308,7 @@ PyObject* pysqlite_connection_cursor(pysqlite_Connection* self, PyObject* args,
factory = (PyObject*)&pysqlite_CursorType;
}
- cursor = _PyObject_CallOneArg(factory, (PyObject *)self);
+ cursor = PyObject_CallOneArg(factory, (PyObject *)self);
if (cursor == NULL)
return NULL;
if (!PyObject_TypeCheck(cursor, &pysqlite_CursorType)) {
@@ -975,7 +975,7 @@ static void _trace_callback(void* user_arg, const char* statement_string)
py_statement = PyUnicode_DecodeUTF8(statement_string,
strlen(statement_string), "replace");
if (py_statement) {
- ret = _PyObject_CallOneArg((PyObject*)user_arg, py_statement);
+ ret = PyObject_CallOneArg((PyObject*)user_arg, py_statement);
Py_DECREF(py_statement);
}
@@ -1472,7 +1472,7 @@ pysqlite_connection_iterdump(pysqlite_Connection* self, PyObject* args)
goto finally;
}
- retval = _PyObject_CallOneArg(pyfn_iterdump, (PyObject *)self);
+ retval = PyObject_CallOneArg(pyfn_iterdump, (PyObject *)self);
finally:
Py_XDECREF(module);
diff --git a/Modules/_sqlite/cursor.c b/Modules/_sqlite/cursor.c
index 06275ecb26849..ab276db782607 100644
--- a/Modules/_sqlite/cursor.c
+++ b/Modules/_sqlite/cursor.c
@@ -266,7 +266,7 @@ _pysqlite_fetch_one_row(pysqlite_Cursor* self)
item = PyBytes_FromStringAndSize(val_str, nbytes);
if (!item)
goto error;
- converted = _PyObject_CallOneArg(converter, item);
+ converted = PyObject_CallOneArg(converter, item);
Py_DECREF(item);
}
} else {
diff --git a/Modules/_sqlite/microprotocols.c b/Modules/_sqlite/microprotocols.c
index bdcb174be4379..bb0d19f653b31 100644
--- a/Modules/_sqlite/microprotocols.c
+++ b/Modules/_sqlite/microprotocols.c
@@ -92,7 +92,7 @@ pysqlite_microprotocols_adapt(PyObject *obj, PyObject *proto, PyObject *alt)
Py_DECREF(key);
if (adapter) {
Py_INCREF(adapter);
- adapted = _PyObject_CallOneArg(adapter, obj);
+ adapted = PyObject_CallOneArg(adapter, obj);
Py_DECREF(adapter);
return adapted;
}
@@ -105,7 +105,7 @@ pysqlite_microprotocols_adapt(PyObject *obj, PyObject *proto, PyObject *alt)
return NULL;
}
if (adapter) {
- adapted = _PyObject_CallOneArg(adapter, obj);
+ adapted = PyObject_CallOneArg(adapter, obj);
Py_DECREF(adapter);
if (adapted == Py_None) {
@@ -124,7 +124,7 @@ pysqlite_microprotocols_adapt(PyObject *obj, PyObject *proto, PyObject *alt)
return NULL;
}
if (adapter) {
- adapted = _PyObject_CallOneArg(adapter, proto);
+ adapted = PyObject_CallOneArg(adapter, proto);
Py_DECREF(adapter);
if (adapted == Py_None) {
diff --git a/Modules/_sre.c b/Modules/_sre.c
index 6518e98f04e40..80c4184922941 100644
--- a/Modules/_sre.c
+++ b/Modules/_sre.c
@@ -1081,7 +1081,7 @@ pattern_subx(PatternObject* self, PyObject* ptemplate, PyObject* string,
match = pattern_new_match(self, &state, 1);
if (!match)
goto error;
- item = _PyObject_CallOneArg(filter, match);
+ item = PyObject_CallOneArg(filter, match);
Py_DECREF(match);
if (!item)
goto error;
diff --git a/Modules/_struct.c b/Modules/_struct.c
index cc536b46a623e..0cdfe268e645f 100644
--- a/Modules/_struct.c
+++ b/Modules/_struct.c
@@ -2097,7 +2097,7 @@ cache_struct_converter(PyObject *fmt, PyStructObject **ptr)
return 0;
}
- s_object = _PyObject_CallOneArg(_structmodulestate_global->PyStructType, fmt);
+ s_object = PyObject_CallOneArg(_structmodulestate_global->PyStructType, fmt);
if (s_object != NULL) {
if (PyDict_GET_SIZE(cache) >= MAXCACHE)
PyDict_Clear(cache);
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
index e6d30341cdfb1..eb31a0ef5c933 100644
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -4846,7 +4846,7 @@ test_pyobject_fastcalldict(PyObject *self, PyObject *args)
return NULL;
}
- return _PyObject_FastCallDict(func, stack, nargs, kwargs);
+ return PyObject_VectorcallDict(func, stack, nargs, kwargs);
}
@@ -4880,7 +4880,7 @@ test_pyobject_vectorcall(PyObject *self, PyObject *args)
PyErr_SetString(PyExc_TypeError, "kwnames must be None or a tuple");
return NULL;
}
- return _PyObject_Vectorcall(func, stack, nargs, kwnames);
+ return PyObject_Vectorcall(func, stack, nargs, kwnames);
}
@@ -5253,7 +5253,7 @@ meth_fastcall_keywords(PyObject* self, PyObject* const* args,
if (pyargs == NULL) {
return NULL;
}
- PyObject *pykwargs = _PyObject_Vectorcall((PyObject*)&PyDict_Type,
+ PyObject *pykwargs = PyObject_Vectorcall((PyObject*)&PyDict_Type,
args + nargs, 0, kwargs);
return Py_BuildValue("NNN", _null_to_none(self), pyargs, pykwargs);
}
@@ -6133,7 +6133,7 @@ static PyTypeObject MethodDescriptorBase_Type = {
.tp_call = PyVectorcall_Call,
.tp_vectorcall_offset = offsetof(MethodDescriptorObject, vectorcall),
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE |
- Py_TPFLAGS_METHOD_DESCRIPTOR | _Py_TPFLAGS_HAVE_VECTORCALL,
+ Py_TPFLAGS_METHOD_DESCRIPTOR | Py_TPFLAGS_HAVE_VECTORCALL,
.tp_descr_get = func_descr_get,
};
@@ -6172,7 +6172,7 @@ static PyTypeObject MethodDescriptor2_Type = {
.tp_new = MethodDescriptor2_new,
.tp_call = PyVectorcall_Call,
.tp_vectorcall_offset = offsetof(MethodDescriptor2Object, vectorcall),
- .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | _Py_TPFLAGS_HAVE_VECTORCALL,
+ .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_VECTORCALL,
};
PyDoc_STRVAR(heapgctype__doc__,
diff --git a/Modules/_xxtestfuzz/fuzzer.c b/Modules/_xxtestfuzz/fuzzer.c
index dae1eaeabd000..74ba819b8b50b 100644
--- a/Modules/_xxtestfuzz/fuzzer.c
+++ b/Modules/_xxtestfuzz/fuzzer.c
@@ -104,7 +104,7 @@ static int fuzz_json_loads(const char* data, size_t size) {
if (input_bytes == NULL) {
return 0;
}
- PyObject* parsed = _PyObject_CallOneArg(json_loads_method, input_bytes);
+ PyObject* parsed = PyObject_CallOneArg(json_loads_method, input_bytes);
if (parsed == NULL) {
/* Ignore ValueError as the fuzzer will more than likely
generate some invalid json and values */
@@ -263,7 +263,7 @@ static int fuzz_sre_match(const char* data, size_t size) {
PyObject* pattern = compiled_patterns[idx];
PyObject* match_callable = PyObject_GetAttrString(pattern, "match");
- PyObject* matches = _PyObject_CallOneArg(match_callable, to_match);
+ PyObject* matches = PyObject_CallOneArg(match_callable, to_match);
Py_XDECREF(matches);
Py_DECREF(match_callable);
diff --git a/Modules/cjkcodecs/cjkcodecs.h b/Modules/cjkcodecs/cjkcodecs.h
index 7ed836598b36d..8f6f880cadf71 100644
--- a/Modules/cjkcodecs/cjkcodecs.h
+++ b/Modules/cjkcodecs/cjkcodecs.h
@@ -291,7 +291,7 @@ getcodec(PyObject *self, PyObject *encoding)
if (codecobj == NULL)
return NULL;
- r = _PyObject_CallOneArg(cofunc, codecobj);
+ r = PyObject_CallOneArg(cofunc, codecobj);
Py_DECREF(codecobj);
return r;
diff --git a/Modules/cjkcodecs/multibytecodec.c b/Modules/cjkcodecs/multibytecodec.c
index 2dd63a9531e67..3bc07b2d8d5ae 100644
--- a/Modules/cjkcodecs/multibytecodec.c
+++ b/Modules/cjkcodecs/multibytecodec.c
@@ -92,7 +92,7 @@ call_error_callback(PyObject *errors, PyObject *exc)
if (cb == NULL)
return NULL;
- r = _PyObject_CallOneArg(cb, exc);
+ r = PyObject_CallOneArg(cb, exc);
Py_DECREF(cb);
return r;
}
diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c
index 5673f6028372f..cf164c17d7bf1 100644
--- a/Modules/gcmodule.c
+++ b/Modules/gcmodule.c
@@ -872,7 +872,7 @@ handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old)
_PyObject_ASSERT(op, callback != NULL);
/* copy-paste of weakrefobject.c's handle_callback() */
- temp = _PyObject_CallOneArg(callback, (PyObject *)wr);
+ temp = PyObject_CallOneArg(callback, (PyObject *)wr);
if (temp == NULL)
PyErr_WriteUnraisable(callback);
else
diff --git a/Modules/itertoolsmodule.c b/Modules/itertoolsmodule.c
index 0dafb65c288e4..c00c2745d3f0c 100644
--- a/Modules/itertoolsmodule.c
+++ b/Modules/itertoolsmodule.c
@@ -134,7 +134,7 @@ groupby_step(groupbyobject *gbo)
newkey = newvalue;
Py_INCREF(newvalue);
} else {
- newkey = _PyObject_CallOneArg(gbo->keyfunc, newvalue);
+ newkey = PyObject_CallOneArg(gbo->keyfunc, newvalue);
if (newkey == NULL) {
Py_DECREF(newvalue);
return -1;
@@ -1219,7 +1219,7 @@ dropwhile_next(dropwhileobject *lz)
if (lz->start == 1)
return item;
- good = _PyObject_CallOneArg(lz->func, item);
+ good = PyObject_CallOneArg(lz->func, item);
if (good == NULL) {
Py_DECREF(item);
return NULL;
@@ -1382,7 +1382,7 @@ takewhile_next(takewhileobject *lz)
if (item == NULL)
return NULL;
- good = _PyObject_CallOneArg(lz->func, item);
+ good = PyObject_CallOneArg(lz->func, item);
if (good == NULL) {
Py_DECREF(item);
return NULL;
@@ -3918,7 +3918,7 @@ filterfalse_next(filterfalseobject *lz)
ok = PyObject_IsTrue(item);
} else {
PyObject *good;
- good = _PyObject_CallOneArg(lz->func, item);
+ good = PyObject_CallOneArg(lz->func, item);
if (good == NULL) {
Py_DECREF(item);
return NULL;
diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c
index 90167342fee50..a7f8b5086bbfa 100644
--- a/Modules/pyexpat.c
+++ b/Modules/pyexpat.c
@@ -119,7 +119,7 @@ set_error(xmlparseobject *self, enum XML_Error code)
XML_ErrorString(code), lineno, column);
if (buffer == NULL)
return NULL;
- err = _PyObject_CallOneArg(ErrorObject, buffer);
+ err = PyObject_CallOneArg(ErrorObject, buffer);
Py_DECREF(buffer);
if ( err != NULL
&& set_error_attr(err, "code", code)
diff --git a/Objects/abstract.c b/Objects/abstract.c
index 7ab58a8bd52c3..f0e01f7691bb3 100644
--- a/Objects/abstract.c
+++ b/Objects/abstract.c
@@ -179,7 +179,7 @@ PyObject_GetItem(PyObject *o, PyObject *key)
return NULL;
}
if (meth) {
- result = _PyObject_CallOneArg(meth, key);
+ result = PyObject_CallOneArg(meth, key);
Py_DECREF(meth);
return result;
}
@@ -780,7 +780,7 @@ PyObject_Format(PyObject *obj, PyObject *format_spec)
}
/* And call it. */
- result = _PyObject_CallOneArg(meth, format_spec);
+ result = PyObject_CallOneArg(meth, format_spec);
Py_DECREF(meth);
if (result && !PyUnicode_Check(result)) {
@@ -2502,7 +2502,7 @@ object_recursive_isinstance(PyThreadState *tstate, PyObject *inst, PyObject *cls
return -1;
}
- PyObject *res = _PyObject_CallOneArg(checker, inst);
+ PyObject *res = PyObject_CallOneArg(checker, inst);
_Py_LeaveRecursiveCall(tstate);
Py_DECREF(checker);
@@ -2588,7 +2588,7 @@ object_issubclass(PyThreadState *tstate, PyObject *derived, PyObject *cls)
Py_DECREF(checker);
return ok;
}
- PyObject *res = _PyObject_CallOneArg(checker, derived);
+ PyObject *res = PyObject_CallOneArg(checker, derived);
_Py_LeaveRecursiveCall(tstate);
Py_DECREF(checker);
if (res != NULL) {
diff --git a/Objects/bytearrayobject.c b/Objects/bytearrayobject.c
index b2808c05b40ca..a3fc35ca4d22a 100644
--- a/Objects/bytearrayobject.c
+++ b/Objects/bytearrayobject.c
@@ -89,7 +89,7 @@ _canresize(PyByteArrayObject *self)
PyObject *
PyByteArray_FromObject(PyObject *input)
{
- return _PyObject_CallOneArg((PyObject *)&PyByteArray_Type, input);
+ return PyObject_CallOneArg((PyObject *)&PyByteArray_Type, input);
}
static PyObject *
@@ -2015,7 +2015,7 @@ bytearray_fromhex_impl(PyTypeObject *type, PyObject *string)
{
PyObject *result = _PyBytes_FromHex(string, type == &PyByteArray_Type);
if (type != &PyByteArray_Type && result != NULL) {
- Py_SETREF(result, _PyObject_CallOneArg((PyObject *)type, result));
+ Py_SETREF(result, PyObject_CallOneArg((PyObject *)type, result));
}
return result;
}
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c
index e139bed71bf6d..df3eddae6a36d 100644
--- a/Objects/bytesobject.c
+++ b/Objects/bytesobject.c
@@ -2259,7 +2259,7 @@ bytes_fromhex_impl(PyTypeObject *type, PyObject *string)
{
PyObject *result = _PyBytes_FromHex(string, 0);
if (type != &PyBytes_Type && result != NULL) {
- Py_SETREF(result, _PyObject_CallOneArg((PyObject *)type, result));
+ Py_SETREF(result, PyObject_CallOneArg((PyObject *)type, result));
}
return result;
}
diff --git a/Objects/call.c b/Objects/call.c
index d1d50b647f365..37d079d169d9d 100644
--- a/Objects/call.c
+++ b/Objects/call.c
@@ -95,7 +95,7 @@ _PyObject_FastCallDictTstate(PyThreadState *tstate, PyObject *callable,
{
assert(callable != NULL);
- /* _PyObject_FastCallDict() must not be called with an exception set,
+ /* PyObject_VectorcallDict() must not be called with an exception set,
because it can clear it (directly or indirectly) and so the
caller loses its exception */
assert(!_PyErr_Occurred(tstate));
@@ -105,7 +105,7 @@ _PyObject_FastCallDictTstate(PyThreadState *tstate, PyObject *callable,
assert(nargs == 0 || args != NULL);
assert(kwargs == NULL || PyDict_Check(kwargs));
- vectorcallfunc func = _PyVectorcall_Function(callable);
+ vectorcallfunc func = PyVectorcall_Function(callable);
if (func == NULL) {
/* Use tp_call instead */
return _PyObject_MakeTpCall(tstate, callable, args, nargs, kwargs);
@@ -133,7 +133,7 @@ _PyObject_FastCallDictTstate(PyThreadState *tstate, PyObject *callable,
PyObject *
-_PyObject_FastCallDict(PyObject *callable, PyObject *const *args,
+PyObject_VectorcallDict(PyObject *callable, PyObject *const *args,
size_t nargsf, PyObject *kwargs)
{
PyThreadState *tstate = _PyThreadState_GET();
@@ -204,8 +204,8 @@ PyVectorcall_Call(PyObject *callable, PyObject *tuple, PyObject *kwargs)
{
PyThreadState *tstate = _PyThreadState_GET();
- /* get vectorcallfunc as in _PyVectorcall_Function, but without
- * the _Py_TPFLAGS_HAVE_VECTORCALL check */
+ /* get vectorcallfunc as in PyVectorcall_Function, but without
+ * the Py_TPFLAGS_HAVE_VECTORCALL check */
Py_ssize_t offset = Py_TYPE(callable)->tp_vectorcall_offset;
if (offset <= 0) {
_PyErr_Format(tstate, PyExc_TypeError,
@@ -259,7 +259,7 @@ _PyObject_Call(PyThreadState *tstate, PyObject *callable,
assert(PyTuple_Check(args));
assert(kwargs == NULL || PyDict_Check(kwargs));
- if (_PyVectorcall_Function(callable) != NULL) {
+ if (PyVectorcall_Function(callable) != NULL) {
return PyVectorcall_Call(callable, args, kwargs);
}
else {
@@ -796,7 +796,7 @@ object_vacall(PyThreadState *tstate, PyObject *base,
PyObject *
-_PyObject_VectorcallMethod(PyObject *name, PyObject *const *args,
+PyObject_VectorcallMethod(PyObject *name, PyObject *const *args,
size_t nargsf, PyObject *kwnames)
{
assert(name != NULL);
diff --git a/Objects/classobject.c b/Objects/classobject.c
index fb89b8aa69324..33afbcd874775 100644
--- a/Objects/classobject.c
+++ b/Objects/classobject.c
@@ -350,7 +350,7 @@ PyTypeObject PyMethod_Type = {
PyObject_GenericSetAttr, /* tp_setattro */
0, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
- _Py_TPFLAGS_HAVE_VECTORCALL, /* tp_flags */
+ Py_TPFLAGS_HAVE_VECTORCALL, /* tp_flags */
method_doc, /* tp_doc */
(traverseproc)method_traverse, /* tp_traverse */
0, /* tp_clear */
diff --git a/Objects/descrobject.c b/Objects/descrobject.c
index 49c26eb069233..aaaa4479e4b92 100644
--- a/Objects/descrobject.c
+++ b/Objects/descrobject.c
@@ -454,7 +454,7 @@ classmethoddescr_call(PyMethodDescrObject *descr, PyObject *args,
if (bound == NULL) {
return NULL;
}
- PyObject *res = _PyObject_FastCallDict(bound, _PyTuple_ITEMS(args)+1,
+ PyObject *res = PyObject_VectorcallDict(bound, _PyTuple_ITEMS(args)+1,
argc-1, kwds);
Py_DECREF(bound);
return res;
@@ -673,7 +673,7 @@ PyTypeObject PyMethodDescr_Type = {
0, /* tp_setattro */
0, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
- _Py_TPFLAGS_HAVE_VECTORCALL |
+ Py_TPFLAGS_HAVE_VECTORCALL |
Py_TPFLAGS_METHOD_DESCRIPTOR, /* tp_flags */
0, /* tp_doc */
descr_traverse, /* tp_traverse */
@@ -1493,7 +1493,7 @@ property_descr_get(PyObject *self, PyObject *obj, PyObject *type)
return NULL;
}
- return _PyObject_CallOneArg(gs->prop_get, obj);
+ return PyObject_CallOneArg(gs->prop_get, obj);
}
static int
@@ -1514,7 +1514,7 @@ property_descr_set(PyObject *self, PyObject *obj, PyObject *value)
return -1;
}
if (value == NULL)
- res = _PyObject_CallOneArg(func, obj);
+ res = PyObject_CallOneArg(func, obj);
else
res = PyObject_CallFunctionObjArgs(func, obj, value, NULL);
if (res == NULL)
diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index 164104ed7e151..8f6ce3996a172 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -2127,7 +2127,7 @@ dict_subscript(PyDictObject *mp, PyObject *key)
_Py_IDENTIFIER(__missing__);
missing = _PyObject_LookupSpecial((PyObject *)mp, &PyId___missing__);
if (missing != NULL) {
- res = _PyObject_CallOneArg(missing, key);
+ res = PyObject_CallOneArg(missing, key);
Py_DECREF(missing);
return res;
}
diff --git a/Objects/fileobject.c b/Objects/fileobject.c
index c0eff8bed5136..840d17bee66ba 100644
--- a/Objects/fileobject.c
+++ b/Objects/fileobject.c
@@ -137,7 +137,7 @@ PyFile_WriteObject(PyObject *v, PyObject *f, int flags)
Py_DECREF(writer);
return -1;
}
- result = _PyObject_CallOneArg(writer, value);
+ result = PyObject_CallOneArg(writer, value);
Py_DECREF(value);
Py_DECREF(writer);
if (result == NULL)
diff --git a/Objects/floatobject.c b/Objects/floatobject.c
index dfc5b196f18e4..648030b659c23 100644
--- a/Objects/floatobject.c
+++ b/Objects/floatobject.c
@@ -1490,7 +1490,7 @@ float_fromhex(PyTypeObject *type, PyObject *string)
goto parse_error;
result = PyFloat_FromDouble(negate ? -x : x);
if (type != &PyFloat_Type && result != NULL) {
- Py_SETREF(result, _PyObject_CallOneArg((PyObject *)type, result));
+ Py_SETREF(result, PyObject_CallOneArg((PyObject *)type, result));
}
return result;
diff --git a/Objects/funcobject.c b/Objects/funcobject.c
index ebe68adc3362e..419db33602a36 100644
--- a/Objects/funcobject.c
+++ b/Objects/funcobject.c
@@ -654,7 +654,7 @@ PyTypeObject PyFunction_Type = {
0, /* tp_setattro */
0, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
- _Py_TPFLAGS_HAVE_VECTORCALL |
+ Py_TPFLAGS_HAVE_VECTORCALL |
Py_TPFLAGS_METHOD_DESCRIPTOR, /* tp_flags */
func_new__doc__, /* tp_doc */
(traverseproc)func_traverse, /* tp_traverse */
diff --git a/Objects/genobject.c b/Objects/genobject.c
index 652c2903dd284..576d6856c7f30 100644
--- a/Objects/genobject.c
+++ b/Objects/genobject.c
@@ -58,7 +58,7 @@ _PyGen_Finalize(PyObject *self)
/* Save the current exception, if any. */
PyErr_Fetch(&error_type, &error_value, &error_traceback);
- res = _PyObject_CallOneArg(finalizer, self);
+ res = PyObject_CallOneArg(finalizer, self);
if (res == NULL) {
PyErr_WriteUnraisable(self);
@@ -563,7 +563,7 @@ _PyGen_SetStopIterationValue(PyObject *value)
return 0;
}
/* Construct an exception instance manually with
- * _PyObject_CallOneArg and pass it to PyErr_SetObject.
+ * PyObject_CallOneArg and pass it to PyErr_SetObject.
*
* We do this to handle a situation when "value" is a tuple, in which
* case PyErr_SetObject would set the value of StopIteration to
@@ -571,7 +571,7 @@ _PyGen_SetStopIterationValue(PyObject *value)
*
* (See PyErr_SetObject/_PyErr_CreateException code for details.)
*/
- e = _PyObject_CallOneArg(PyExc_StopIteration, value);
+ e = PyObject_CallOneArg(PyExc_StopIteration, value);
if (e == NULL) {
return -1;
}
@@ -1264,7 +1264,7 @@ async_gen_init_hooks(PyAsyncGenObject *o)
PyObject *res;
Py_INCREF(firstiter);
- res = _PyObject_CallOneArg(firstiter, (PyObject *)o);
+ res = PyObject_CallOneArg(firstiter, (PyObject *)o);
Py_DECREF(firstiter);
if (res == NULL) {
return 1;
diff --git a/Objects/listobject.c b/Objects/listobject.c
index a406e70694a69..3c39c6444bfd6 100644
--- a/Objects/listobject.c
+++ b/Objects/listobject.c
@@ -2226,7 +2226,7 @@ list_sort_impl(PyListObject *self, PyObject *keyfunc, int reverse)
}
for (i = 0; i < saved_ob_size ; i++) {
- keys[i] = _PyObject_CallOneArg(keyfunc, saved_ob_item[i]);
+ keys[i] = PyObject_CallOneArg(keyfunc, saved_ob_item[i]);
if (keys[i] == NULL) {
for (i=i-1 ; i>=0 ; i--)
Py_DECREF(keys[i]);
diff --git a/Objects/longobject.c b/Objects/longobject.c
index b4d0b0575bcf6..5d225cbd2fbde 100644
--- a/Objects/longobject.c
+++ b/Objects/longobject.c
@@ -5547,7 +5547,7 @@ int_from_bytes_impl(PyTypeObject *type, PyObject *bytes_obj,
Py_DECREF(bytes);
if (long_obj != NULL && type != &PyLong_Type) {
- Py_SETREF(long_obj, _PyObject_CallOneArg((PyObject *)type, long_obj));
+ Py_SETREF(long_obj, PyObject_CallOneArg((PyObject *)type, long_obj));
}
return long_obj;
diff --git a/Objects/memoryobject.c b/Objects/memoryobject.c
index d9dd11733ef1a..906d1cef69b1f 100644
--- a/Objects/memoryobject.c
+++ b/Objects/memoryobject.c
@@ -1963,7 +1963,7 @@ struct_get_unpacker(const char *fmt, Py_ssize_t itemsize)
if (format == NULL)
goto error;
- structobj = _PyObject_CallOneArg(Struct, format);
+ structobj = PyObject_CallOneArg(Struct, format);
if (structobj == NULL)
goto error;
@@ -2002,7 +2002,7 @@ struct_unpack_single(const char *ptr, struct unpacker *x)
PyObject *v;
memcpy(x->item, ptr, x->itemsize);
- v = _PyObject_CallOneArg(x->unpack_from, x->mview);
+ v = PyObject_CallOneArg(x->unpack_from, x->mview);
if (v == NULL)
return NULL;
diff --git a/Objects/methodobject.c b/Objects/methodobject.c
index 2a8111fea1c61..1d54c4cea6900 100644
--- a/Objects/methodobject.c
+++ b/Objects/methodobject.c
@@ -298,7 +298,7 @@ PyTypeObject PyCFunction_Type = {
0, /* tp_setattro */
0, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
- _Py_TPFLAGS_HAVE_VECTORCALL, /* tp_flags */
+ Py_TPFLAGS_HAVE_VECTORCALL, /* tp_flags */
0, /* tp_doc */
(traverseproc)meth_traverse, /* tp_traverse */
0, /* tp_clear */
diff --git a/Objects/moduleobject.c b/Objects/moduleobject.c
index 0a593261c4134..30de53d902bce 100644
--- a/Objects/moduleobject.c
+++ b/Objects/moduleobject.c
@@ -738,7 +738,7 @@ module_getattro(PyModuleObject *m, PyObject *name)
_Py_IDENTIFIER(__getattr__);
getattr = _PyDict_GetItemId(m->md_dict, &PyId___getattr__);
if (getattr) {
- return _PyObject_CallOneArg(getattr, name);
+ return PyObject_CallOneArg(getattr, name);
}
mod_name = _PyDict_GetItemId(m->md_dict, &PyId___name__);
if (mod_name && PyUnicode_Check(mod_name)) {
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index e6a84b017aa67..f32ccb137987c 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -1465,7 +1465,7 @@ static PyObject*
call_unbound_noarg(int unbound, PyObject *func, PyObject *self)
{
if (unbound) {
- return _PyObject_CallOneArg(func, self);
+ return PyObject_CallOneArg(func, self);
}
else {
return _PyObject_CallNoArg(func);
@@ -3665,7 +3665,7 @@ PyTypeObject PyType_Type = {
0, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
Py_TPFLAGS_BASETYPE | Py_TPFLAGS_TYPE_SUBCLASS |
- _Py_TPFLAGS_HAVE_VECTORCALL, /* tp_flags */
+ Py_TPFLAGS_HAVE_VECTORCALL, /* tp_flags */
type_doc, /* tp_doc */
(traverseproc)type_traverse, /* tp_traverse */
(inquiry)type_clear, /* tp_clear */
@@ -5196,17 +5196,17 @@ inherit_slots(PyTypeObject *type, PyTypeObject *base)
/* tp_hash see tp_richcompare */
{
/* Always inherit tp_vectorcall_offset to support PyVectorcall_Call().
- * If _Py_TPFLAGS_HAVE_VECTORCALL is not inherited, then vectorcall
+ * If Py_TPFLAGS_HAVE_VECTORCALL is not inherited, then vectorcall
* won't be used automatically. */
COPYSLOT(tp_vectorcall_offset);
- /* Inherit _Py_TPFLAGS_HAVE_VECTORCALL for non-heap types
+ /* Inherit Py_TPFLAGS_HAVE_VECTORCALL for non-heap types
* if tp_call is not overridden */
if (!type->tp_call &&
- (base->tp_flags & _Py_TPFLAGS_HAVE_VECTORCALL) &&
+ (base->tp_flags & Py_TPFLAGS_HAVE_VECTORCALL) &&
!(type->tp_flags & Py_TPFLAGS_HEAPTYPE))
{
- type->tp_flags |= _Py_TPFLAGS_HAVE_VECTORCALL;
+ type->tp_flags |= Py_TPFLAGS_HAVE_VECTORCALL;
}
COPYSLOT(tp_call);
}
@@ -5282,14 +5282,14 @@ PyType_Ready(PyTypeObject *type)
/* Consistency checks for PEP 590:
* - Py_TPFLAGS_METHOD_DESCRIPTOR requires tp_descr_get
- * - _Py_TPFLAGS_HAVE_VECTORCALL requires tp_call and
+ * - Py_TPFLAGS_HAVE_VECTORCALL requires tp_call and
* tp_vectorcall_offset > 0
* To avoid mistakes, we require this before inheriting.
*/
if (type->tp_flags & Py_TPFLAGS_METHOD_DESCRIPTOR) {
_PyObject_ASSERT((PyObject *)type, type->tp_descr_get != NULL);
}
- if (type->tp_flags & _Py_TPFLAGS_HAVE_VECTORCALL) {
+ if (type->tp_flags & Py_TPFLAGS_HAVE_VECTORCALL) {
_PyObject_ASSERT((PyObject *)type, type->tp_vectorcall_offset > 0);
_PyObject_ASSERT((PyObject *)type, type->tp_call != NULL);
}
@@ -6614,7 +6614,7 @@ call_attribute(PyObject *self, PyObject *attr, PyObject *name)
else
attr = descr;
}
- res = _PyObject_CallOneArg(attr, name);
+ res = PyObject_CallOneArg(attr, name);
Py_XDECREF(descr);
return res;
}
@@ -7575,7 +7575,7 @@ init_subclass(PyTypeObject *type, PyObject *kwds)
}
- result = _PyObject_FastCallDict(func, NULL, 0, kwds);
+ result = PyObject_VectorcallDict(func, NULL, 0, kwds);
Py_DECREF(func);
if (result == NULL) {
return -1;
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index aa874f2a12d29..68e4f6af1314d 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -4250,7 +4250,7 @@ unicode_decode_call_errorhandler_wchar(
if (*exceptionObject == NULL)
goto onError;
- restuple = _PyObject_CallOneArg(*errorHandler, *exceptionObject);
+ restuple = PyObject_CallOneArg(*errorHandler, *exceptionObject);
if (restuple == NULL)
goto onError;
if (!PyTuple_Check(restuple)) {
@@ -4354,7 +4354,7 @@ unicode_decode_call_errorhandler_writer(
if (*exceptionObject == NULL)
goto onError;
- restuple = _PyObject_CallOneArg(*errorHandler, *exceptionObject);
+ restuple = PyObject_CallOneArg(*errorHandler, *exceptionObject);
if (restuple == NULL)
goto onError;
if (!PyTuple_Check(restuple)) {
@@ -6801,7 +6801,7 @@ unicode_encode_call_errorhandler(const char *errors,
if (*exceptionObject == NULL)
return NULL;
- restuple = _PyObject_CallOneArg(*errorHandler, *exceptionObject);
+ restuple = PyObject_CallOneArg(*errorHandler, *exceptionObject);
if (restuple == NULL)
return NULL;
if (!PyTuple_Check(restuple)) {
@@ -8783,7 +8783,7 @@ unicode_translate_call_errorhandler(const char *errors,
if (*exceptionObject == NULL)
return NULL;
- restuple = _PyObject_CallOneArg(*errorHandler, *exceptionObject);
+ restuple = PyObject_CallOneArg(*errorHandler, *exceptionObject);
if (restuple == NULL)
return NULL;
if (!PyTuple_Check(restuple)) {
diff --git a/Objects/weakrefobject.c b/Objects/weakrefobject.c
index 18c737e7e4097..7a5d9fb88af14 100644
--- a/Objects/weakrefobject.c
+++ b/Objects/weakrefobject.c
@@ -933,7 +933,7 @@ PyWeakref_GetObject(PyObject *ref)
static void
handle_callback(PyWeakReference *ref, PyObject *callback)
{
- PyObject *cbresult = _PyObject_CallOneArg(callback, (PyObject *)ref);
+ PyObject *cbresult = PyObject_CallOneArg(callback, (PyObject *)ref);
if (cbresult == NULL)
PyErr_WriteUnraisable(callback);
diff --git a/Python/_warnings.c b/Python/_warnings.c
index 9e8b52d353dab..acef313fc9f25 100644
--- a/Python/_warnings.c
+++ b/Python/_warnings.c
@@ -593,7 +593,7 @@ call_show_warning(PyObject *category, PyObject *text, PyObject *message,
if (msg == NULL)
goto error;
- res = _PyObject_CallOneArg(show_fn, msg);
+ res = PyObject_CallOneArg(show_fn, msg);
Py_DECREF(show_fn);
Py_DECREF(msg);
@@ -654,7 +654,7 @@ warn_explicit(PyObject *category, PyObject *message,
}
else {
text = message;
- message = _PyObject_CallOneArg(category, message);
+ message = PyObject_CallOneArg(category, message);
if (message == NULL)
goto cleanup;
}
@@ -997,7 +997,7 @@ get_source_line(PyObject *module_globals, int lineno)
return NULL;
}
/* Call get_source() to get the source code. */
- source = _PyObject_CallOneArg(get_source, module_name);
+ source = PyObject_CallOneArg(get_source, module_name);
Py_DECREF(get_source);
Py_DECREF(module_name);
if (!source) {
@@ -1284,7 +1284,7 @@ _PyErr_WarnUnawaitedCoroutine(PyObject *coro)
int warned = 0;
PyObject *fn = get_warnings_attr(&PyId__warn_unawaited_coroutine, 1);
if (fn) {
- PyObject *res = _PyObject_CallOneArg(fn, coro);
+ PyObject *res = PyObject_CallOneArg(fn, coro);
Py_DECREF(fn);
if (res || PyErr_ExceptionMatches(PyExc_RuntimeWarning)) {
warned = 1;
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index 980b81041b4f9..cb048af97855f 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -56,7 +56,7 @@ update_bases(PyObject *bases, PyObject *const *args, Py_ssize_t nargs)
}
continue;
}
- new_base = _PyObject_CallOneArg(meth, bases);
+ new_base = PyObject_CallOneArg(meth, bases);
Py_DECREF(meth);
if (!new_base) {
goto error;
@@ -203,7 +203,7 @@ builtin___build_class__(PyObject *self, PyObject *const *args, Py_ssize_t nargs,
}
else {
PyObject *pargs[2] = {name, bases};
- ns = _PyObject_FastCallDict(prep, pargs, 2, mkw);
+ ns = PyObject_VectorcallDict(prep, pargs, 2, mkw);
Py_DECREF(prep);
}
if (ns == NULL) {
@@ -229,7 +229,7 @@ builtin___build_class__(PyObject *self, PyObject *const *args, Py_ssize_t nargs,
}
}
PyObject *margs[3] = {name, bases, ns};
- cls = _PyObject_FastCallDict(meta, margs, 3, mkw);
+ cls = PyObject_VectorcallDict(meta, margs, 3, mkw);
if (cls != NULL && PyType_Check(cls) && PyCell_Check(cell)) {
PyObject *cell_cls = PyCell_GET(cell);
if (cell_cls != cls) {
@@ -489,7 +489,7 @@ builtin_breakpoint(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyOb
}
Py_INCREF(hook);
- PyObject *retval = _PyObject_Vectorcall(hook, args, nargs, keywords);
+ PyObject *retval = PyObject_Vectorcall(hook, args, nargs, keywords);
Py_DECREF(hook);
return retval;
}
@@ -575,7 +575,7 @@ filter_next(filterobject *lz)
ok = PyObject_IsTrue(item);
} else {
PyObject *good;
- good = _PyObject_CallOneArg(lz->func, item);
+ good = PyObject_CallOneArg(lz->func, item);
if (good == NULL) {
Py_DECREF(item);
return NULL;
@@ -1631,7 +1631,7 @@ min_max(PyObject *args, PyObject *kwds, int op)
while (( item = PyIter_Next(it) )) {
/* get the value from the key function */
if (keyfunc != NULL) {
- val = _PyObject_CallOneArg(keyfunc, item);
+ val = PyObject_CallOneArg(keyfunc, item);
if (val == NULL)
goto Fail_it_item;
}
@@ -2178,7 +2178,7 @@ builtin_round_impl(PyObject *module, PyObject *number, PyObject *ndigits)
if (ndigits == Py_None)
result = _PyObject_CallNoArg(round);
else
- result = _PyObject_CallOneArg(round, ndigits);
+ result = PyObject_CallOneArg(round, ndigits);
Py_DECREF(round);
return result;
}
@@ -2234,7 +2234,7 @@ builtin_sorted(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject
}
assert(nargs >= 1);
- v = _PyObject_Vectorcall(callable, args + 1, nargs - 1, kwnames);
+ v = PyObject_Vectorcall(callable, args + 1, nargs - 1, kwnames);
Py_DECREF(callable);
if (v == NULL) {
Py_DECREF(newlist);
diff --git a/Python/ceval.c b/Python/ceval.c
index deba99ed7ace2..eb0f131ae8c86 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -1874,7 +1874,7 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag)
Py_DECREF(value);
goto error;
}
- res = _PyObject_CallOneArg(hook, value);
+ res = PyObject_CallOneArg(hook, value);
Py_DECREF(value);
if (res == NULL)
goto error;
@@ -3271,7 +3271,7 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag)
assert(!PyLong_Check(exc));
exit_func = PEEK(7);
PyObject *stack[4] = {NULL, exc, val, tb};
- res = _PyObject_Vectorcall(exit_func, stack + 1,
+ res = PyObject_Vectorcall(exit_func, stack + 1,
3 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
if (res == NULL)
goto error;
@@ -4846,7 +4846,7 @@ trace_call_function(PyThreadState *tstate,
{
PyObject *x;
if (PyCFunction_Check(func)) {
- C_TRACE(x, _PyObject_Vectorcall(func, args, nargs, kwnames));
+ C_TRACE(x, PyObject_Vectorcall(func, args, nargs, kwnames));
return x;
}
else if (Py_TYPE(func) == &PyMethodDescr_Type && nargs > 0) {
@@ -4862,13 +4862,13 @@ trace_call_function(PyThreadState *tstate,
if (func == NULL) {
return NULL;
}
- C_TRACE(x, _PyObject_Vectorcall(func,
+ C_TRACE(x, PyObject_Vectorcall(func,
args+1, nargs-1,
kwnames));
Py_DECREF(func);
return x;
}
- return _PyObject_Vectorcall(func, args, nargs | PY_VECTORCALL_ARGUMENTS_OFFSET, kwnames);
+ return PyObject_Vectorcall(func, args, nargs | PY_VECTORCALL_ARGUMENTS_OFFSET, kwnames);
}
/* Issue #29227: Inline call_function() into _PyEval_EvalFrameDefault()
@@ -4887,7 +4887,7 @@ call_function(PyThreadState *tstate, PyObject ***pp_stack, Py_ssize_t oparg, PyO
x = trace_call_function(tstate, func, stack, nargs, kwnames);
}
else {
- x = _PyObject_Vectorcall(func, stack, nargs | PY_VECTORCALL_ARGUMENTS_OFFSET, kwnames);
+ x = PyObject_Vectorcall(func, stack, nargs | PY_VECTORCALL_ARGUMENTS_OFFSET, kwnames);
}
assert((x != NULL) ^ (_PyErr_Occurred(tstate) != NULL));
diff --git a/Python/codecs.c b/Python/codecs.c
index ee2758c5fbe91..ce86cb20ccccc 100644
--- a/Python/codecs.c
+++ b/Python/codecs.c
@@ -147,7 +147,7 @@ PyObject *_PyCodec_Lookup(const char *encoding)
func = PyList_GetItem(interp->codec_search_path, i);
if (func == NULL)
goto onError;
- result = _PyObject_CallOneArg(func, v);
+ result = PyObject_CallOneArg(func, v);
if (result == NULL)
goto onError;
if (result == Py_None) {
@@ -317,7 +317,7 @@ PyObject *codec_getstreamcodec(const char *encoding,
if (errors != NULL)
streamcodec = PyObject_CallFunction(codeccls, "Os", stream, errors);
else
- streamcodec = _PyObject_CallOneArg(codeccls, stream);
+ streamcodec = PyObject_CallOneArg(codeccls, stream);
Py_DECREF(codecs);
return streamcodec;
}
diff --git a/Python/errors.c b/Python/errors.c
index 652f4c9de7a84..f11b66e7958ea 100644
--- a/Python/errors.c
+++ b/Python/errors.c
@@ -93,7 +93,7 @@ _PyErr_CreateException(PyObject *exception, PyObject *value)
return PyObject_Call(exception, value, NULL);
}
else {
- return _PyObject_CallOneArg(exception, value);
+ return PyObject_CallOneArg(exception, value);
}
}
@@ -907,7 +907,7 @@ PyErr_SetImportErrorSubclass(PyObject *exception, PyObject *msg,
goto done;
}
- error = _PyObject_FastCallDict(exception, &msg, 1, kwargs);
+ error = PyObject_VectorcallDict(exception, &msg, 1, kwargs);
if (error != NULL) {
_PyErr_SetObject(tstate, (PyObject *)Py_TYPE(error), error);
Py_DECREF(error);
@@ -1422,7 +1422,7 @@ _PyErr_WriteUnraisableMsg(const char *err_msg_str, PyObject *obj)
goto default_hook;
}
- PyObject *res = _PyObject_CallOneArg(hook, hook_args);
+ PyObject *res = PyObject_CallOneArg(hook, hook_args);
Py_DECREF(hook_args);
if (res != NULL) {
Py_DECREF(res);
diff --git a/Python/import.c b/Python/import.c
index 8bf044827c6e9..392d711299e0e 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -1206,7 +1206,7 @@ get_path_importer(PyThreadState *tstate, PyObject *path_importer_cache,
PyObject *hook = PyList_GetItem(path_hooks, j);
if (hook == NULL)
return NULL;
- importer = _PyObject_CallOneArg(hook, p);
+ importer = PyObject_CallOneArg(hook, p);
if (importer != NULL)
break;
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index 707a08e7f4996..a7f8c0b719639 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -519,7 +519,7 @@ sys_breakpointhook(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyOb
return NULL;
}
PyMem_RawFree(envar);
- PyObject *retval = _PyObject_Vectorcall(hook, args, nargs, keywords);
+ PyObject *retval = PyObject_Vectorcall(hook, args, nargs, keywords);
Py_DECREF(hook);
return retval;
1
0
11 Feb '20
https://github.com/python/cpython/commit/d3f9fb2d28ceedb0a17a703338424ff284…
commit: d3f9fb2d28ceedb0a17a703338424ff284a578c8
branch: 3.8
author: Miss Islington (bot) <31488909+miss-islington(a)users.noreply.github.com>
committer: GitHub <noreply(a)github.com>
date: 2020-02-11T07:32:40-08:00
summary:
bpo-39299: Add more tests for mimetypes and its cli. (GH-17949)
* Add tests for case insensitive check of types and extensions as fallback.
* Add tests for data url with no comma.
* Add tests for read_mime_types.
* Add tests for the mimetypes cli and refactor __main__ code to private function.
* Restore mimetypes.knownfiles value at the end of the test.
(cherry picked from commit d8efc1495194228c3a4cd472200275d6491d8e2d)
Co-authored-by: Karthikeyan Singaravelan <tir.karthi(a)gmail.com>
files:
M Lib/mimetypes.py
M Lib/test/test_mimetypes.py
diff --git a/Lib/mimetypes.py b/Lib/mimetypes.py
index 9b42bf6dd2ca7..f33b658f10e5e 100644
--- a/Lib/mimetypes.py
+++ b/Lib/mimetypes.py
@@ -563,7 +563,7 @@ def _default_mime_types():
_default_mime_types()
-if __name__ == '__main__':
+def _main():
import getopt
USAGE = """\
@@ -607,3 +607,7 @@ def usage(code, msg=''):
guess, encoding = guess_type(gtype, strict)
if not guess: print("I don't know anything about type", gtype)
else: print('type:', guess, 'encoding:', encoding)
+
+
+if __name__ == '__main__':
+ _main()
diff --git a/Lib/test/test_mimetypes.py b/Lib/test/test_mimetypes.py
index a5a06b189dec4..9cac6ce0225e1 100644
--- a/Lib/test/test_mimetypes.py
+++ b/Lib/test/test_mimetypes.py
@@ -8,10 +8,20 @@
from test import support
from platform import win32_edition
-# Tell it we don't know about external files:
-mimetypes.knownfiles = []
-mimetypes.inited = False
-mimetypes._default_mime_types()
+
+def setUpModule():
+ global knownfiles
+ knownfiles = mimetypes.knownfiles
+
+ # Tell it we don't know about external files:
+ mimetypes.knownfiles = []
+ mimetypes.inited = False
+ mimetypes._default_mime_types()
+
+
+def tearDownModule():
+ # Restore knownfiles to its initial state
+ mimetypes.knownfiles = knownfiles
class MimeTypesTestCase(unittest.TestCase):
@@ -21,6 +31,7 @@ def setUp(self):
def test_default_data(self):
eq = self.assertEqual
eq(self.db.guess_type("foo.html"), ("text/html", None))
+ eq(self.db.guess_type("foo.HTML"), ("text/html", None))
eq(self.db.guess_type("foo.tgz"), ("application/x-tar", "gzip"))
eq(self.db.guess_type("foo.tar.gz"), ("application/x-tar", "gzip"))
eq(self.db.guess_type("foo.tar.Z"), ("application/x-tar", "compress"))
@@ -30,6 +41,7 @@ def test_default_data(self):
def test_data_urls(self):
eq = self.assertEqual
guess_type = self.db.guess_type
+ eq(guess_type("data:invalidDataWithoutComma"), (None, None))
eq(guess_type("data:,thisIsTextPlain"), ("text/plain", None))
eq(guess_type("data:;base64,thisIsTextPlain"), ("text/plain", None))
eq(guess_type("data:text/x-foo,thisIsTextXFoo"), ("text/x-foo", None))
@@ -42,6 +54,19 @@ def test_file_parsing(self):
("x-application/x-unittest", None))
eq(self.db.guess_extension("x-application/x-unittest"), ".pyunit")
+ def test_read_mime_types(self):
+ eq = self.assertEqual
+
+ # Unreadable file returns None
+ self.assertIsNone(mimetypes.read_mime_types("non-existent"))
+
+ with support.temp_dir() as directory:
+ data = "x-application/x-unittest pyunit\n"
+ file = pathlib.Path(directory, "sample.mimetype")
+ file.write_text(data)
+ mime_dict = mimetypes.read_mime_types(file)
+ eq(mime_dict[".pyunit"], "x-application/x-unittest")
+
def test_non_standard_types(self):
eq = self.assertEqual
# First try strict
@@ -49,7 +74,10 @@ def test_non_standard_types(self):
eq(self.db.guess_extension('image/jpg', strict=True), None)
# And then non-strict
eq(self.db.guess_type('foo.xul', strict=False), ('text/xul', None))
+ eq(self.db.guess_type('foo.XUL', strict=False), ('text/xul', None))
+ eq(self.db.guess_type('foo.invalid', strict=False), (None, None))
eq(self.db.guess_extension('image/jpg', strict=False), '.jpg')
+ eq(self.db.guess_extension('image/JPG', strict=False), '.jpg')
def test_filename_with_url_delimiters(self):
# bpo-38449: URL delimiters cases should be handled also.
@@ -200,5 +228,53 @@ def test__all__(self):
support.check__all__(self, mimetypes)
+class MimetypesCliTestCase(unittest.TestCase):
+
+ def mimetypes_cmd(self, *args, **kwargs):
+ support.patch(self, sys, "argv", [sys.executable, *args])
+ with support.captured_stdout() as output:
+ mimetypes._main()
+ return output.getvalue().strip()
+
+ def test_help_option(self):
+ support.patch(self, sys, "argv", [sys.executable, "-h"])
+ with support.captured_stdout() as output:
+ with self.assertRaises(SystemExit) as cm:
+ mimetypes._main()
+
+ self.assertIn("Usage: mimetypes.py", output.getvalue())
+ self.assertEqual(cm.exception.code, 0)
+
+ def test_invalid_option(self):
+ support.patch(self, sys, "argv", [sys.executable, "--invalid"])
+ with support.captured_stdout() as output:
+ with self.assertRaises(SystemExit) as cm:
+ mimetypes._main()
+
+ self.assertIn("Usage: mimetypes.py", output.getvalue())
+ self.assertEqual(cm.exception.code, 1)
+
+ def test_guess_extension(self):
+ eq = self.assertEqual
+
+ extension = self.mimetypes_cmd("-l", "-e", "image/jpg")
+ eq(extension, ".jpg")
+
+ extension = self.mimetypes_cmd("-e", "image/jpg")
+ eq(extension, "I don't know anything about type image/jpg")
+
+ extension = self.mimetypes_cmd("-e", "image/jpeg")
+ eq(extension, ".jpg")
+
+ def test_guess_type(self):
+ eq = self.assertEqual
+
+ type_info = self.mimetypes_cmd("-l", "foo.pic")
+ eq(type_info, "type: image/pict encoding: None")
+
+ type_info = self.mimetypes_cmd("foo.pic")
+ eq(type_info, "I don't know anything about type foo.pic")
+
+
if __name__ == "__main__":
unittest.main()
1
0
11 Feb '20
https://github.com/python/cpython/commit/f3e7ea5b8c220cd63101e419d529c8563f…
commit: f3e7ea5b8c220cd63101e419d529c8563f9c6115
branch: master
author: Victor Stinner <vstinner(a)python.org>
committer: GitHub <noreply(a)github.com>
date: 2020-02-11T14:29:33+01:00
summary:
bpo-39500: Document PyUnicode_IsIdentifier() function (GH-18397)
PyUnicode_IsIdentifier() does not call Py_FatalError() anymore if the
string is not ready.
files:
A Misc/NEWS.d/next/C API/2020-02-07-09-35-43.bpo-39500.xRAEgX.rst
M Doc/c-api/unicode.rst
M Objects/unicodeobject.c
M Parser/tokenizer.c
diff --git a/Doc/c-api/unicode.rst b/Doc/c-api/unicode.rst
index 96d77c4084132..b1787ed1ce89c 100644
--- a/Doc/c-api/unicode.rst
+++ b/Doc/c-api/unicode.rst
@@ -240,6 +240,16 @@ access internal read-only data of Unicode objects:
:c:func:`PyUnicode_nBYTE_DATA` family of macros.
+.. c:function:: int PyUnicode_IsIdentifier(PyObject *o)
+
+ Return ``1`` if the string is a valid identifier according to the language
+ definition, section :ref:`identifiers`. Return ``0`` otherwise.
+
+ .. versionchanged:: 3.9
+ The function does not call :c:func:`Py_FatalError` anymore if the string
+ is not ready.
+
+
Unicode Character Properties
""""""""""""""""""""""""""""
diff --git a/Misc/NEWS.d/next/C API/2020-02-07-09-35-43.bpo-39500.xRAEgX.rst b/Misc/NEWS.d/next/C API/2020-02-07-09-35-43.bpo-39500.xRAEgX.rst
new file mode 100644
index 0000000000000..2ca359f0ec11a
--- /dev/null
+++ b/Misc/NEWS.d/next/C API/2020-02-07-09-35-43.bpo-39500.xRAEgX.rst
@@ -0,0 +1,2 @@
+:c:func:`PyUnicode_IsIdentifier` does not call :c:func:`Py_FatalError`
+anymore if the string is not ready.
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index fd08ddbf57434..aa874f2a12d29 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -12198,22 +12198,33 @@ unicode_isnumeric_impl(PyObject *self)
int
PyUnicode_IsIdentifier(PyObject *self)
{
- int kind;
- void *data;
Py_ssize_t i;
- Py_UCS4 first;
+ int ready = PyUnicode_IS_READY(self);
- if (PyUnicode_READY(self) == -1) {
- Py_FatalError("identifier not ready");
+ Py_ssize_t len = ready ? PyUnicode_GET_LENGTH(self) : PyUnicode_GET_SIZE(self);
+ if (len == 0) {
+ /* an empty string is not a valid identifier */
return 0;
}
- /* Special case for empty strings */
- if (PyUnicode_GET_LENGTH(self) == 0)
- return 0;
- kind = PyUnicode_KIND(self);
- data = PyUnicode_DATA(self);
+ int kind;
+ void *data;
+ wchar_t *wstr;
+ if (ready) {
+ kind = PyUnicode_KIND(self);
+ data = PyUnicode_DATA(self);
+ }
+ else {
+ wstr = _PyUnicode_WSTR(self);
+ }
+ Py_UCS4 ch;
+ if (ready) {
+ ch = PyUnicode_READ(kind, data, 0);
+ }
+ else {
+ ch = wstr[0];
+ }
/* PEP 3131 says that the first character must be in
XID_Start and subsequent characters in XID_Continue,
and for the ASCII range, the 2.x rules apply (i.e
@@ -12222,13 +12233,21 @@ PyUnicode_IsIdentifier(PyObject *self)
definition of XID_Start and XID_Continue, it is sufficient
to check just for these, except that _ must be allowed
as starting an identifier. */
- first = PyUnicode_READ(kind, data, 0);
- if (!_PyUnicode_IsXidStart(first) && first != 0x5F /* LOW LINE */)
+ if (!_PyUnicode_IsXidStart(ch) && ch != 0x5F /* LOW LINE */) {
return 0;
+ }
- for (i = 1; i < PyUnicode_GET_LENGTH(self); i++)
- if (!_PyUnicode_IsXidContinue(PyUnicode_READ(kind, data, i)))
+ for (i = 1; i < len; i++) {
+ if (ready) {
+ ch = PyUnicode_READ(kind, data, i);
+ }
+ else {
+ ch = wstr[i];
+ }
+ if (!_PyUnicode_IsXidContinue(ch)) {
return 0;
+ }
+ }
return 1;
}
diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c
index f73c32684c7b7..c37cd927df5a4 100644
--- a/Parser/tokenizer.c
+++ b/Parser/tokenizer.c
@@ -1079,8 +1079,9 @@ verify_identifier(struct tok_state *tok)
}
result = PyUnicode_IsIdentifier(s);
Py_DECREF(s);
- if (result == 0)
+ if (result == 0) {
tok->done = E_IDENTIFIER;
+ }
return result;
}
1
0
To: python-checkins(a)python.org
Subject: Python 3.8.2rc1
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
https://github.com/python/cpython/commit/8623e68ea856830e084839e1d726c1f5be…
7203
commit: 8623e68ea856830e084839e1d726c1f5be727203
branch: 3.8
author: =C5=81ukasz Langa <lukasz(a)langa.pl>
committer: =C5=81ukasz Langa <lukasz(a)langa.pl>
date: 2020-02-10T20:08:24+01:00
summary:
Python 3.8.2rc1
files:
A Misc/NEWS.d/3.8.2rc1.rst
D Misc/NEWS.d/next/Build/2019-12-27-22-18-26.bpo-39144.dwHMlR.rst
D Misc/NEWS.d/next/Core and Builtins/2019-10-31-14-30-39.bpo-38610.fHdVMS.rst
D Misc/NEWS.d/next/Core and Builtins/2019-12-29-19-13-54.bpo-38588.pgXnNS.rst
D Misc/NEWS.d/next/Core and Builtins/2020-01-04-17-25-34.bpo-39215.xiqiIz.rst
D Misc/NEWS.d/next/Core and Builtins/2020-01-05-06-55-52.bpo-39216.74jLh9.rst
D Misc/NEWS.d/next/Core and Builtins/2020-01-06-10-29-16.bpo-39209.QHAONe.rst
D Misc/NEWS.d/next/Core and Builtins/2020-01-09-10-01-18.bpo-39235.RYwjoc.rst
D Misc/NEWS.d/next/Core and Builtins/2020-01-20-21-40-57.bpo-39386.ULqD8t.rst
D Misc/NEWS.d/next/Core and Builtins/2020-01-22-15-53-37.bpo-39421.O3nG7u.rst
D Misc/NEWS.d/next/Core and Builtins/2020-01-30-01-14-42.bpo-39492.eTuy0F.rst
D Misc/NEWS.d/next/Core and Builtins/2020-02-04-10-27-41.bpo-39510.PMIh-f.rst
D Misc/NEWS.d/next/Core and Builtins/2020-02-07-15-18-35.bpo-39579.itNmC0.rst
D Misc/NEWS.d/next/Documentation/2019-11-17-11-53-10.bpo-3530.8zFUMc.rst
D Misc/NEWS.d/next/Documentation/2019-12-15-22-04-41.bpo-38918.8JnDTS.rst
D Misc/NEWS.d/next/Documentation/2020-01-18-15-37-56.bpo-39381.wTWe8d.rst
D Misc/NEWS.d/next/Documentation/2020-01-27-18-18-42.bpo-39392.oiqcLO.rst
D Misc/NEWS.d/next/Documentation/2020-01-27-22-24-51.bpo-39153.Pjl8jV.rst
D Misc/NEWS.d/next/IDLE/2018-03-03-12-56-26.bpo-32989.FVhmhH.rst
D Misc/NEWS.d/next/IDLE/2019-11-13-23-51-39.bpo-38792.xhTC5a.rst
D Misc/NEWS.d/next/IDLE/2019-12-30-16-44-07.bpo-34118.FaNW0a.rst
D Misc/NEWS.d/next/IDLE/2020-01-22-22-28-06.bpo-39050.zkn0FO.rst
D Misc/NEWS.d/next/IDLE/2020-01-25-02-26-45.bpo-39388.x4TQNh.rst
D Misc/NEWS.d/next/IDLE/2020-01-27-16-44-29.bpo-30780.nR80qu.rst
D Misc/NEWS.d/next/Library/2019-09-29-08-17-03.bpo-38293.wls5s3.rst
D Misc/NEWS.d/next/Library/2019-10-14-21-14-55.bpo-38473.uXpVld.rst
D Misc/NEWS.d/next/Library/2019-10-31-19-23-25.bpo-35182.hzeNl9.rst
D Misc/NEWS.d/next/Library/2019-11-22-12-08-52.bpo-38878.EJ0cFf.rst
D Misc/NEWS.d/next/Library/2019-12-13-18-54-49.bpo-39033.cepuyD.rst
D Misc/NEWS.d/next/Library/2019-12-15-19-23-23.bpo-39055.FmN3un.rst
D Misc/NEWS.d/next/Library/2019-12-15-21-05-16.bpo-39056.nEfUM9.rst
D Misc/NEWS.d/next/Library/2019-12-15-21-47-54.bpo-39057.FOxn-w.rst
D Misc/NEWS.d/next/Library/2019-12-24-10-43-13.bpo-39129.jVx5rW.rst
D Misc/NEWS.d/next/Library/2019-12-31-19-27-23.bpo-39142.oqU5iD.rst
D Misc/NEWS.d/next/Library/2020-01-01-18-44-52.bpo-38871.3EEOLg.rst
D Misc/NEWS.d/next/Library/2020-01-02-17-28-03.bpo-39191.ur_scy.rst
D Misc/NEWS.d/next/Library/2020-01-02-20-21-03.bpo-39198.nzwGyG.rst
D Misc/NEWS.d/next/Library/2020-01-03-18-02-50.bpo-39152.JgPjCC.rst
D Misc/NEWS.d/next/Library/2020-01-06-02-14-38.bpo-38907.F1RkCR.rst
D Misc/NEWS.d/next/Library/2020-01-08-23-25-27.bpo-39242.bnL65N.rst
D Misc/NEWS.d/next/Library/2020-01-11-01-15-37.bpo-39297.y98Z6Q.rst
D Misc/NEWS.d/next/Library/2020-01-15-23-13-03.bpo-39274.lpc0-n.rst
D Misc/NEWS.d/next/Library/2020-01-20-00-56-01.bpo-39389.fEirIS.rst
D Misc/NEWS.d/next/Library/2020-01-23-21-34-29.bpo-39390.D2tSXk.rst
D Misc/NEWS.d/next/Library/2020-01-24-11-05-21.bpo-39430.I0UQzM.rst
D Misc/NEWS.d/next/Library/2020-01-24-13-24-35.bpo-39082.qKgrq_.rst
D Misc/NEWS.d/next/Library/2020-01-29-14-58-27.bpo-39485.Zy3ot6.rst
D Misc/NEWS.d/next/Library/2020-01-30-01-13-19.bpo-39493.CbFRi7.rst
D Misc/NEWS.d/next/Library/2020-02-02-14-46-34.bpo-39450.48R274.rst
D Misc/NEWS.d/next/Library/2020-02-05-11-24-16.bpo-38149.GWsjHE.rst
D Misc/NEWS.d/next/Library/2020-02-09-05-51-05.bpo-39590.rf98GU.rst
D Misc/NEWS.d/next/Security/2020-01-07-00-42-08.bpo-39184.fe7NgK.rst
D Misc/NEWS.d/next/Security/2020-01-28-20-54-09.bpo-39401.he7h_A.rst
D Misc/NEWS.d/next/Tests/2019-12-18-14-52-08.bpo-38546.2kxNuM.rst
D Misc/NEWS.d/next/Tests/2020-01-30-15-04-54.bpo-39502.chbpII.rst
D Misc/NEWS.d/next/Windows/2020-01-02-01-11-53.bpo-39185.T4herN.rst
D Misc/NEWS.d/next/Windows/2020-01-11-22-53-55.bpo-38883.X7FRaN.rst
D Misc/NEWS.d/next/Windows/2020-01-20-23-42-53.bpo-39393.gWlJDG.rst
D Misc/NEWS.d/next/Windows/2020-01-24-03-15-05.bpo-39439.sFxGfR.rst
M Include/patchlevel.h
M Lib/pydoc_data/topics.py
M README.rst
diff --git a/Include/patchlevel.h b/Include/patchlevel.h
index 503d3aa85676f..a40ef8232ece9 100644
--- a/Include/patchlevel.h
+++ b/Include/patchlevel.h
@@ -18,12 +18,12 @@
/*--start constants--*/
#define PY_MAJOR_VERSION 3
#define PY_MINOR_VERSION 8
-#define PY_MICRO_VERSION 1
-#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_FINAL
-#define PY_RELEASE_SERIAL 0
+#define PY_MICRO_VERSION 2
+#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_GAMMA
+#define PY_RELEASE_SERIAL 1
=20
/* Version as a string */
-#define PY_VERSION "3.8.1+"
+#define PY_VERSION "3.8.2rc1"
/*--end constants--*/
=20
/* Version as a single 4-byte hex number, e.g. 0x010502B2 =3D=3D 1.5.2b2.
diff --git a/Lib/pydoc_data/topics.py b/Lib/pydoc_data/topics.py
index 9d779d1e69f23..b9e741707cba5 100644
--- a/Lib/pydoc_data/topics.py
+++ b/Lib/pydoc_data/topics.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
-# Autogenerated by Sphinx on Wed Dec 18 18:17:58 2019
+# Autogenerated by Sphinx on Mon Feb 10 19:25:27 2020
topics =3D {'assert': 'The "assert" statement\n'
'**********************\n'
'\n'
@@ -470,24 +470,25 @@
'The following code:\n'
'\n'
' async for TARGET in ITER:\n'
- ' BLOCK\n'
+ ' SUITE\n'
' else:\n'
- ' BLOCK2\n'
+ ' SUITE2\n'
'\n'
'Is semantically equivalent to:\n'
'\n'
' iter =3D (ITER)\n'
' iter =3D type(iter).__aiter__(iter)\n'
' running =3D True\n'
+ '\n'
' while running:\n'
' try:\n'
' TARGET =3D await type(iter).__anext__(iter)\n'
' except StopAsyncIteration:\n'
' running =3D False\n'
' else:\n'
- ' BLOCK\n'
+ ' SUITE\n'
' else:\n'
- ' BLOCK2\n'
+ ' SUITE2\n'
'\n'
'See also "__aiter__()" and "__anext__()" for details.\n'
'\n'
@@ -507,23 +508,27 @@
'\n'
'The following code:\n'
'\n'
- ' async with EXPR as VAR:\n'
- ' BLOCK\n'
+ ' async with EXPRESSION as TARGET:\n'
+ ' SUITE\n'
'\n'
- 'Is semantically equivalent to:\n'
+ 'is semantically equivalent to:\n'
'\n'
- ' mgr =3D (EXPR)\n'
- ' aexit =3D type(mgr).__aexit__\n'
- ' aenter =3D type(mgr).__aenter__(mgr)\n'
+ ' manager =3D (EXPRESSION)\n'
+ ' aexit =3D type(manager).__aexit__\n'
+ ' aenter =3D type(manager).__aenter__\n'
+ ' value =3D await aenter(manager)\n'
+ ' hit_except =3D False\n'
'\n'
- ' VAR =3D await aenter\n'
' try:\n'
- ' BLOCK\n'
+ ' TARGET =3D value\n'
+ ' SUITE\n'
' except:\n'
- ' if not await aexit(mgr, *sys.exc_info()):\n'
+ ' hit_except =3D True\n'
+ ' if not await aexit(manager, *sys.exc_info()):\n'
' raise\n'
- ' else:\n'
- ' await aexit(mgr, None, None, None)\n'
+ ' finally:\n'
+ ' if not hit_except:\n'
+ ' await aexit(manager, None, None, None)\n'
'\n'
'See also "__aenter__()" and "__aexit__()" for details.\n'
'\n'
@@ -2518,11 +2523,13 @@
'"with_item")\n'
' is evaluated to obtain a context manager.\n'
'\n'
- '2. The context manager=E2=80=99s "__exit__()" is loaded for la=
ter use.\n'
+ '2. The context manager=E2=80=99s "__enter__()" is loaded for l=
ater use.\n'
+ '\n'
+ '3. The context manager=E2=80=99s "__exit__()" is loaded for la=
ter use.\n'
'\n'
- '3. The context manager=E2=80=99s "__enter__()" method is invok=
ed.\n'
+ '4. The context manager=E2=80=99s "__enter__()" method is invok=
ed.\n'
'\n'
- '4. If a target was included in the "with" statement, the retur=
n\n'
+ '5. If a target was included in the "with" statement, the retur=
n\n'
' value from "__enter__()" is assigned to it.\n'
'\n'
' Note: The "with" statement guarantees that if the '
@@ -2535,9 +2542,9 @@
'occurring\n'
' within the suite would be. See step 6 below.\n'
'\n'
- '5. The suite is executed.\n'
+ '6. The suite is executed.\n'
'\n'
- '6. The context manager=E2=80=99s "__exit__()" method is invoke=
d. If an\n'
+ '7. The context manager=E2=80=99s "__exit__()" method is invoke=
d. If an\n'
' exception caused the suite to be exited, its type, value, '
'and\n'
' traceback are passed as arguments to "__exit__()". Otherwis=
e, '
@@ -2559,18 +2566,42 @@
'proceeds\n'
' at the normal location for the kind of exit that was taken.=
\n'
'\n'
+ 'The following code:\n'
+ '\n'
+ ' with EXPRESSION as TARGET:\n'
+ ' SUITE\n'
+ '\n'
+ 'is semantically equivalent to:\n'
+ '\n'
+ ' manager =3D (EXPRESSION)\n'
+ ' enter =3D type(manager).__enter__\n'
+ ' exit =3D type(manager).__exit__\n'
+ ' value =3D enter(manager)\n'
+ ' hit_except =3D False\n'
+ '\n'
+ ' try:\n'
+ ' TARGET =3D value\n'
+ ' SUITE\n'
+ ' except:\n'
+ ' hit_except =3D True\n'
+ ' if not exit(manager, *sys.exc_info()):\n'
+ ' raise\n'
+ ' finally:\n'
+ ' if not hit_except:\n'
+ ' exit(manager, None, None, None)\n'
+ '\n'
'With more than one item, the context managers are processed as=
'
'if\n'
'multiple "with" statements were nested:\n'
'\n'
' with A() as a, B() as b:\n'
- ' suite\n'
+ ' SUITE\n'
'\n'
- 'is equivalent to\n'
+ 'is semantically equivalent to:\n'
'\n'
' with A() as a:\n'
' with B() as b:\n'
- ' suite\n'
+ ' SUITE\n'
'\n'
'Changed in version 3.1: Support for multiple context '
'expressions.\n'
@@ -2934,24 +2965,25 @@
'The following code:\n'
'\n'
' async for TARGET in ITER:\n'
- ' BLOCK\n'
+ ' SUITE\n'
' else:\n'
- ' BLOCK2\n'
+ ' SUITE2\n'
'\n'
'Is semantically equivalent to:\n'
'\n'
' iter =3D (ITER)\n'
' iter =3D type(iter).__aiter__(iter)\n'
' running =3D True\n'
+ '\n'
' while running:\n'
' try:\n'
' TARGET =3D await type(iter).__anext__(iter)\n'
' except StopAsyncIteration:\n'
' running =3D False\n'
' else:\n'
- ' BLOCK\n'
+ ' SUITE\n'
' else:\n'
- ' BLOCK2\n'
+ ' SUITE2\n'
'\n'
'See also "__aiter__()" and "__anext__()" for details.\n'
'\n'
@@ -2971,23 +3003,27 @@
'\n'
'The following code:\n'
'\n'
- ' async with EXPR as VAR:\n'
- ' BLOCK\n'
+ ' async with EXPRESSION as TARGET:\n'
+ ' SUITE\n'
'\n'
- 'Is semantically equivalent to:\n'
+ 'is semantically equivalent to:\n'
'\n'
- ' mgr =3D (EXPR)\n'
- ' aexit =3D type(mgr).__aexit__\n'
- ' aenter =3D type(mgr).__aenter__(mgr)\n'
+ ' manager =3D (EXPRESSION)\n'
+ ' aexit =3D type(manager).__aexit__\n'
+ ' aenter =3D type(manager).__aenter__\n'
+ ' value =3D await aenter(manager)\n'
+ ' hit_except =3D False\n'
'\n'
- ' VAR =3D await aenter\n'
' try:\n'
- ' BLOCK\n'
+ ' TARGET =3D value\n'
+ ' SUITE\n'
' except:\n'
- ' if not await aexit(mgr, *sys.exc_info()):\n'
+ ' hit_except =3D True\n'
+ ' if not await aexit(manager, *sys.exc_info()):\n'
' raise\n'
- ' else:\n'
- ' await aexit(mgr, None, None, None)\n'
+ ' finally:\n'
+ ' if not hit_except:\n'
+ ' await aexit(manager, None, None, None)\n'
'\n'
'See also "__aenter__()" and "__aexit__()" for details.\n'
'\n'
@@ -6803,7 +6839,7 @@
'object.__rfloordiv__(self, other)\n'
'object.__rmod__(self, other)\n'
'object.__rdivmod__(self, other)\n'
- 'object.__rpow__(self, other)\n'
+ 'object.__rpow__(self, other[, modulo])\n'
'object.__rlshift__(self, other)\n'
'object.__rrshift__(self, other)\n'
'object.__rand__(self, other)\n'
@@ -8963,7 +8999,9 @@
'bases,\n'
'**kwds)" (where the additional keyword arguments, if any, '
'come from\n'
- 'the class definition).\n'
+ 'the class definition). The "__prepare__" method should be '
+ 'implemented\n'
+ 'as a "classmethod()".\n'
'\n'
'If the metaclass has no "__prepare__" attribute, then the '
'class\n'
@@ -9477,7 +9515,7 @@
'object.__rfloordiv__(self, other)\n'
'object.__rmod__(self, other)\n'
'object.__rdivmod__(self, other)\n'
- 'object.__rpow__(self, other)\n'
+ 'object.__rpow__(self, other[, modulo])\n'
'object.__rlshift__(self, other)\n'
'object.__rrshift__(self, other)\n'
'object.__rand__(self, other)\n'
@@ -11918,8 +11956,9 @@
' bytecode offsets to line numbers (for details see the sourc=
e\n'
' code of the interpreter); "co_stacksize" is the required '
'stack\n'
- ' size (including local variables); "co_flags" is an integer\=
n'
- ' encoding a number of flags for the interpreter.\n'
+ ' size; "co_flags" is an integer encoding a number of flags '
+ 'for\n'
+ ' the interpreter.\n'
'\n'
' The following flag bits are defined for "co_flags": bit '
'"0x04"\n'
@@ -12372,6 +12411,8 @@
'dictionary. This\n'
' is a shortcut for "reversed(d.keys())".\n'
'\n'
+ ' New in version 3.8.\n'
+ '\n'
' setdefault(key[, default])\n'
'\n'
' If *key* is in the dictionary, return its value. If=
'
@@ -13577,11 +13618,13 @@
'1. The context expression (the expression given in the "with_item"=
)\n'
' is evaluated to obtain a context manager.\n'
'\n'
- '2. The context manager=E2=80=99s "__exit__()" is loaded for later =
use.\n'
+ '2. The context manager=E2=80=99s "__enter__()" is loaded for later=
use.\n'
'\n'
- '3. The context manager=E2=80=99s "__enter__()" method is invoked.\=
n'
+ '3. The context manager=E2=80=99s "__exit__()" is loaded for later =
use.\n'
'\n'
- '4. If a target was included in the "with" statement, the return\n'
+ '4. The context manager=E2=80=99s "__enter__()" method is invoked.\=
n'
+ '\n'
+ '5. If a target was included in the "with" statement, the return\n'
' value from "__enter__()" is assigned to it.\n'
'\n'
' Note: The "with" statement guarantees that if the "__enter__()"=
\n'
@@ -13591,9 +13634,9 @@
' target list, it will be treated the same as an error occurrin=
g\n'
' within the suite would be. See step 6 below.\n'
'\n'
- '5. The suite is executed.\n'
+ '6. The suite is executed.\n'
'\n'
- '6. The context manager=E2=80=99s "__exit__()" method is invoked. =
If an\n'
+ '7. The context manager=E2=80=99s "__exit__()" method is invoked. =
If an\n'
' exception caused the suite to be exited, its type, value, and\n'
' traceback are passed as arguments to "__exit__()". Otherwise, '
'three\n'
@@ -13613,17 +13656,41 @@
'proceeds\n'
' at the normal location for the kind of exit that was taken.\n'
'\n'
+ 'The following code:\n'
+ '\n'
+ ' with EXPRESSION as TARGET:\n'
+ ' SUITE\n'
+ '\n'
+ 'is semantically equivalent to:\n'
+ '\n'
+ ' manager =3D (EXPRESSION)\n'
+ ' enter =3D type(manager).__enter__\n'
+ ' exit =3D type(manager).__exit__\n'
+ ' value =3D enter(manager)\n'
+ ' hit_except =3D False\n'
+ '\n'
+ ' try:\n'
+ ' TARGET =3D value\n'
+ ' SUITE\n'
+ ' except:\n'
+ ' hit_except =3D True\n'
+ ' if not exit(manager, *sys.exc_info()):\n'
+ ' raise\n'
+ ' finally:\n'
+ ' if not hit_except:\n'
+ ' exit(manager, None, None, None)\n'
+ '\n'
'With more than one item, the context managers are processed as if\=
n'
'multiple "with" statements were nested:\n'
'\n'
' with A() as a, B() as b:\n'
- ' suite\n'
+ ' SUITE\n'
'\n'
- 'is equivalent to\n'
+ 'is semantically equivalent to:\n'
'\n'
' with A() as a:\n'
' with B() as b:\n'
- ' suite\n'
+ ' SUITE\n'
'\n'
'Changed in version 3.1: Support for multiple context expressions.\=
n'
'\n'
diff --git a/Misc/NEWS.d/3.8.2rc1.rst b/Misc/NEWS.d/3.8.2rc1.rst
new file mode 100644
index 0000000000000..a4b8a1ed8fb4f
--- /dev/null
+++ b/Misc/NEWS.d/3.8.2rc1.rst
@@ -0,0 +1,580 @@
+.. bpo: 39401
+.. date: 2020-01-28-20-54-09
+.. nonce: he7h_A
+.. release date: 2020-02-10
+.. section: Security
+
+Avoid unsafe load of ``api-ms-win-core-path-l1-1-0.dll`` at startup on
+Windows 7.
+
+..
+
+.. bpo: 39184
+.. date: 2020-01-07-00-42-08
+.. nonce: fe7NgK
+.. section: Security
+
+Add audit events to command execution functions in os and pty modules.
+
+..
+
+.. bpo: 39579
+.. date: 2020-02-07-15-18-35
+.. nonce: itNmC0
+.. section: Core and Builtins
+
+Change the ending column offset of `Attribute` nodes constructed in
+`ast_for_dotted_name` to point at the end of the current node and not at the
+end of the last `NAME` node.
+
+..
+
+.. bpo: 39510
+.. date: 2020-02-04-10-27-41
+.. nonce: PMIh-f
+.. section: Core and Builtins
+
+Fix segfault in ``readinto()`` method on closed BufferedReader.
+
+..
+
+.. bpo: 39492
+.. date: 2020-01-30-01-14-42
+.. nonce: eTuy0F
+.. section: Core and Builtins
+
+Fix a reference cycle in the C Pickler that was preventing the garbage
+collection of deleted, pickled objects.
+
+..
+
+.. bpo: 39421
+.. date: 2020-01-22-15-53-37
+.. nonce: O3nG7u
+.. section: Core and Builtins
+
+Fix possible crashes when operating with the functions in the :mod:`heapq`
+module and custom comparison operators.
+
+..
+
+.. bpo: 39386
+.. date: 2020-01-20-21-40-57
+.. nonce: ULqD8t
+.. section: Core and Builtins
+
+Prevent double awaiting of async iterator.
+
+..
+
+.. bpo: 39235
+.. date: 2020-01-09-10-01-18
+.. nonce: RYwjoc
+.. section: Core and Builtins
+
+Fix AST end location for lone generator expression in function call, e.g.
+f(i for i in a).
+
+..
+
+.. bpo: 39209
+.. date: 2020-01-06-10-29-16
+.. nonce: QHAONe
+.. section: Core and Builtins
+
+Correctly handle multi-line tokens in interactive mode. Patch by Pablo
+Galindo.
+
+..
+
+.. bpo: 39216
+.. date: 2020-01-05-06-55-52
+.. nonce: 74jLh9
+.. section: Core and Builtins
+
+Fix constant folding optimization for positional only arguments - by Anthony
+Sottile.
+
+..
+
+.. bpo: 39215
+.. date: 2020-01-04-17-25-34
+.. nonce: xiqiIz
+.. section: Core and Builtins
+
+Fix ``SystemError`` when nested function has annotation on positional-only
+argument - by Anthony Sottile.
+
+..
+
+.. bpo: 38588
+.. date: 2019-12-29-19-13-54
+.. nonce: pgXnNS
+.. section: Core and Builtins
+
+Fix possible crashes in dict and list when calling
+:c:func:`PyObject_RichCompareBool`.
+
+..
+
+.. bpo: 38610
+.. date: 2019-10-31-14-30-39
+.. nonce: fHdVMS
+.. section: Core and Builtins
+
+Fix possible crashes in several list methods by holding strong references to
+list elements when calling :c:func:`PyObject_RichCompareBool`.
+
+..
+
+.. bpo: 39590
+.. date: 2020-02-09-05-51-05
+.. nonce: rf98GU
+.. section: Library
+
+Collections.deque now holds strong references during deque.__contains__ and
+deque.count, fixing crashes.
+
+..
+
+.. bpo: 38149
+.. date: 2020-02-05-11-24-16
+.. nonce: GWsjHE
+.. section: Library
+
+:func:`sys.audit` is now called only once per call of :func:`glob.glob` and
+:func:`glob.iglob`.
+
+..
+
+.. bpo: 39450
+.. date: 2020-02-02-14-46-34
+.. nonce: 48R274
+.. section: Library
+
+Striped whitespace from docstring before returning it from
+:func:`unittest.case.shortDescription`.
+
+..
+
+.. bpo: 39493
+.. date: 2020-01-30-01-13-19
+.. nonce: CbFRi7
+.. section: Library
+
+Mark ``typing.IO.closed`` as a property
+
+..
+
+.. bpo: 39485
+.. date: 2020-01-29-14-58-27
+.. nonce: Zy3ot6
+.. section: Library
+
+Fix a bug in :func:`unittest.mock.create_autospec` that would complain about
+the wrong number of arguments for custom descriptors defined in an extension
+module returning functions.
+
+..
+
+.. bpo: 39082
+.. date: 2020-01-24-13-24-35
+.. nonce: qKgrq_
+.. section: Library
+
+Allow AsyncMock to correctly patch static/class methods
+
+..
+
+.. bpo: 39430
+.. date: 2020-01-24-11-05-21
+.. nonce: I0UQzM
+.. section: Library
+
+Fixed race condition in lazy imports in :mod:`tarfile`.
+
+..
+
+.. bpo: 39390
+.. date: 2020-01-23-21-34-29
+.. nonce: D2tSXk
+.. section: Library
+
+Fixed a regression with the `ignore` callback of :func:`shutil.copytree`.
+The argument types are now str and List[str] again.
+
+..
+
+.. bpo: 39389
+.. date: 2020-01-20-00-56-01
+.. nonce: fEirIS
+.. section: Library
+
+Write accurate compression level metadata in :mod:`gzip` archives, rather
+than always signaling maximum compression.
+
+..
+
+.. bpo: 39274
+.. date: 2020-01-15-23-13-03
+.. nonce: lpc0-n
+.. section: Library
+
+``bool(fraction.Fraction)`` now returns a boolean even if (numerator !=3D 0)
+does not return a boolean (ex: numpy number).
+
+..
+
+.. bpo: 39297
+.. date: 2020-01-11-01-15-37
+.. nonce: y98Z6Q
+.. section: Library
+
+Improved performance of importlib.metadata distribution discovery and
+resilients to inaccessible sys.path entries (importlib_metadata v1.4.0).
+
+..
+
+.. bpo: 39242
+.. date: 2020-01-08-23-25-27
+.. nonce: bnL65N
+.. section: Library
+
+Updated the Gmane domain from news.gmane.org to news.gmane.io which is used
+for examples of :class:`~nntplib.NNTP` news reader server and nntplib tests.
+
+..
+
+.. bpo: 38907
+.. date: 2020-01-06-02-14-38
+.. nonce: F1RkCR
+.. section: Library
+
+In http.server script, restore binding to IPv4 on Windows.
+
+..
+
+.. bpo: 39152
+.. date: 2020-01-03-18-02-50
+.. nonce: JgPjCC
+.. section: Library
+
+Fix ttk.Scale.configure([name]) to return configuration tuple for name or
+all options. Giovanni Lombardo contributed part of the patch.
+
+..
+
+.. bpo: 39198
+.. date: 2020-01-02-20-21-03
+.. nonce: nzwGyG
+.. section: Library
+
+If an exception were to be thrown in `Logger.isEnabledFor` (say, by asyncio
+timeouts or stopit) , the `logging` global lock may not be released
+appropriately, resulting in deadlock. This change wraps that block of code
+with `try...finally` to ensure the lock is released.
+
+..
+
+.. bpo: 39191
+.. date: 2020-01-02-17-28-03
+.. nonce: ur_scy
+.. section: Library
+
+Perform a check for running loop before starting a new task in
+``loop.run_until_complete()`` to fail fast; it prevents the side effect of
+new task spawning before exception raising.
+
+..
+
+.. bpo: 38871
+.. date: 2020-01-01-18-44-52
+.. nonce: 3EEOLg
+.. section: Library
+
+Correctly parenthesize filter-based statements that contain lambda
+expressions in mod:`lib2to3`. Patch by Dong-hee Na.
+
+..
+
+.. bpo: 39142
+.. date: 2019-12-31-19-27-23
+.. nonce: oqU5iD
+.. section: Library
+
+A change was made to logging.config.dictConfig to avoid converting instances
+of named tuples to ConvertingTuple. It's assumed that named tuples are too
+specialised to be treated like ordinary tuples; if a user of named tuples
+requires ConvertingTuple functionality, they will have to implement that
+themselves in their named tuple class.
+
+..
+
+.. bpo: 39129
+.. date: 2019-12-24-10-43-13
+.. nonce: jVx5rW
+.. section: Library
+
+Fix import path for ``asyncio.TimeoutError``
+
+..
+
+.. bpo: 39057
+.. date: 2019-12-15-21-47-54
+.. nonce: FOxn-w
+.. section: Library
+
+:func:`urllib.request.proxy_bypass_environment` now ignores leading dots and
+no longer ignores a trailing newline.
+
+..
+
+.. bpo: 39056
+.. date: 2019-12-15-21-05-16
+.. nonce: nEfUM9
+.. section: Library
+
+Fixed handling invalid warning category in the -W option. No longer import
+the re module if it is not needed.
+
+..
+
+.. bpo: 39055
+.. date: 2019-12-15-19-23-23
+.. nonce: FmN3un
+.. section: Library
+
+:func:`base64.b64decode` with ``validate=3DTrue`` raises now a binascii.Error
+if the input ends with a single ``\n``.
+
+..
+
+.. bpo: 39033
+.. date: 2019-12-13-18-54-49
+.. nonce: cepuyD
+.. section: Library
+
+Fix :exc:`NameError` in :mod:`zipimport`. Patch by Karthikeyan Singaravelan.
+
+..
+
+.. bpo: 38878
+.. date: 2019-11-22-12-08-52
+.. nonce: EJ0cFf
+.. section: Library
+
+Fixed __subclasshook__ of :class:`os.PathLike` to return a correct result
+upon inheritence. Patch by Bar Harel.
+
+..
+
+.. bpo: 35182
+.. date: 2019-10-31-19-23-25
+.. nonce: hzeNl9
+.. section: Library
+
+Fixed :func:`Popen.communicate` subsequent call crash when the child process
+has already closed any piped standard stream, but still continues to be
+running. Patch by Andriy Maletsky.
+
+..
+
+.. bpo: 38473
+.. date: 2019-10-14-21-14-55
+.. nonce: uXpVld
+.. section: Library
+
+Use signature from inner mock for autospecced methods attached with
+:func:`unittest.mock.attach_mock`. Patch by Karthikeyan Singaravelan.
+
+..
+
+.. bpo: 38293
+.. date: 2019-09-29-08-17-03
+.. nonce: wls5s3
+.. section: Library
+
+Add :func:`copy.copy` and :func:`copy.deepcopy` support to :func:`property`
+objects.
+
+..
+
+.. bpo: 39153
+.. date: 2020-01-27-22-24-51
+.. nonce: Pjl8jV
+.. section: Documentation
+
+Clarify refcounting semantics for the following functions: -
+PyObject_SetItem - PyMapping_SetItemString - PyDict_SetItem -
+PyDict_SetItemString
+
+..
+
+.. bpo: 39392
+.. date: 2020-01-27-18-18-42
+.. nonce: oiqcLO
+.. section: Documentation
+
+Explain that when filling with turtle, overlap regions may be left unfilled.
+
+..
+
+.. bpo: 39381
+.. date: 2020-01-18-15-37-56
+.. nonce: wTWe8d
+.. section: Documentation
+
+Mention in docs that :func:`asyncio.get_event_loop` implicitly creates new
+event loop only if called from the main thread.
+
+..
+
+.. bpo: 38918
+.. date: 2019-12-15-22-04-41
+.. nonce: 8JnDTS
+.. section: Documentation
+
+Add an entry for ``__module__`` in the "function" & "method" sections of the
+`inspect docs types and members table
+<https://docs.python.org/3/library/inspect.html#types-and-members>`_
+
+..
+
+.. bpo: 3530
+.. date: 2019-11-17-11-53-10
+.. nonce: 8zFUMc
+.. section: Documentation
+
+In the :mod:`ast` module documentation, fix a misleading ``NodeTransformer``
+example and add advice on when to use the ``fix_missing_locations``
+function.
+
+..
+
+.. bpo: 39502
+.. date: 2020-01-30-15-04-54
+.. nonce: chbpII
+.. section: Tests
+
+Skip test_zipfile.test_add_file_after_2107() if :func:`time.localtime` fails
+with :exc:`OverflowError`. It is the case on AIX 6.1 for example.
+
+..
+
+.. bpo: 38546
+.. date: 2019-12-18-14-52-08
+.. nonce: 2kxNuM
+.. section: Tests
+
+Fix test_ressources_gced_in_workers() of test_concurrent_futures: explicitly
+stop the manager to prevent leaking a child process running in the
+background after the test completes.
+
+..
+
+.. bpo: 39144
+.. date: 2019-12-27-22-18-26
+.. nonce: dwHMlR
+.. section: Build
+
+The ctags and etags build targets both include Modules/_ctypes and Python
+standard library source files.
+
+..
+
+.. bpo: 39439
+.. date: 2020-01-24-03-15-05
+.. nonce: sFxGfR
+.. section: Windows
+
+Honor the Python path when a virtualenv is active on Windows.
+
+..
+
+.. bpo: 39393
+.. date: 2020-01-20-23-42-53
+.. nonce: gWlJDG
+.. section: Windows
+
+Improve the error message when attempting to load a DLL with unresolved
+dependencies.
+
+..
+
+.. bpo: 38883
+.. date: 2020-01-11-22-53-55
+.. nonce: X7FRaN
+.. section: Windows
+
+:meth:`~pathlib.Path.home()` and :meth:`~pathlib.Path.expanduser()` on
+Windows now prefer :envvar:`USERPROFILE` and no longer use :envvar:`HOME`,
+which is not normally set for regular user accounts. This makes them again
+behave like :func:`os.path.expanduser`, which was changed to ignore
+:envvar:`HOME` in 3.8, see :issue:`36264`.
+
+..
+
+.. bpo: 39185
+.. date: 2020-01-02-01-11-53
+.. nonce: T4herN
+.. section: Windows
+
+The build.bat script has additional options for very-quiet output (-q) and
+very-verbose output (-vv)
+
+..
+
+.. bpo: 30780
+.. date: 2020-01-27-16-44-29
+.. nonce: nR80qu
+.. section: IDLE
+
+Add remaining configdialog tests for buttons and highlights and keys tabs.
+
+..
+
+.. bpo: 39388
+.. date: 2020-01-25-02-26-45
+.. nonce: x4TQNh
+.. section: IDLE
+
+IDLE Settings Cancel button now cancels pending changes
+
+..
+
+.. bpo: 39050
+.. date: 2020-01-22-22-28-06
+.. nonce: zkn0FO
+.. section: IDLE
+
+Make IDLE Settings dialog Help button work again.
+
+..
+
+.. bpo: 34118
+.. date: 2019-12-30-16-44-07
+.. nonce: FaNW0a
+.. section: IDLE
+
+Tag memoryview, range, and tuple as classes, the same as list, etcetera, in
+the library manual built-in functions list.
+
+..
+
+.. bpo: 38792
+.. date: 2019-11-13-23-51-39
+.. nonce: xhTC5a
+.. section: IDLE
+
+Close an IDLE shell calltip if a :exc:`KeyboardInterrupt` or shell restart
+occurs. Patch by Zackery Spytz.
+
+..
+
+.. bpo: 32989
+.. date: 2018-03-03-12-56-26
+.. nonce: FVhmhH
+.. section: IDLE
+
+Add tests for editor newline_and_indent_event method. Remove dead code from
+pyparse find_good_parse_start method.
diff --git a/Misc/NEWS.d/next/Build/2019-12-27-22-18-26.bpo-39144.dwHMlR.rst =
b/Misc/NEWS.d/next/Build/2019-12-27-22-18-26.bpo-39144.dwHMlR.rst
deleted file mode 100644
index 8b90da19622e6..0000000000000
--- a/Misc/NEWS.d/next/Build/2019-12-27-22-18-26.bpo-39144.dwHMlR.rst
+++ /dev/null
@@ -1 +0,0 @@
-The ctags and etags build targets both include Modules/_ctypes and Python st=
andard library source files.
\ No newline at end of file
diff --git a/Misc/NEWS.d/next/Core and Builtins/2019-10-31-14-30-39.bpo-38610=
.fHdVMS.rst b/Misc/NEWS.d/next/Core and Builtins/2019-10-31-14-30-39.bpo-3861=
0.fHdVMS.rst
deleted file mode 100644
index 0ee63bbb40dc6..0000000000000
--- a/Misc/NEWS.d/next/Core and Builtins/2019-10-31-14-30-39.bpo-38610.fHdVMS=
.rst=09
+++ /dev/null
@@ -1,2 +0,0 @@
-Fix possible crashes in several list methods by holding strong references to
-list elements when calling :c:func:`PyObject_RichCompareBool`.
diff --git a/Misc/NEWS.d/next/Core and Builtins/2019-12-29-19-13-54.bpo-38588=
.pgXnNS.rst b/Misc/NEWS.d/next/Core and Builtins/2019-12-29-19-13-54.bpo-3858=
8.pgXnNS.rst
deleted file mode 100644
index 0b81085a89d25..0000000000000
--- a/Misc/NEWS.d/next/Core and Builtins/2019-12-29-19-13-54.bpo-38588.pgXnNS=
.rst=09
+++ /dev/null
@@ -1,2 +0,0 @@
-Fix possible crashes in dict and list when calling
-:c:func:`PyObject_RichCompareBool`.
diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-01-04-17-25-34.bpo-39215=
.xiqiIz.rst b/Misc/NEWS.d/next/Core and Builtins/2020-01-04-17-25-34.bpo-3921=
5.xiqiIz.rst
deleted file mode 100644
index 9a3178f9c6218..0000000000000
--- a/Misc/NEWS.d/next/Core and Builtins/2020-01-04-17-25-34.bpo-39215.xiqiIz=
.rst=09
+++ /dev/null
@@ -1,2 +0,0 @@
-Fix ``SystemError`` when nested function has annotation on positional-only
-argument - by Anthony Sottile.
diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-01-05-06-55-52.bpo-39216=
.74jLh9.rst b/Misc/NEWS.d/next/Core and Builtins/2020-01-05-06-55-52.bpo-3921=
6.74jLh9.rst
deleted file mode 100644
index 971b06552973e..0000000000000
--- a/Misc/NEWS.d/next/Core and Builtins/2020-01-05-06-55-52.bpo-39216.74jLh9=
.rst=09
+++ /dev/null
@@ -1,2 +0,0 @@
-Fix constant folding optimization for positional only arguments - by Anthony
-Sottile.
diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-01-06-10-29-16.bpo-39209=
.QHAONe.rst b/Misc/NEWS.d/next/Core and Builtins/2020-01-06-10-29-16.bpo-3920=
9.QHAONe.rst
deleted file mode 100644
index c05b3f8dfa4d4..0000000000000
--- a/Misc/NEWS.d/next/Core and Builtins/2020-01-06-10-29-16.bpo-39209.QHAONe=
.rst=09
+++ /dev/null
@@ -1,2 +0,0 @@
-Correctly handle multi-line tokens in interactive mode. Patch by Pablo
-Galindo.
diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-01-09-10-01-18.bpo-39235=
.RYwjoc.rst b/Misc/NEWS.d/next/Core and Builtins/2020-01-09-10-01-18.bpo-3923=
5.RYwjoc.rst
deleted file mode 100644
index 5fb0d45356bad..0000000000000
--- a/Misc/NEWS.d/next/Core and Builtins/2020-01-09-10-01-18.bpo-39235.RYwjoc=
.rst=09
+++ /dev/null
@@ -1,2 +0,0 @@
-Fix AST end location for lone generator expression in function call, e.g.
-f(i for i in a).
diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-01-20-21-40-57.bpo-39386=
.ULqD8t.rst b/Misc/NEWS.d/next/Core and Builtins/2020-01-20-21-40-57.bpo-3938=
6.ULqD8t.rst
deleted file mode 100644
index f24e1f4e8a183..0000000000000
--- a/Misc/NEWS.d/next/Core and Builtins/2020-01-20-21-40-57.bpo-39386.ULqD8t=
.rst=09
+++ /dev/null
@@ -1 +0,0 @@
-Prevent double awaiting of async iterator.
diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-01-22-15-53-37.bpo-39421=
.O3nG7u.rst b/Misc/NEWS.d/next/Core and Builtins/2020-01-22-15-53-37.bpo-3942=
1.O3nG7u.rst
deleted file mode 100644
index bae008150ee12..0000000000000
--- a/Misc/NEWS.d/next/Core and Builtins/2020-01-22-15-53-37.bpo-39421.O3nG7u=
.rst=09
+++ /dev/null
@@ -1,2 +0,0 @@
-Fix possible crashes when operating with the functions in the :mod:`heapq`
-module and custom comparison operators.
diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-01-30-01-14-42.bpo-39492=
.eTuy0F.rst b/Misc/NEWS.d/next/Core and Builtins/2020-01-30-01-14-42.bpo-3949=
2.eTuy0F.rst
deleted file mode 100644
index 6e8b715c46365..0000000000000
--- a/Misc/NEWS.d/next/Core and Builtins/2020-01-30-01-14-42.bpo-39492.eTuy0F=
.rst=09
+++ /dev/null
@@ -1 +0,0 @@
-Fix a reference cycle in the C Pickler that was preventing the garbage colle=
ction of deleted, pickled objects.
\ No newline at end of file
diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-02-04-10-27-41.bpo-39510=
.PMIh-f.rst b/Misc/NEWS.d/next/Core and Builtins/2020-02-04-10-27-41.bpo-3951=
0.PMIh-f.rst
deleted file mode 100644
index 9a38e4ab76228..0000000000000
--- a/Misc/NEWS.d/next/Core and Builtins/2020-02-04-10-27-41.bpo-39510.PMIh-f=
.rst=09
+++ /dev/null
@@ -1 +0,0 @@
-Fix segfault in ``readinto()`` method on closed BufferedReader.
diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-02-07-15-18-35.bpo-39579=
.itNmC0.rst b/Misc/NEWS.d/next/Core and Builtins/2020-02-07-15-18-35.bpo-3957=
9.itNmC0.rst
deleted file mode 100644
index 36d5c425670c2..0000000000000
--- a/Misc/NEWS.d/next/Core and Builtins/2020-02-07-15-18-35.bpo-39579.itNmC0=
.rst=09
+++ /dev/null
@@ -1 +0,0 @@
-Change the ending column offset of `Attribute` nodes constructed in `ast_for=
_dotted_name` to point at the end of the current node and not at the end of t=
he last `NAME` node.
\ No newline at end of file
diff --git a/Misc/NEWS.d/next/Documentation/2019-11-17-11-53-10.bpo-3530.8zFU=
Mc.rst b/Misc/NEWS.d/next/Documentation/2019-11-17-11-53-10.bpo-3530.8zFUMc.r=
st
deleted file mode 100644
index 65f1a6d156a12..0000000000000
--- a/Misc/NEWS.d/next/Documentation/2019-11-17-11-53-10.bpo-3530.8zFUMc.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-In the :mod:`ast` module documentation, fix a misleading ``NodeTransformer``=
example and add
-advice on when to use the ``fix_missing_locations`` function.
diff --git a/Misc/NEWS.d/next/Documentation/2019-12-15-22-04-41.bpo-38918.8Jn=
DTS.rst b/Misc/NEWS.d/next/Documentation/2019-12-15-22-04-41.bpo-38918.8JnDTS=
.rst
deleted file mode 100644
index 5747936dd64d5..0000000000000
--- a/Misc/NEWS.d/next/Documentation/2019-12-15-22-04-41.bpo-38918.8JnDTS.rst
+++ /dev/null
@@ -1,3 +0,0 @@
-Add an entry for ``__module__`` in the "function" & "method" sections of the
-`inspect docs types and members table
-<https://docs.python.org/3/library/inspect.html#types-and-members>`_
diff --git a/Misc/NEWS.d/next/Documentation/2020-01-18-15-37-56.bpo-39381.wTW=
e8d.rst b/Misc/NEWS.d/next/Documentation/2020-01-18-15-37-56.bpo-39381.wTWe8d=
.rst
deleted file mode 100644
index 37b66ad9dfd17..0000000000000
--- a/Misc/NEWS.d/next/Documentation/2020-01-18-15-37-56.bpo-39381.wTWe8d.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Mention in docs that :func:`asyncio.get_event_loop` implicitly creates new
-event loop only if called from the main thread.
diff --git a/Misc/NEWS.d/next/Documentation/2020-01-27-18-18-42.bpo-39392.oiq=
cLO.rst b/Misc/NEWS.d/next/Documentation/2020-01-27-18-18-42.bpo-39392.oiqcLO=
.rst
deleted file mode 100644
index 715874981f735..0000000000000
--- a/Misc/NEWS.d/next/Documentation/2020-01-27-18-18-42.bpo-39392.oiqcLO.rst
+++ /dev/null
@@ -1 +0,0 @@
-Explain that when filling with turtle, overlap regions may be left unfilled.
diff --git a/Misc/NEWS.d/next/Documentation/2020-01-27-22-24-51.bpo-39153.Pjl=
8jV.rst b/Misc/NEWS.d/next/Documentation/2020-01-27-22-24-51.bpo-39153.Pjl8jV=
.rst
deleted file mode 100644
index 95be00b4b777f..0000000000000
--- a/Misc/NEWS.d/next/Documentation/2020-01-27-22-24-51.bpo-39153.Pjl8jV.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-Clarify refcounting semantics for the following functions:
-- PyObject_SetItem
-- PyMapping_SetItemString
-- PyDict_SetItem
-- PyDict_SetItemString
\ No newline at end of file
diff --git a/Misc/NEWS.d/next/IDLE/2018-03-03-12-56-26.bpo-32989.FVhmhH.rst b=
/Misc/NEWS.d/next/IDLE/2018-03-03-12-56-26.bpo-32989.FVhmhH.rst
deleted file mode 100644
index 38f0fb6e10452..0000000000000
--- a/Misc/NEWS.d/next/IDLE/2018-03-03-12-56-26.bpo-32989.FVhmhH.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Add tests for editor newline_and_indent_event method.
-Remove dead code from pyparse find_good_parse_start method.
diff --git a/Misc/NEWS.d/next/IDLE/2019-11-13-23-51-39.bpo-38792.xhTC5a.rst b=
/Misc/NEWS.d/next/IDLE/2019-11-13-23-51-39.bpo-38792.xhTC5a.rst
deleted file mode 100644
index 9aa2f0ffddfaf..0000000000000
--- a/Misc/NEWS.d/next/IDLE/2019-11-13-23-51-39.bpo-38792.xhTC5a.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Close an IDLE shell calltip if a :exc:`KeyboardInterrupt`
-or shell restart occurs. Patch by Zackery Spytz.
diff --git a/Misc/NEWS.d/next/IDLE/2019-12-30-16-44-07.bpo-34118.FaNW0a.rst b=
/Misc/NEWS.d/next/IDLE/2019-12-30-16-44-07.bpo-34118.FaNW0a.rst
deleted file mode 100644
index ce95eb5482f2b..0000000000000
--- a/Misc/NEWS.d/next/IDLE/2019-12-30-16-44-07.bpo-34118.FaNW0a.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Tag memoryview, range, and tuple as classes, the same as list, etcetera, in
-the library manual built-in functions list.
diff --git a/Misc/NEWS.d/next/IDLE/2020-01-22-22-28-06.bpo-39050.zkn0FO.rst b=
/Misc/NEWS.d/next/IDLE/2020-01-22-22-28-06.bpo-39050.zkn0FO.rst
deleted file mode 100644
index e71265cdf109b..0000000000000
--- a/Misc/NEWS.d/next/IDLE/2020-01-22-22-28-06.bpo-39050.zkn0FO.rst
+++ /dev/null
@@ -1 +0,0 @@
-Make IDLE Settings dialog Help button work again.
diff --git a/Misc/NEWS.d/next/IDLE/2020-01-25-02-26-45.bpo-39388.x4TQNh.rst b=
/Misc/NEWS.d/next/IDLE/2020-01-25-02-26-45.bpo-39388.x4TQNh.rst
deleted file mode 100644
index 42bbfb168c19d..0000000000000
--- a/Misc/NEWS.d/next/IDLE/2020-01-25-02-26-45.bpo-39388.x4TQNh.rst
+++ /dev/null
@@ -1 +0,0 @@
-IDLE Settings Cancel button now cancels pending changes
diff --git a/Misc/NEWS.d/next/IDLE/2020-01-27-16-44-29.bpo-30780.nR80qu.rst b=
/Misc/NEWS.d/next/IDLE/2020-01-27-16-44-29.bpo-30780.nR80qu.rst
deleted file mode 100644
index 2f65a00a5af3b..0000000000000
--- a/Misc/NEWS.d/next/IDLE/2020-01-27-16-44-29.bpo-30780.nR80qu.rst
+++ /dev/null
@@ -1 +0,0 @@
-Add remaining configdialog tests for buttons and highlights and keys tabs.
diff --git a/Misc/NEWS.d/next/Library/2019-09-29-08-17-03.bpo-38293.wls5s3.rs=
t b/Misc/NEWS.d/next/Library/2019-09-29-08-17-03.bpo-38293.wls5s3.rst
deleted file mode 100644
index 0b19551970eb0..0000000000000
--- a/Misc/NEWS.d/next/Library/2019-09-29-08-17-03.bpo-38293.wls5s3.rst
+++ /dev/null
@@ -1 +0,0 @@
-Add :func:`copy.copy` and :func:`copy.deepcopy` support to :func:`property` =
objects.
\ No newline at end of file
diff --git a/Misc/NEWS.d/next/Library/2019-10-14-21-14-55.bpo-38473.uXpVld.rs=
t b/Misc/NEWS.d/next/Library/2019-10-14-21-14-55.bpo-38473.uXpVld.rst
deleted file mode 100644
index de80e89e00e2d..0000000000000
--- a/Misc/NEWS.d/next/Library/2019-10-14-21-14-55.bpo-38473.uXpVld.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Use signature from inner mock for autospecced methods attached with
-:func:`unittest.mock.attach_mock`. Patch by Karthikeyan Singaravelan.
diff --git a/Misc/NEWS.d/next/Library/2019-10-31-19-23-25.bpo-35182.hzeNl9.rs=
t b/Misc/NEWS.d/next/Library/2019-10-31-19-23-25.bpo-35182.hzeNl9.rst
deleted file mode 100644
index 9438cd8f9fd0b..0000000000000
--- a/Misc/NEWS.d/next/Library/2019-10-31-19-23-25.bpo-35182.hzeNl9.rst
+++ /dev/null
@@ -1,3 +0,0 @@
-Fixed :func:`Popen.communicate` subsequent call crash when the child process
-has already closed any piped standard stream, but still continues to be
-running. Patch by Andriy Maletsky.
diff --git a/Misc/NEWS.d/next/Library/2019-11-22-12-08-52.bpo-38878.EJ0cFf.rs=
t b/Misc/NEWS.d/next/Library/2019-11-22-12-08-52.bpo-38878.EJ0cFf.rst
deleted file mode 100644
index 9cbdf08dd53e3..0000000000000
--- a/Misc/NEWS.d/next/Library/2019-11-22-12-08-52.bpo-38878.EJ0cFf.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Fixed __subclasshook__ of :class:`os.PathLike` to return a correct result
-upon inheritence. Patch by Bar Harel.
diff --git a/Misc/NEWS.d/next/Library/2019-12-13-18-54-49.bpo-39033.cepuyD.rs=
t b/Misc/NEWS.d/next/Library/2019-12-13-18-54-49.bpo-39033.cepuyD.rst
deleted file mode 100644
index 3dee3c08cc5be..0000000000000
--- a/Misc/NEWS.d/next/Library/2019-12-13-18-54-49.bpo-39033.cepuyD.rst
+++ /dev/null
@@ -1 +0,0 @@
-Fix :exc:`NameError` in :mod:`zipimport`. Patch by Karthikeyan Singaravelan.
diff --git a/Misc/NEWS.d/next/Library/2019-12-15-19-23-23.bpo-39055.FmN3un.rs=
t b/Misc/NEWS.d/next/Library/2019-12-15-19-23-23.bpo-39055.FmN3un.rst
deleted file mode 100644
index 83b1431e92fcb..0000000000000
--- a/Misc/NEWS.d/next/Library/2019-12-15-19-23-23.bpo-39055.FmN3un.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-:func:`base64.b64decode` with ``validate=3DTrue`` raises now a binascii.Error
-if the input ends with a single ``\n``.
diff --git a/Misc/NEWS.d/next/Library/2019-12-15-21-05-16.bpo-39056.nEfUM9.rs=
t b/Misc/NEWS.d/next/Library/2019-12-15-21-05-16.bpo-39056.nEfUM9.rst
deleted file mode 100644
index d5d2b98e9b0b3..0000000000000
--- a/Misc/NEWS.d/next/Library/2019-12-15-21-05-16.bpo-39056.nEfUM9.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Fixed handling invalid warning category in the -W option. No longer import
-the re module if it is not needed.
diff --git a/Misc/NEWS.d/next/Library/2019-12-15-21-47-54.bpo-39057.FOxn-w.rs=
t b/Misc/NEWS.d/next/Library/2019-12-15-21-47-54.bpo-39057.FOxn-w.rst
deleted file mode 100644
index 24a17444b97da..0000000000000
--- a/Misc/NEWS.d/next/Library/2019-12-15-21-47-54.bpo-39057.FOxn-w.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-:func:`urllib.request.proxy_bypass_environment` now ignores leading dots and
-no longer ignores a trailing newline.
diff --git a/Misc/NEWS.d/next/Library/2019-12-24-10-43-13.bpo-39129.jVx5rW.rs=
t b/Misc/NEWS.d/next/Library/2019-12-24-10-43-13.bpo-39129.jVx5rW.rst
deleted file mode 100644
index 6667697671a28..0000000000000
--- a/Misc/NEWS.d/next/Library/2019-12-24-10-43-13.bpo-39129.jVx5rW.rst
+++ /dev/null
@@ -1 +0,0 @@
-Fix import path for ``asyncio.TimeoutError``
diff --git a/Misc/NEWS.d/next/Library/2019-12-31-19-27-23.bpo-39142.oqU5iD.rs=
t b/Misc/NEWS.d/next/Library/2019-12-31-19-27-23.bpo-39142.oqU5iD.rst
deleted file mode 100644
index 508d1338d7c31..0000000000000
--- a/Misc/NEWS.d/next/Library/2019-12-31-19-27-23.bpo-39142.oqU5iD.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-A change was made to logging.config.dictConfig to avoid converting instances
-of named tuples to ConvertingTuple. It's assumed that named tuples are too
-specialised to be treated like ordinary tuples; if a user of named tuples
-requires ConvertingTuple functionality, they will have to implement that
-themselves in their named tuple class.
diff --git a/Misc/NEWS.d/next/Library/2020-01-01-18-44-52.bpo-38871.3EEOLg.rs=
t b/Misc/NEWS.d/next/Library/2020-01-01-18-44-52.bpo-38871.3EEOLg.rst
deleted file mode 100644
index fe970fd9e3fa1..0000000000000
--- a/Misc/NEWS.d/next/Library/2020-01-01-18-44-52.bpo-38871.3EEOLg.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Correctly parenthesize filter-based statements that contain lambda
-expressions in mod:`lib2to3`. Patch by Dong-hee Na.
diff --git a/Misc/NEWS.d/next/Library/2020-01-02-17-28-03.bpo-39191.ur_scy.rs=
t b/Misc/NEWS.d/next/Library/2020-01-02-17-28-03.bpo-39191.ur_scy.rst
deleted file mode 100644
index 138c93c2e4877..0000000000000
--- a/Misc/NEWS.d/next/Library/2020-01-02-17-28-03.bpo-39191.ur_scy.rst
+++ /dev/null
@@ -1,3 +0,0 @@
-Perform a check for running loop before starting a new task in
-``loop.run_until_complete()`` to fail fast; it prevents the side effect of
-new task spawning before exception raising.
diff --git a/Misc/NEWS.d/next/Library/2020-01-02-20-21-03.bpo-39198.nzwGyG.rs=
t b/Misc/NEWS.d/next/Library/2020-01-02-20-21-03.bpo-39198.nzwGyG.rst
deleted file mode 100644
index ec4e81e2bbe4a..0000000000000
--- a/Misc/NEWS.d/next/Library/2020-01-02-20-21-03.bpo-39198.nzwGyG.rst
+++ /dev/null
@@ -1 +0,0 @@
-If an exception were to be thrown in `Logger.isEnabledFor` (say, by asyncio =
timeouts or stopit) , the `logging` global lock may not be released appropria=
tely, resulting in deadlock. This change wraps that block of code with `try.=
..finally` to ensure the lock is released.
\ No newline at end of file
diff --git a/Misc/NEWS.d/next/Library/2020-01-03-18-02-50.bpo-39152.JgPjCC.rs=
t b/Misc/NEWS.d/next/Library/2020-01-03-18-02-50.bpo-39152.JgPjCC.rst
deleted file mode 100644
index abb3df0da0fe4..0000000000000
--- a/Misc/NEWS.d/next/Library/2020-01-03-18-02-50.bpo-39152.JgPjCC.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Fix ttk.Scale.configure([name]) to return configuration tuple for name
-or all options. Giovanni Lombardo contributed part of the patch.
diff --git a/Misc/NEWS.d/next/Library/2020-01-06-02-14-38.bpo-38907.F1RkCR.rs=
t b/Misc/NEWS.d/next/Library/2020-01-06-02-14-38.bpo-38907.F1RkCR.rst
deleted file mode 100644
index a6e79f7809521..0000000000000
--- a/Misc/NEWS.d/next/Library/2020-01-06-02-14-38.bpo-38907.F1RkCR.rst
+++ /dev/null
@@ -1 +0,0 @@
-In http.server script, restore binding to IPv4 on Windows.
\ No newline at end of file
diff --git a/Misc/NEWS.d/next/Library/2020-01-08-23-25-27.bpo-39242.bnL65N.rs=
t b/Misc/NEWS.d/next/Library/2020-01-08-23-25-27.bpo-39242.bnL65N.rst
deleted file mode 100644
index a87dddf81dcd5..0000000000000
--- a/Misc/NEWS.d/next/Library/2020-01-08-23-25-27.bpo-39242.bnL65N.rst
+++ /dev/null
@@ -1,3 +0,0 @@
-Updated the Gmane domain from news.gmane.org to news.gmane.io=20
-which is used for examples of :class:`~nntplib.NNTP` news reader server and
-nntplib tests.
diff --git a/Misc/NEWS.d/next/Library/2020-01-11-01-15-37.bpo-39297.y98Z6Q.rs=
t b/Misc/NEWS.d/next/Library/2020-01-11-01-15-37.bpo-39297.y98Z6Q.rst
deleted file mode 100644
index 618f6f9f2b7ff..0000000000000
--- a/Misc/NEWS.d/next/Library/2020-01-11-01-15-37.bpo-39297.y98Z6Q.rst
+++ /dev/null
@@ -1 +0,0 @@
-Improved performance of importlib.metadata distribution discovery and resili=
ents to inaccessible sys.path entries (importlib_metadata v1.4.0).
diff --git a/Misc/NEWS.d/next/Library/2020-01-15-23-13-03.bpo-39274.lpc0-n.rs=
t b/Misc/NEWS.d/next/Library/2020-01-15-23-13-03.bpo-39274.lpc0-n.rst
deleted file mode 100644
index 4c398682b98ab..0000000000000
--- a/Misc/NEWS.d/next/Library/2020-01-15-23-13-03.bpo-39274.lpc0-n.rst
+++ /dev/null
@@ -1 +0,0 @@
-``bool(fraction.Fraction)`` now returns a boolean even if (numerator !=3D 0)=
does not return a boolean (ex: numpy number).
diff --git a/Misc/NEWS.d/next/Library/2020-01-20-00-56-01.bpo-39389.fEirIS.rs=
t b/Misc/NEWS.d/next/Library/2020-01-20-00-56-01.bpo-39389.fEirIS.rst
deleted file mode 100644
index d4c80506f7d6b..0000000000000
--- a/Misc/NEWS.d/next/Library/2020-01-20-00-56-01.bpo-39389.fEirIS.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Write accurate compression level metadata in :mod:`gzip` archives, rather
-than always signaling maximum compression.
diff --git a/Misc/NEWS.d/next/Library/2020-01-23-21-34-29.bpo-39390.D2tSXk.rs=
t b/Misc/NEWS.d/next/Library/2020-01-23-21-34-29.bpo-39390.D2tSXk.rst
deleted file mode 100644
index ffa961ea4cd22..0000000000000
--- a/Misc/NEWS.d/next/Library/2020-01-23-21-34-29.bpo-39390.D2tSXk.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Fixed a regression with the `ignore` callback of :func:`shutil.copytree`.
-The argument types are now str and List[str] again.
diff --git a/Misc/NEWS.d/next/Library/2020-01-24-11-05-21.bpo-39430.I0UQzM.rs=
t b/Misc/NEWS.d/next/Library/2020-01-24-11-05-21.bpo-39430.I0UQzM.rst
deleted file mode 100644
index 712fc5d34bbe0..0000000000000
--- a/Misc/NEWS.d/next/Library/2020-01-24-11-05-21.bpo-39430.I0UQzM.rst
+++ /dev/null
@@ -1 +0,0 @@
-Fixed race condition in lazy imports in :mod:`tarfile`.
diff --git a/Misc/NEWS.d/next/Library/2020-01-24-13-24-35.bpo-39082.qKgrq_.rs=
t b/Misc/NEWS.d/next/Library/2020-01-24-13-24-35.bpo-39082.qKgrq_.rst
deleted file mode 100644
index 52c4ee1b33bda..0000000000000
--- a/Misc/NEWS.d/next/Library/2020-01-24-13-24-35.bpo-39082.qKgrq_.rst
+++ /dev/null
@@ -1 +0,0 @@
-Allow AsyncMock to correctly patch static/class methods
diff --git a/Misc/NEWS.d/next/Library/2020-01-29-14-58-27.bpo-39485.Zy3ot6.rs=
t b/Misc/NEWS.d/next/Library/2020-01-29-14-58-27.bpo-39485.Zy3ot6.rst
deleted file mode 100644
index f62c31fc686ad..0000000000000
--- a/Misc/NEWS.d/next/Library/2020-01-29-14-58-27.bpo-39485.Zy3ot6.rst
+++ /dev/null
@@ -1,3 +0,0 @@
-Fix a bug in :func:`unittest.mock.create_autospec` that would complain about
-the wrong number of arguments for custom descriptors defined in an extension
-module returning functions.
diff --git a/Misc/NEWS.d/next/Library/2020-01-30-01-13-19.bpo-39493.CbFRi7.rs=
t b/Misc/NEWS.d/next/Library/2020-01-30-01-13-19.bpo-39493.CbFRi7.rst
deleted file mode 100644
index b676629a4414a..0000000000000
--- a/Misc/NEWS.d/next/Library/2020-01-30-01-13-19.bpo-39493.CbFRi7.rst
+++ /dev/null
@@ -1 +0,0 @@
-Mark ``typing.IO.closed`` as a property
\ No newline at end of file
diff --git a/Misc/NEWS.d/next/Library/2020-02-02-14-46-34.bpo-39450.48R274.rs=
t b/Misc/NEWS.d/next/Library/2020-02-02-14-46-34.bpo-39450.48R274.rst
deleted file mode 100644
index 55fed519a2d80..0000000000000
--- a/Misc/NEWS.d/next/Library/2020-02-02-14-46-34.bpo-39450.48R274.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Striped whitespace from docstring before returning it from
-:func:`unittest.case.shortDescription`.
diff --git a/Misc/NEWS.d/next/Library/2020-02-05-11-24-16.bpo-38149.GWsjHE.rs=
t b/Misc/NEWS.d/next/Library/2020-02-05-11-24-16.bpo-38149.GWsjHE.rst
deleted file mode 100644
index b4ec60b2abad1..0000000000000
--- a/Misc/NEWS.d/next/Library/2020-02-05-11-24-16.bpo-38149.GWsjHE.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-:func:`sys.audit` is now called only once per call of :func:`glob.glob` and
-:func:`glob.iglob`.
diff --git a/Misc/NEWS.d/next/Library/2020-02-09-05-51-05.bpo-39590.rf98GU.rs=
t b/Misc/NEWS.d/next/Library/2020-02-09-05-51-05.bpo-39590.rf98GU.rst
deleted file mode 100644
index 68625028fb7af..0000000000000
--- a/Misc/NEWS.d/next/Library/2020-02-09-05-51-05.bpo-39590.rf98GU.rst
+++ /dev/null
@@ -1 +0,0 @@
-Collections.deque now holds strong references during deque.__contains__ and =
deque.count, fixing crashes.
\ No newline at end of file
diff --git a/Misc/NEWS.d/next/Security/2020-01-07-00-42-08.bpo-39184.fe7NgK.r=
st b/Misc/NEWS.d/next/Security/2020-01-07-00-42-08.bpo-39184.fe7NgK.rst
deleted file mode 100644
index 1ab5d4d70eec5..0000000000000
--- a/Misc/NEWS.d/next/Security/2020-01-07-00-42-08.bpo-39184.fe7NgK.rst
+++ /dev/null
@@ -1 +0,0 @@
-Add audit events to command execution functions in os and pty modules.
\ No newline at end of file
diff --git a/Misc/NEWS.d/next/Security/2020-01-28-20-54-09.bpo-39401.he7h_A.r=
st b/Misc/NEWS.d/next/Security/2020-01-28-20-54-09.bpo-39401.he7h_A.rst
deleted file mode 100644
index 5071e126b70d0..0000000000000
--- a/Misc/NEWS.d/next/Security/2020-01-28-20-54-09.bpo-39401.he7h_A.rst
+++ /dev/null
@@ -1 +0,0 @@
-Avoid unsafe load of ``api-ms-win-core-path-l1-1-0.dll`` at startup on Windo=
ws 7.
diff --git a/Misc/NEWS.d/next/Tests/2019-12-18-14-52-08.bpo-38546.2kxNuM.rst =
b/Misc/NEWS.d/next/Tests/2019-12-18-14-52-08.bpo-38546.2kxNuM.rst
deleted file mode 100644
index d8ec7cabbbab8..0000000000000
--- a/Misc/NEWS.d/next/Tests/2019-12-18-14-52-08.bpo-38546.2kxNuM.rst
+++ /dev/null
@@ -1,3 +0,0 @@
-Fix test_ressources_gced_in_workers() of test_concurrent_futures: explicitly
-stop the manager to prevent leaking a child process running in the background
-after the test completes.
diff --git a/Misc/NEWS.d/next/Tests/2020-01-30-15-04-54.bpo-39502.chbpII.rst =
b/Misc/NEWS.d/next/Tests/2020-01-30-15-04-54.bpo-39502.chbpII.rst
deleted file mode 100644
index 0a13746e34759..0000000000000
--- a/Misc/NEWS.d/next/Tests/2020-01-30-15-04-54.bpo-39502.chbpII.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Skip test_zipfile.test_add_file_after_2107() if :func:`time.localtime` fails
-with :exc:`OverflowError`. It is the case on AIX 6.1 for example.
diff --git a/Misc/NEWS.d/next/Windows/2020-01-02-01-11-53.bpo-39185.T4herN.rs=
t b/Misc/NEWS.d/next/Windows/2020-01-02-01-11-53.bpo-39185.T4herN.rst
deleted file mode 100644
index 3b84bd5217264..0000000000000
--- a/Misc/NEWS.d/next/Windows/2020-01-02-01-11-53.bpo-39185.T4herN.rst
+++ /dev/null
@@ -1 +0,0 @@
-The build.bat script has additional options for very-quiet output (-q) and v=
ery-verbose output (-vv)
\ No newline at end of file
diff --git a/Misc/NEWS.d/next/Windows/2020-01-11-22-53-55.bpo-38883.X7FRaN.rs=
t b/Misc/NEWS.d/next/Windows/2020-01-11-22-53-55.bpo-38883.X7FRaN.rst
deleted file mode 100644
index c552e850a3684..0000000000000
--- a/Misc/NEWS.d/next/Windows/2020-01-11-22-53-55.bpo-38883.X7FRaN.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-:meth:`~pathlib.Path.home()` and :meth:`~pathlib.Path.expanduser()` on Windo=
ws
-now prefer :envvar:`USERPROFILE` and no longer use :envvar:`HOME`, which is =
not
-normally set for regular user accounts. This makes them again behave like
-:func:`os.path.expanduser`, which was changed to ignore :envvar:`HOME` in 3.=
8,
-see :issue:`36264`.
diff --git a/Misc/NEWS.d/next/Windows/2020-01-20-23-42-53.bpo-39393.gWlJDG.rs=
t b/Misc/NEWS.d/next/Windows/2020-01-20-23-42-53.bpo-39393.gWlJDG.rst
deleted file mode 100644
index 025b7e96a6e74..0000000000000
--- a/Misc/NEWS.d/next/Windows/2020-01-20-23-42-53.bpo-39393.gWlJDG.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Improve the error message when attempting to load a DLL with unresolved
-dependencies.
diff --git a/Misc/NEWS.d/next/Windows/2020-01-24-03-15-05.bpo-39439.sFxGfR.rs=
t b/Misc/NEWS.d/next/Windows/2020-01-24-03-15-05.bpo-39439.sFxGfR.rst
deleted file mode 100644
index d677c4c3e02d5..0000000000000
--- a/Misc/NEWS.d/next/Windows/2020-01-24-03-15-05.bpo-39439.sFxGfR.rst
+++ /dev/null
@@ -1 +0,0 @@
-Honor the Python path when a virtualenv is active on Windows.
\ No newline at end of file
diff --git a/README.rst b/README.rst
index be371c6498079..0b4695ce0e509 100644
--- a/README.rst
+++ b/README.rst
@@ -1,5 +1,5 @@
-This is Python version 3.8.1
-=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
+This is Python version 3.8.2rc1
+=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D
=20
.. image:: https://travis-ci.org/python/cpython.svg?branch=3D3.8
:alt: CPython build status on Travis CI
1
0