<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Python/import.c, branch Mariatta-patch-2</title>
<subtitle>github.com: python/cpython.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/'/>
<entry>
<title>bpo-42152: Use PyDict_Contains and PyDict_SetDefault if appropriate. (GH-22986)</title>
<updated>2020-10-26T10:47:57+00:00</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2020-10-26T10:47:57+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=b510e101f8b5b31276bf97b921ca9247162881d2'/>
<id>b510e101f8b5b31276bf97b921ca9247162881d2</id>
<content type='text'>
If PyDict_GetItemWithError is only used to check whether the key is in dict,
it is better to use PyDict_Contains instead.

And if it is used in combination with PyDict_SetItem, PyDict_SetDefault can
replace the combination.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If PyDict_GetItemWithError is only used to check whether the key is in dict,
it is better to use PyDict_Contains instead.

And if it is used in combination with PyDict_SetItem, PyDict_SetDefault can
replace the combination.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-41993: Fix possible issues in remove_module() (GH-22631)</title>
<updated>2020-10-11T13:51:07+00:00</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2020-10-11T13:51:07+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=8287aadb75f6bd0154996424819334cd3839707c'/>
<id>8287aadb75f6bd0154996424819334cd3839707c</id>
<content type='text'>
* PyMapping_HasKey() is not safe because it silences all exceptions and can return incorrect result.
* Informative exceptions from PyMapping_DelItem() are overridden with RuntimeError and
  the original exception raised before calling remove_module() is lost.
* There is a race condition between PyMapping_HasKey() and PyMapping_DelItem().</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* PyMapping_HasKey() is not safe because it silences all exceptions and can return incorrect result.
* Informative exceptions from PyMapping_DelItem() are overridden with RuntimeError and
  the original exception raised before calling remove_module() is lost.
* There is a race condition between PyMapping_HasKey() and PyMapping_DelItem().</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-40232: _PyImport_ReInitLock() can now safely use its lock (GH-20597)</title>
<updated>2020-06-02T15:13:49+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-06-02T15:13:49+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=45b34a04a577aa49fa4825421758c3e8eaa1625d'/>
<id>45b34a04a577aa49fa4825421758c3e8eaa1625d</id>
<content type='text'>
Since _PyImport_ReInitLock() now calls _PyThread_at_fork_reinit() on
the import lock, the lock is now in a known state: unlocked. It
became safe to acquire it after fork.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since _PyImport_ReInitLock() now calls _PyThread_at_fork_reinit() on
the import lock, the lock is now in a known state: unlocked. It
became safe to acquire it after fork.</pre>
</div>
</content>
</entry>
<entry>
<title>PyOS_AfterFork_Child() uses PyStatus (GH-20596)</title>
<updated>2020-06-02T13:51:37+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-06-02T13:51:37+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=26881c8fae3b67db3a01d335d3ae7356a29b433e'/>
<id>26881c8fae3b67db3a01d335d3ae7356a29b433e</id>
<content type='text'>
PyOS_AfterFork_Child() helper functions now return a PyStatus:
PyOS_AfterFork_Child() is now responsible to handle errors.

* Move _PySignal_AfterFork() to the internal C API
* Add #ifdef HAVE_FORK on _PyGILState_Reinit(), _PySignal_AfterFork()
  and _PyInterpreterState_DeleteExceptMain().</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PyOS_AfterFork_Child() helper functions now return a PyStatus:
PyOS_AfterFork_Child() is now responsible to handle errors.

* Move _PySignal_AfterFork() to the internal C API
* Add #ifdef HAVE_FORK on _PyGILState_Reinit(), _PySignal_AfterFork()
  and _PyInterpreterState_DeleteExceptMain().</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-40417: Fix deprecation warning in PyImport_ReloadModule (GH-19750)</title>
<updated>2020-05-01T23:28:06+00:00</updated>
<author>
<name>Robert Rouhani</name>
<email>robert.rouhani@gmail.com</email>
</author>
<published>2020-05-01T23:28:06+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=f40bd466bf14029e2687e36e965875adf9d4be1a'/>
<id>f40bd466bf14029e2687e36e965875adf9d4be1a</id>
<content type='text'>
I can add another commit with the new test case I wrote to verify that the warning was being printed before my change, stopped printing after my change, and that the function does not return null after my change.

Automerge-Triggered-By: @brettcannon</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I can add another commit with the new test case I wrote to verify that the warning was being printed before my change, stopped printing after my change, and that the function does not return null after my change.

Automerge-Triggered-By: @brettcannon</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-40412: Nullify inittab_copy during finalization (GH-19746)</title>
<updated>2020-05-01T18:07:54+00:00</updated>
<author>
<name>Gregory Szorc</name>
<email>gregory.szorc@gmail.com</email>
</author>
<published>2020-05-01T18:07:54+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=64224a4727321a8dd33e6f769edda401193ebef0'/>
<id>64224a4727321a8dd33e6f769edda401193ebef0</id>
<content type='text'>
Otherwise we leave a dangling pointer to free'd memory. If we
then initialize a new interpreter in the same process and call
PyImport_ExtendInittab, we will (likely) crash when calling
PyMem_RawRealloc(inittab_copy, ...) since the pointer address
is bogus.

Automerge-Triggered-By: @brettcannon</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Otherwise we leave a dangling pointer to free'd memory. If we
then initialize a new interpreter in the same process and call
PyImport_ExtendInittab, we will (likely) crash when calling
PyMem_RawRealloc(inittab_copy, ...) since the pointer address
is bogus.

Automerge-Triggered-By: @brettcannon</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-40429: PyFrame_GetCode() now returns a strong reference (GH-19773)</title>
<updated>2020-04-28T23:28:13+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-04-28T23:28:13+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=8852ad4208e34825f74e24945edb5bcf055d94fe'/>
<id>8852ad4208e34825f74e24945edb5bcf055d94fe</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-40421: Add PyFrame_GetCode() function (GH-19757)</title>
<updated>2020-04-28T17:01:31+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-04-28T17:01:31+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=a42ca74fa30227e2f89a619332557cf093a937d5'/>
<id>a42ca74fa30227e2f89a619332557cf093a937d5</id>
<content type='text'>
PyFrame_GetCode(frame): return a borrowed reference to the frame
code.

Replace frame-&gt;f_code with PyFrame_GetCode(frame) in most code,
except in frameobject.c, genobject.c and ceval.c.

Also add PyFrame_GetLineNumber() to the limited C API.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PyFrame_GetCode(frame): return a borrowed reference to the frame
code.

Replace frame-&gt;f_code with PyFrame_GetCode(frame) in most code,
except in frameobject.c, genobject.c and ceval.c.

Also add PyFrame_GetLineNumber() to the limited C API.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-40268: Remove unused osdefs.h includes (GH-19532)</title>
<updated>2020-04-15T01:24:57+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-04-15T01:24:57+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=361dcdcefc80f5729ed18ac0ef73327794fbf400'/>
<id>361dcdcefc80f5729ed18ac0ef73327794fbf400</id>
<content type='text'>
When the include is needed, add required symbol in a comment.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When the include is needed, add required symbol in a comment.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-40268: Remove unused pycore_pymem.h includes (GH-19531)</title>
<updated>2020-04-15T00:57:50+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-04-15T00:57:50+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=d9ea5cae1d07e1ee8b03540a9367c26205e0e360'/>
<id>d9ea5cae1d07e1ee8b03540a9367c26205e0e360</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
