| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
| |
It was never really safe and this claim conflicts directly with the big warning in the docs about it being able to crash the interpreter.
|
| |
|
|
|
|
|
|
| |
(#95253)
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
|
|
|
| |
https://github.com/python/cpython/issues/90110
|
|
|
|
| |
Evil code could cause fut_callbacks to be cleared when PyObject_RichCompareBool is called.
|
|
|
|
|
| |
* When chaining futures, skip callback if loop closed.
* When shutting down an executor, don't wake a closed loop.
|
|
|
|
| |
This documents the behavior that has always been the case since timeout
support was introduced in Python 3.3.
|
|
|
|
|
| |
bpo-35598: IDLE: Refactor window and frame class
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|
|
|
|
|
|
|
|
|
|
|
| |
Fix the Python path configuration used to initialized sys.path at
Python startup. Paths are no longer encoded to UTF-8/strict to avoid
encoding errors if it contains surrogate characters (bytes paths are
decoded with the surrogateescape error handler).
getpath_basename() and getpath_dirname() functions no longer encode
the path to UTF-8/strict, but work directly on Unicode strings. These
functions now use PyUnicode_FindChar() and PyUnicode_Substring() on
the Unicode path, rather than strrchr() on the encoded bytes string.
|
|
|
|
| |
(GH-97655)
|
| |
|
|
|
|
|
|
| |
Use output from a 3.10+ REPL, showing invalid range, for the
SyntaxError examples in the tutorial introduction page.
Automerge-Triggered-By: GH:iritkatriel
|
|
|
|
| |
generator.throw (GH-96428)
|
|
|
| |
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
|
| |
|
|
|
| |
Fixed flickering when the tracer is turned off.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Fix a shell code injection vulnerability in the
get-remote-certificate.py example script. The script no longer uses a
shell to run "openssl" commands. Issue reported and initial fix by
Caleb Shortt.
Remove the Windows code path to send "quit" on stdin to the "openssl
s_client" command: use DEVNULL on all platforms instead.
Co-authored-by: Caleb Shortt <caleb@rgauge.com>
|
|
|
|
|
|
|
|
| |
Fix multiplying a list by an integer (list *= int): detect the
integer overflow when the new allocated length is close to the
maximum size. Issue reported by Jordan Limor.
list_resize() now checks for integer overflow before multiplying the
new allocated length by the list item size (sizeof(PyObject*)).
|
| |
|
|
|
|
| |
Co-authored-by: Kyle Stanley <aeros167@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix for duplicate 1st entry in 'Objects/unicodetype_db.h':
```c
/* a list of unique character type descriptors */
const _PyUnicode_TypeRecord _PyUnicode_TypeRecords[] = {
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0}, <--- HERE
{0, 0, 0, 0, 0, 32},
{0, 0, 0, 0, 0, 48},
…
```
https://bugs.python.org/issue47243
Automerge-Triggered-By: GH:isidentical
|
| |
|
| |
|
|
|
|
|
| |
(#97603)
Also fix up some cross-references in the asyncio docs.
|
| |
|
|
|
|
| |
Use HTTPS for documents which are available by both HTTP and HTTPS
links, but there is no redirection from HTTP to HTTPS or vice versa.
|
|
|
|
|
|
| |
Previously, checkbuttons in different parent widgets could have the same
short name and share the same state if arguments "name" and "variable" are
not specified. Now they are globally unique.
|
| |
|
|
|
| |
Explain that logging should not use network I/O.
|
|
|
|
| |
(GH-26204)
|
|
|
|
|
| |
faulthandler.c (#96720)
This fix corrects a typo in dump_traceback_later function docstring and removes duplicate signal.h include directive
|
|
|
|
|
| |
Fix command line parsing: reject "-X int_max_str_digits" option with
no value (invalid) when the PYTHONINTMAXSTRDIGITS environment
variable is set to a valid limit.
|
|
|
|
|
| |
(#97529)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|
| |
|
|
|
|
| |
Closes https://github.com/python/cpython/issues/75960
Closes https://github.com/python/cpython/issues/78724
|
|
|
|
|
|
|
|
|
|
| |
This PR fixes undefined behaviour in the struct module unpacking support functions `bu_longlong`, `lu_longlong`, `bu_int` and `lu_int`; thanks to @kumaraditya303 for finding these.
The fix is to accumulate the bytes in an unsigned integer type instead of a signed integer type, then to convert to the appropriate signed type. In cases where the width matches, that conversion will typically be compiled away to a no-op.
(Evidence from Godbolt: https://godbolt.org/z/5zvxodj64 .)
To make the conversions efficient, I've specialised the relevant functions for their output size: for `bu_longlong` and `lu_longlong`, this only entails checking that the output size is indeed `8`. But `bu_int` and `lu_int` were used for format sizes `2` and `4` - I've split those into two separate functions each.
No tests, because all of the affected cases are already exercised by the test suite.
|
|
|
|
|
|
|
|
|
|
|
| |
This is a preliminary PR to refactor `PyLong_FromString` which is currently quite messy and has spaghetti like code that mixes up different concerns as well as duplicating logic.
In particular:
- `PyLong_FromString` now only handles sign, base and prefix detection and calls a new function `long_from_string_base` to parse the main body of the string.
- The `long_from_string_base` function handles all string validation and then calls `long_from_binary_base` or a new function `long_from_non_binary_base` to construct the actual `PyLong`.
- The existing `long_from_binary_base` function is simplified by factoring duplicated logic to `long_from_string_base`.
- The new function `long_from_non_binary_base` factors out much of the code from `PyLong_FromString` including in particular the quadratic algorithm reffered to in gh-95778 so that this can be seen separately from unrelated concerns such as string validation.
|
|
|
|
|
|
|
| |
(GH-97520)
HTTP links in the "HISTORY OF THE SOFTWARE" section of Doc/license.rst
were converted to HTTPS in f62ff97f31a775cc7956adeae32c14e7c85bdc15.
But there were other copies of these links, which were left HTTP links.
|
|
|
|
|
| |
Only call tkinter.tk and its follow-up code in _init_tk_type when requires('gui')
does not raise. This function can be called as an unintended side-effect of
calling other idlelib code as part of tests on macOS without a GUI enabled.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
(gh-96945)
Co-authored-by: Matthias Goergens <matthias.goergens@gmail.com>
|
|
|
|
| |
This represents the official SC stance, see
https://github.com/python/steering-council/issues/142#issuecomment-1252172695
|
| |
|
|
|
|
|
|
|
|
|
| |
The main problem was that an unluckily timed task cancellation could cause
the semaphore to be stuck. There were also doubts about strict FIFO ordering
of tasks allowed to pass.
The Semaphore implementation was rewritten to be more similar to Lock.
Many tests for edge cases (including cancellation) were added.
|