Skip to content

gh-99300: Use Py_NewRef() in Doc/ directory - #99480

Merged
vstinner merged 2 commits into
python:mainfrom
vstinner:newref_doc
Nov 14, 2022
Merged

vstinner merged 2 commits into
python:mainfrom
vstinner:newref_doc

Conversation

@vstinner

@vstinner vstinner commented Nov 14, 2022 •

Copy link
Copy Markdown
Member

Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and Py_XNewRef() in test C files of the Doc/ directory.

Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and
Py_XNewRef() in test C files of the Doc/ directory.
@vstinner

Copy link
Copy Markdown
Member Author

Py_NewRef() is documented in Python 3.10 and 3.11, it's time to use it :-) https://docs.python.org/dev/c-api/refcounting.html#c.Py_NewRef

@vstinner

Copy link
Copy Markdown
Member Author
@vstinner vstinner changed the title gh-99300: Use Py_NewRef() in Doc/ directory Nov 14, 2022
Replace PyModule_AddObject() with PyModule_AddObjectRef() to simplify
reference counting.
@vstinner
vstinner merged commit 1089bdc into python:main Nov 14, 2022
@vstinner
vstinner deleted the newref_doc branch November 14, 2022 17:49
CuriousLearner added a commit to CuriousLearner/cpython that referenced this pull request Nov 16, 2022
* main: (8272 commits)
  Update Windows readme.txt to clarify Visual Studio required versions (pythonGH-99522)
  pythongh-99460 Emscripten trampolines on optimized METH_O and METH_NOARGS code paths (python#99461)
  pythongh-92647: [Enum] use final status to determine lookup or create (pythonGH-99500)
  pythongh-81057: Move Globals in Core Code to _PyRuntimeState (pythongh-99496)
  Post 3.12.0a2
  pythongh-99300: Use Py_NewRef() in Python/Python-ast.c (python#99499)
  pythongh-93649: Split pytime and datetime tests from _testcapimodule.c (python#99494)
  pythongh-99370: fix test_zippath_from_non_installed_posix (pythonGH-99483)
  pythonGH-99205: remove `_static` field from `PyThreadState` and `PyInterpreterState` (pythonGH-99385)
  pythongh-81057: Move the Remaining Import State Globals to _PyRuntimeState (pythongh-99488)
  pythongh-87604: Avoid publishing list of active per-interpreter audit hooks via the gc module (pythonGH-99373)
  pythongh-93649: Split getargs tests from _testcapimodule.c (python#99346)
  pythongh-81057: Move Global Variables Holding Objects to _PyRuntimeState. (pythongh-99487)
  pythonGH-98219: reduce sleep time in `asyncio` subprocess test (python#99464)
  pythonGH-99388: add `loop_factory` parameter to `asyncio.run` (python#99462)
  pythongh-99300: Use Py_NewRef() in PC/ directory (python#99479)
  pythongh-99300: Use Py_NewRef() in Doc/ directory  (python#99480)
  pythongh-99300: Use Py_NewRef() in Modules/ directory (python#99473)
  pythongh-99300: Use Py_NewRef() in Modules/ directory (python#99469)
  pythongh-99370: Calculate zip path from prefix when in a venv (pythonGH-99371)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants