Skip to content

Commit 4b50646

Browse files
committed
Merge branch 'main' into defer-task-name-formatting
2 parents 7cde290 + c8c3956 commit 4b50646

File tree

4 files changed

+31
-14
lines changed

4 files changed

+31
-14
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,10 @@ jobs:
308308
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
309309
- name: Install Dependencies
310310
run: sudo ./.github/workflows/posix-deps-apt.sh
311+
- name: Set up GCC-10 for ASAN
312+
uses: egor-tensin/setup-gcc@v1
313+
with:
314+
version: 10
311315
- name: Configure OpenSSL env vars
312316
run: |
313317
echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> $GITHUB_ENV

Doc/using/unix.rst

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,6 @@ On FreeBSD and OpenBSD
5454
pkg_add ftp://ftp.openbsd.org/pub/OpenBSD/4.2/packages/i386/python-2.5.1p2.tgz
5555

5656

57-
On OpenSolaris
58-
--------------
59-
60-
You can get Python from `OpenCSW <https://www.opencsw.org/>`_. Various versions
61-
of Python are available and can be installed with e.g. ``pkgutil -i python27``.
62-
63-
6457
.. _building-python-on-unix:
6558

6659
Building Python

Lib/test/test_tarfile.py

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3635,23 +3635,43 @@ def test_modes(self):
36353635
arc.add('exec_group_other', mode='?rw-rwxrwx')
36363636
arc.add('read_group_only', mode='?---r-----')
36373637
arc.add('no_bits', mode='?---------')
3638-
arc.add('dir/', mode='?---rwsrwt', type=tarfile.DIRTYPE)
3638+
arc.add('dir/', mode='?---rwsrwt')
3639+
3640+
# On some systems, setting the sticky bit is a no-op.
3641+
# Check if that's the case.
3642+
tmp_filename = os.path.join(TEMPDIR, "tmp.file")
3643+
with open(tmp_filename, 'w'):
3644+
pass
3645+
os.chmod(tmp_filename, os.stat(tmp_filename).st_mode | stat.S_ISVTX)
3646+
have_sticky_files = (os.stat(tmp_filename).st_mode & stat.S_ISVTX)
3647+
os.unlink(tmp_filename)
3648+
3649+
os.mkdir(tmp_filename)
3650+
os.chmod(tmp_filename, os.stat(tmp_filename).st_mode | stat.S_ISVTX)
3651+
have_sticky_dirs = (os.stat(tmp_filename).st_mode & stat.S_ISVTX)
3652+
os.rmdir(tmp_filename)
36393653

36403654
with self.check_context(arc.open(), 'fully_trusted'):
3641-
self.expect_file('all_bits', mode='?rwsrwsrwt')
3655+
if have_sticky_files:
3656+
self.expect_file('all_bits', mode='?rwsrwsrwt')
3657+
else:
3658+
self.expect_file('all_bits', mode='?rwsrwsrwx')
36423659
self.expect_file('perm_bits', mode='?rwxrwxrwx')
36433660
self.expect_file('exec_group_other', mode='?rw-rwxrwx')
36443661
self.expect_file('read_group_only', mode='?---r-----')
36453662
self.expect_file('no_bits', mode='?---------')
3646-
self.expect_file('dir', type=tarfile.DIRTYPE, mode='?---rwsrwt')
3663+
if have_sticky_dirs:
3664+
self.expect_file('dir/', mode='?---rwsrwt')
3665+
else:
3666+
self.expect_file('dir/', mode='?---rwsrwx')
36473667

36483668
with self.check_context(arc.open(), 'tar'):
36493669
self.expect_file('all_bits', mode='?rwxr-xr-x')
36503670
self.expect_file('perm_bits', mode='?rwxr-xr-x')
36513671
self.expect_file('exec_group_other', mode='?rw-r-xr-x')
36523672
self.expect_file('read_group_only', mode='?---r-----')
36533673
self.expect_file('no_bits', mode='?---------')
3654-
self.expect_file('dir/', type=tarfile.DIRTYPE, mode='?---r-xr-x')
3674+
self.expect_file('dir/', mode='?---r-xr-x')
36553675

36563676
with self.check_context(arc.open(), 'data'):
36573677
normal_dir_mode = stat.filemode(stat.S_IMODE(
@@ -3661,7 +3681,7 @@ def test_modes(self):
36613681
self.expect_file('exec_group_other', mode='?rw-r--r--')
36623682
self.expect_file('read_group_only', mode='?rw-r-----')
36633683
self.expect_file('no_bits', mode='?rw-------')
3664-
self.expect_file('dir/', type=tarfile.DIRTYPE, mode=normal_dir_mode)
3684+
self.expect_file('dir/', mode=normal_dir_mode)
36653685

36663686
def test_pipe(self):
36673687
# Test handling of a special file

Objects/typeobject.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6706,7 +6706,6 @@ type_ready_mro(PyTypeObject *type)
67066706
and static builtin types must have static builtin bases. */
67076707
if (!(type->tp_flags & Py_TPFLAGS_HEAPTYPE)) {
67086708
assert(type->tp_flags & Py_TPFLAGS_IMMUTABLETYPE);
6709-
int isbuiltin = type->tp_flags & _Py_TPFLAGS_STATIC_BUILTIN;
67106709
PyObject *mro = type->tp_mro;
67116710
Py_ssize_t n = PyTuple_GET_SIZE(mro);
67126711
for (Py_ssize_t i = 0; i < n; i++) {
@@ -6718,7 +6717,8 @@ type_ready_mro(PyTypeObject *type)
67186717
type->tp_name, base->tp_name);
67196718
return -1;
67206719
}
6721-
assert(!isbuiltin || (base->tp_flags & _Py_TPFLAGS_STATIC_BUILTIN));
6720+
assert(!(type->tp_flags & _Py_TPFLAGS_STATIC_BUILTIN) ||
6721+
(base->tp_flags & _Py_TPFLAGS_STATIC_BUILTIN));
67226722
}
67236723
}
67246724
return 0;

0 commit comments

Comments
 (0)