Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into pep649-compile
Browse files Browse the repository at this point in the history
  • Loading branch information
JelleZijlstra committed Jun 1, 2024
2 parents e748feb + cc5cd4d commit a2b4f9e
Show file tree
Hide file tree
Showing 40 changed files with 971 additions and 646 deletions.
6 changes: 6 additions & 0 deletions Doc/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,12 @@ Glossary
division. Note that ``(-11) // 4`` is ``-3`` because that is ``-2.75``
rounded *downward*. See :pep:`238`.

free threading
A threading model where multiple threads can run Python bytecode
simultaneously within the same interpreter. This is in contrast to
the :term:`global interpreter lock` which allows only one thread to
execute Python bytecode at a time. See :pep:`703`.

function
A series of statements which returns some value to a caller. It can also
be passed zero or more :term:`arguments <argument>` which may be used in
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/contextlib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ executing that callback::
if result:
stack.pop_all()

This allows the intended cleanup up behaviour to be made explicit up front,
This allows the intended cleanup behaviour to be made explicit up front,
rather than requiring a separate flag variable.

If a particular application uses this pattern a lot, it can be simplified
Expand Down
2 changes: 1 addition & 1 deletion Doc/reference/datamodel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1243,7 +1243,7 @@ Methods on code objects

The iterator returns :class:`tuple`\s containing the ``(start_line, end_line,
start_column, end_column)``. The *i-th* tuple corresponds to the
position of the source code that compiled to the *i-th* instruction.
position of the source code that compiled to the *i-th* code unit.
Column information is 0-indexed utf-8 byte offsets on the given source
line.

Expand Down
1 change: 1 addition & 0 deletions Include/Python.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
#include "pystats.h"
#include "pyatomic.h"
#include "object.h"
#include "refcount.h"
#include "objimpl.h"
#include "typeslots.h"
#include "pyhash.h"
Expand Down
3 changes: 3 additions & 0 deletions Include/internal/pycore_object.h
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,9 @@ _Py_NewRefWithLock(PyObject *op)
if (_Py_TryIncrefFast(op)) {
return op;
}
#ifdef Py_REF_DEBUG
_Py_IncRefTotal(_PyThreadState_GET());
#endif
_Py_INCREF_STAT_INC();
for (;;) {
Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&op->ob_ref_shared);
Expand Down
1 change: 0 additions & 1 deletion Include/internal/pycore_opcode_metadata.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions Include/internal/pycore_uop_metadata.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a2b4f9e

Please sign in to comment.