cpython icon indicating copy to clipboard operation
cpython copied to clipboard

The Python programming language

Results 1387 cpython issues
Sort by recently updated
recently updated
newest added

- Switch PyUnicode_InternInPlace to _PyUnicode_InternMortal - Keep immortalizing in functions that take `char*`, and are almost exclusively used with strings known at compile-time: - PyUnicode_InternFromString - PyDict_SetItemString - PyObject_SetAttrString -...

awaiting core review

# Bug report ### Bug description: The [`sys.intern` documentation](https://docs.python.org/3.13/library/sys.html#sys.intern) explicitly says: > Interned strings are not [immortal](https://docs.python.org/3.13/glossary.html#term-immortal); you must keep a reference to the return value of [`intern()`](https://docs.python.org/3.13/library/sys.html#sys.intern) around to...

type-bug
topic-subinterpreters

There are validations in compile.c that can move to earlier stages (AST validation or symtable construction). And the compiler is modifying the symbol table (setting ``ste_coroutine``), which it really shouldn't...

I could not reproduce the reported issue, but, I didn't try very hard to test on various readline libraries. Regardless, `set_history_length` was missing a test. This PR should show if...

tests
awaiting core review
skip news

Add a short note on when Path.unlink() raises `NotADirectoryError` This can occur "in the wild", for example, after calling `shutil.move(src, dst)` where `dst` is a non-existent directory. Debugging can cost...

docs
awaiting review
skip news

Older stable ABI extensions are allowed to make immortal objects mortal. Instead of `_Py_IsImmortal`, use `_PyUnicode_STATE` (`interned` and `statically_allocated`), or skip asserts altogether. * Issue: gh-113993

awaiting core review
needs backport to 3.13

This is not something we can do too much about, without help from the underlying libraries. The file formats seem to be treated as implementation details, hidden behind [API calls](https://www.man7.org/linux/man-pages/man3/history.3.html)....

docs
awaiting core review
skip news

Example with s390x Fedora 3.x: https://buildbot.python.org/all/#/builders/223/builds/6180 ``` FAIL: test_not_wiping_history_file (test.test_pyrepl.test_pyrepl.TestMain.test_not_wiping_history_file) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z/build/Lib/test/test_pyrepl/test_pyrepl.py", line 916, in test_not_wiping_history_file self.assertNotEqual(pathlib.Path(hfile.name).stat().st_size, 0) ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError: 0 == 0 ```...

tests
topic-repl

# Bug report ### Bug description: According to the docs [here](https://docs.python.org/3/library/pathlib.html#pathlib.PurePath.suffix) a suffix is defined as: > The file extension of the final component, if any But pathlib doesn't behave...

type-bug
topic-pathlib

General goal here is to be able to add tests that behavior isn't unintentionally changed around some common python code patterns, in particular Path("README.rst").read_text(). This started with the code that...

awaiting review