| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Now `for y in [expr]` in comprehensions is as fast as a simple
assignment `y = expr`.
|
| |
|
|
|
|
| |
PyUnicode_IsIdentifier() does not call Py_FatalError() anymore if the
string is not ready.
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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-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`)
|
|
|
|
|
|
|
| |
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.
|
|
|
| |
Add Py_SET_SIZE() function to set the size of an object.
|
|
|
| |
Add Py_SET_TYPE() function to set the type of an object.
|
|
|
|
| |
Add a Py_SET_REFCNT() function to set the reference counter of an
object.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add backcompat defines and move non-limited API declaration to cpython/
This partially reverts commit 2ff58a24e8a1c7e290d025d69ebaea0bbead3b8c
which added PyObject_CallNoArgs to the 3.9+ stable ABI. This should not
be done; there are enough other call APIs in the stable ABI to choose from.
* Adjust documentation
Mark all newly public functions as added in 3.9.
Add a note about the 3.8 provisional names.
Add notes on public API.
* Put PyObject_CallNoArgs back in the limited API
* Rename PyObject_FastCallDict to PyObject_VectorcallDict
|
|
|
|
| |
Convert PyType_HasFeature(), PyType_Check() and PyType_CheckExact()
macros to static inline functions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-39491: Merge PEP 593 (typing.Annotated) support
PEP 593 has been accepted some time ago. I got a green light for merging
this from Till, so I went ahead and combined the code contributed to
typing_extensions[1] and the documentation from the PEP 593 text[2].
My changes were limited to:
* removing code designed for typing_extensions to run on older Python
versions
* removing some irrelevant parts of the PEP text when copying it over as
documentation and otherwise changing few small bits to better serve
the purpose
* changing the get_type_hints signature to match reality (parameter
names)
I wasn't entirely sure how to go about crediting the authors but I used
my best judgment, let me know if something needs changing in this
regard.
[1] https://github.com/python/typing/blob/8280de241fd8c8afe727c7860254b753e383b360/typing_extensions/src_py3/typing_extensions.py
[2] https://github.com/python/peps/blob/17710b879882454d55f82c2d44596e8e9f8e4bff/pep-0593.rst
|
|
|
|
| |
modules (GH-17824)
|
|
|
| |
To print the exports to stdout, the gendef command requires the option "-". Without this option, no output is generated.
|
|
|
|
| |
(#18344)
|
|
|
|
| |
(GH-16973)
|
|
|
|
|
|
|
|
|
|
|
| |
Remove:
* COUNT_ALLOCS macro
* sys.getcounts() function
* SHOW_ALLOC_COUNT code in listobject.c
* SHOW_TRACK_COUNT code in tupleobject.c
* PyConfig.show_alloc_count field
* -X showalloccount command line option
* @test.support.requires_type_collecting decorator
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PyThreadState.on_delete is a callback used to notify Python when a
thread completes. _thread._set_sentinel() function creates a lock
which is released when the thread completes. It sets on_delete
callback to the internal release_sentinel() function. This lock is
known as Threading._tstate_lock in the threading module.
The release_sentinel() function uses the Python C API. The problem is
that on_delete is called late in the Python finalization, when the C
API is no longer fully working.
The PyThreadState_Clear() function now calls the
PyThreadState.on_delete callback. Previously, that happened in
PyThreadState_Delete().
The release_sentinel() function is now called when the C API is still
fully working.
|
| |
|
|
|
|
|
|
|
| |
Replace a few Py_FatalError() calls if tstate is NULL with
assert(tstate != NULL) in ceval.c.
PyEval_AcquireThread(), PyEval_ReleaseThread() and
PyEval_RestoreThread() must never be called with a NULL tstate.
|
|
|
| |
The binascii.crc_hqx() function is no longer deprecated.
|
|
|
|
|
| |
Replaced the period with a comma.
Automerge-Triggered-By: @Mariatta
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some of the *SetItem methods in the C API steal a reference to the
given value. This annotates the better behaved ones to assure the
reader that these are not the ones with the inconsistent behaviour.
* šš¤ Added by blurb_it.
* make docs consistent with signature
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
|
| |
|
|
|
| |
Co-Authored-By: Kyle Stanley <aeros167@gmail.com>
|
|
|
|
|
| |
* Change the source for the SAT data to a primary source.
* Fix typo in the standard deviation
* Clarify that the binomial probabalities are just for the Python room.
|
|
|
|
|
| |
Whether or not overlap regions for self-intersecting polygons
or multiple shapes are filled depends on the operating system graphics,
typeof overlap, and number of overlaps.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add DICT_UPDATE and DICT_MERGE bytecodes. Use them for ** unpacking.
* Remove BUILD_MAP_UNPACK and BUILD_MAP_UNPACK_WITH_CALL, as they are now unused.
* Update magic number for ** unpacking opcodes.
* Update dis.rst to incorporate new bytecodes.
* Add blurb entry.
|
| |
|
| |
|
| |
|
| |
|