| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The fix for [bpo-39386](https://bugs.python.org/issue39386) attempted to make it so you couldn't reuse a
agen.aclose() coroutine object. It accidentally also prevented you
from calling aclose() at all on an async generator that was already
closed or exhausted. This commit fixes it so we're only blocking the
actually illegal cases, while allowing the legal cases.
The new tests failed before this patch. Also confirmed that this fixes
the test failures we were seeing in Trio with Python dev builds:
https://github.com/python-trio/trio/pull/1396
https://bugs.python.org/issue39606
|
|
|
|
| |
`resource`, `shutil`, `signal`, `syslog` (GH-18407)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move CPython C API from Include/fileutils.h into a new
Include/cpython/fileutils.h header file which is included by
Include/fileutils.h.
Exclude the following private symbols from the limited C API:
* _Py_error_handler
* _Py_GetErrorHandler()
* _Py_DecodeLocaleEx()
* _Py_EncodeLocaleEx()
|
|
|
|
|
|
|
|
|
| |
Add Include/cpython/bytearrayobject.h and
Include/cpython/bytesobject.h header files.
Move CPython C API from Include/bytesobject.h into a new
Include/cpython/bytesobject.h header file which is included by
Include/bytesobject.h. Do a similar change for
Include/bytearrayobject.h.
|
|
|
|
|
|
|
| |
Move the dtoa.h header file to the internal C API as pycore_dtoa.h:
it only contains private functions (prefixed by "_Py").
The math and cmath modules must now be compiled with the
Py_BUILD_CORE macro defined.
|
|
|
|
|
| |
Move the bytes_methods.h header file to the internal C API as
pycore_bytes_methods.h: it only contains private symbols (prefixed by
"_Py"), except of the PyDoc_STRVAR_shared() macro.
|
| |
|
|
|
|
|
|
| |
The GNU docs describe the `devmajor` and `devminor` fields of the tar
header struct only in the context of character and block special files,
suggesting that in other cases they are not populated. Typical utilities
behave accordingly; this patch teaches `tarfile` to do the same.
|
|
|
|
|
|
|
|
| |
bpo-21016, bpo-1294959: The pydoc and trace modules now use the
sysconfig module to get the path to the Python standard library, to
support uncommon installation path like /usr/lib64/python3.9/ on
Fedora.
Co-Authored-By: Jan Matějek <jmatejek@suse.com>
|
|
|
|
|
| |
Now `for y in [expr]` in comprehensions is as fast as a simple
assignment `y = expr`.
|
|
|
|
| |
* Always set the text attribute.
* Correct the offset attribute for non-ascii sources.
|
|
|
|
| |
Path.rglob(). (GH-18372)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Improve zipfile.Path performance on zipfiles with a large number of entries.
* 📜🤖 Added by blurb_it.
* Add bpo to blurb
* Sync with importlib_metadata 1.5 (6fe70ca)
* Update blurb.
* Remove compatibility code
* Add stubs module, omitted from earlier commit
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
| |
Automerge-Triggered-By: @zooba
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
PyUnicode_IsIdentifier() does not call Py_FatalError() anymore if the
string is not ready.
|
|
|
|
|
| |
489) (GH-18065)
https://bugs.python.org/issue1635741
|
|
|
|
|
|
|
|
|
|
| |
Reflecting changes to the code, removed weakref.ReferenceError from weakref.rst and exceptions.rst.
Issue submitter provided evidence that the `weakref.ReferenceError` alias for `ReferenceError` was removed from the code in 2007. Working with @gvanrossum at PyCascades CPython sprint we looked at the code and confirmed that `weakref.ReferenceError` was no longer in `weakref.py`.
Based on that analysis I removed references `weakref.ReferenceError` from the two documents where it was still being referenced: `weakref.rst` and `exceptions.rst`.
https://bugs.python.org/issue38374
|
|
|
| |
Complete previous patch.
|
|
|
| |
Skip tests on non-BMP characters of test_winconsoleio.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From the source for `PyUnicode_Decode`, the implementation is:
```
if (encoding == NULL) {
return PyUnicode_DecodeUTF8Stateful(s, size, errors, NULL);
}
```
which is pretty clearly not defaulting to ASCII.
---
I assume this needs neither a news entry nor bpo link.
|
|
|
|
|
|
|
|
|
|
| |
Clarifies that the use of `shlex.split` is more instructive than
normative, and provides a simpler example.
https://bugs.python.org/issue13826
|
|
|
|
|
| |
There was an extra space in the url markup, causing the documentation not rendered properly.
https://bugs.python.org/issue39594
|
|
|
|
|
| |
implementation (#18435)
documentation for default locale directory Doc/library/gettext.rst changed to match gettext implementation line 63.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Update mmap readline method documentation
Update mmap `readline` method description. The fact that the `readline` method does update the file position should not be ignored since this might give the impression for the programmer that it doesn't update it.
* 📜🤖 Added by blurb_it.
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
|
|
|
| |
In the font configuration window, remove duplicated font names.
|
|
|
|
|
|
|
| |
While `unittest.mock.patch` is a great thing, it is not straightforward.
If it were straightforward there wouldn't be such a huge amount of
documentation for it, and frankly, when myself and others who I've
read about often struggle to figure out what on earth `patch()` wants,
coming to the docs to read that it's straightforward is not helpful.
|
| |
|
|
|
|
| |
(GH-18315)
|
| |
|
|
|
|
| |
(GH-18421)
|
| |
|
|
|
|
|
|
|
|
| |
(GH-17884)
Minor fix in documentation:
- `sys.__unraisablehook__` is new in version 3.8
- Optional `sep` and `bytes_per_sep` parameters for `bytearray.hex` is also supported in Python 3.8 (just like `bytes.hex`)
|
|
|
|
| |
This allows clang to get rid of the dependency on libgcov.
When linking, GCC passes -lgcov while clang passes the path to libclang_rt.profile-$arch.a
|
| |
|
|
|
|
|
|
|
| |
Fix regression in fractions.Fraction if the numerator and/or the
denominator is an int subclass. The math.gcd() function is now
used to normalize the numerator and denominator. math.gcd() always
return a int type. Previously, the GCD type depended on numerator
and denominator.
|
|
|
|
| |
Replace direct acccess to PyVarObject.ob_size with usage of
the Py_SET_SIZE() function.
|
|
|
| |
Fix time.localtime() on 64-bit AIX to support years before 1902 and after 2038.
|
|
|
| |
Add Py_SET_SIZE() function to set the size of an object.
|
|
|
|
| |
Add Py_EnterRecursiveCall and Py_LeaveRecursiveCall functions to
python3.def.
|
|
|
|
| |
Replace direct acccess to PyVarObject.ob_size with usage of the
Py_SIZE() macro.
|
|
|
|
|
|
|
|
|
| |
Move listobject.h code surrounded by "#ifndef Py_LIMITED_API"
to a new Include/cpython/listobject.h header file.
Add cpython/ header files to Makefile.pre.in and pythoncore project
of PCbuild.
Add _PyList_CAST() macro.
|