Skip to content

Commit

Permalink
Merge branch 'main' into io-textiowrapper-fix-write-during-flush
Browse files Browse the repository at this point in the history
  • Loading branch information
chgnrdv authored May 24, 2024
2 parents 4809c1a + bf5b646 commit e551b86
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 15 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/jit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,22 @@ concurrency:
cancel-in-progress: true

jobs:
interpreter:
name: Interpreter (Debug)
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- uses: actions/checkout@v4
- name: Build tier two interpreter
run: |
./configure --enable-experimental-jit=interpreter --with-pydebug
make all --jobs 4
- name: Test tier two interpreter
run: |
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
jit:
name: ${{ matrix.target }} (${{ matrix.debug && 'Debug' || 'Release' }})
needs: interpreter
runs-on: ${{ matrix.runner }}
timeout-minutes: 90
strategy:
Expand Down Expand Up @@ -153,6 +167,7 @@ jobs:
jit-with-disabled-gil:
name: Free-Threaded (Debug)
needs: interpreter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/base64.rst
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ The modern interface provides:

*wrapcol* controls whether the output should have newline (``b'\n'``)
characters added to it. If this is non-zero, each output line will be
at most this many characters long.
at most this many characters long, excluding the trailing newline.

*pad* controls whether the input is padded to a multiple of 4
before encoding. Note that the ``btoa`` implementation always pads.
Expand Down
4 changes: 2 additions & 2 deletions Doc/tools/extensions/glossary_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ def process_glossary_nodes(app, doctree, fromdocname):

terms = {}

for node in doctree.traverse(glossary):
for glossary_item in node.traverse(definition_list_item):
for node in doctree.findall(glossary):
for glossary_item in node.findall(definition_list_item):
term = glossary_item[0].astext().lower()
definition = glossary_item[1]

Expand Down
4 changes: 2 additions & 2 deletions Doc/tools/extensions/pyspecific.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ def parse_monitoring_event(env, sig, signode):


def process_audit_events(app, doctree, fromdocname):
for node in doctree.traverse(audit_event_list):
for node in doctree.findall(audit_event_list):
break
else:
return
Expand Down Expand Up @@ -663,7 +663,7 @@ def process_audit_events(app, doctree, fromdocname):

body += row

for node in doctree.traverse(audit_event_list):
for node in doctree.findall(audit_event_list):
node.replace_self(table)


Expand Down
2 changes: 1 addition & 1 deletion Lib/base64.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ def a85encode(b, *, foldspaces=False, wrapcol=0, pad=False, adobe=False):
wrapcol controls whether the output should have newline (b'\\n') characters
added to it. If this is non-zero, each output line will be at most this
many characters long.
many characters long, excluding the trailing newline.
pad controls whether the input is padded to a multiple of 4 before
encoding. Note that the btoa implementation always pads.
Expand Down
4 changes: 3 additions & 1 deletion Lib/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,9 @@ def addpackage(sitedir, name, known_paths):
return

try:
pth_content = pth_content.decode()
# Accept BOM markers in .pth files as we do in source files
# (Windows PowerShell 5.1 makes it hard to emit UTF-8 files without a BOM)
pth_content = pth_content.decode("utf-8-sig")
except UnicodeDecodeError:
# Fallback to locale encoding for backward compatibility.
# We will deprecate this fallback in the future.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Fix ``fcntl.ioctl()`` *request* parameter: use an ``unsigned long`` instead of
an ``unsigned int`` for the *request* parameter of :func:`fcntl.ioctl` to
support requests larger than ``UINT_MAX``. Patch by Victor Stinner.
11 changes: 6 additions & 5 deletions Modules/clinic/fcntlmodule.c.h

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

6 changes: 3 additions & 3 deletions Modules/fcntlmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ fcntl_fcntl_impl(PyObject *module, int fd, int code, PyObject *arg)
fcntl.ioctl
fd: fildes
request as code: unsigned_int(bitwise=True)
request as code: unsigned_long(bitwise=True)
arg as ob_arg: object(c_default='NULL') = 0
mutate_flag as mutate_arg: bool = True
/
Expand Down Expand Up @@ -148,9 +148,9 @@ code.
[clinic start generated code]*/

static PyObject *
fcntl_ioctl_impl(PyObject *module, int fd, unsigned int code,
fcntl_ioctl_impl(PyObject *module, int fd, unsigned long code,
PyObject *ob_arg, int mutate_arg)
/*[clinic end generated code: output=7f7f5840c65991be input=967b4a4cbeceb0a8]*/
/*[clinic end generated code: output=3d8eb6828666cea1 input=cee70f6a27311e58]*/
{
#define IOCTL_BUFSZ 1024
/* We use the unsigned non-checked 'I' format for the 'code' parameter
Expand Down

0 comments on commit e551b86

Please sign in to comment.