Python 3.7 (fedpkg prep ok, builds ok without debug)

This commit is contained in:
Miro Hrončok 2017-11-28 13:47:21 +01:00
parent 1f528dac57
commit d668c1e89c
9 changed files with 85 additions and 1244 deletions

View File

@ -1,5 +1,5 @@
diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py
index 9474e9c..c0ce4c6 100644 index 0258d3d..4b969bf 100644
--- a/Lib/distutils/command/install.py --- a/Lib/distutils/command/install.py
+++ b/Lib/distutils/command/install.py +++ b/Lib/distutils/command/install.py
@@ -30,14 +30,14 @@ WINDOWS_SCHEME = { @@ -30,14 +30,14 @@ WINDOWS_SCHEME = {
@ -20,10 +20,10 @@ index 9474e9c..c0ce4c6 100644
'scripts': '$base/bin', 'scripts': '$base/bin',
'data' : '$base', 'data' : '$base',
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
index 026cca7..6d3e077 100644 index e07a6c8..554740d 100644
--- a/Lib/distutils/sysconfig.py --- a/Lib/distutils/sysconfig.py
+++ b/Lib/distutils/sysconfig.py +++ b/Lib/distutils/sysconfig.py
@@ -132,8 +132,12 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): @@ -129,8 +129,12 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
prefix = plat_specific and EXEC_PREFIX or PREFIX prefix = plat_specific and EXEC_PREFIX or PREFIX
if os.name == "posix": if os.name == "posix":
@ -37,10 +37,11 @@ index 026cca7..6d3e077 100644
if standard_lib: if standard_lib:
return libpython return libpython
else: else:
diff a/Lib/distutils/tests/test_install.py b/Lib/distutils/tests/test_install.py diff --git a/Lib/distutils/tests/test_install.py b/Lib/distutils/tests/test_install.py
index 287ab19..d4c05e0 100644
--- a/Lib/distutils/tests/test_install.py --- a/Lib/distutils/tests/test_install.py
+++ b/Lib/distutils/tests/test_install.py +++ b/Lib/distutils/tests/test_install.py
@@ -57,8 +57,9 @@ @@ -57,8 +57,9 @@ class InstallTestCase(support.TempdirManager,
self.assertEqual(got, expected) self.assertEqual(got, expected)
libdir = os.path.join(destination, "lib", "python") libdir = os.path.join(destination, "lib", "python")
@ -52,10 +53,10 @@ diff a/Lib/distutils/tests/test_install.py b/Lib/distutils/tests/test_install.py
check_path(cmd.install_headers, check_path(cmd.install_headers,
os.path.join(destination, "include", "python", "foopkg")) os.path.join(destination, "include", "python", "foopkg"))
diff --git a/Lib/site.py b/Lib/site.py diff --git a/Lib/site.py b/Lib/site.py
index a84e3bb..ba0d3ea 100644 index 7dc1b04..85016b4 100644
--- a/Lib/site.py --- a/Lib/site.py
+++ b/Lib/site.py +++ b/Lib/site.py
@@ -303,11 +303,15 @@ def getsitepackages(prefixes=None): @@ -334,11 +334,15 @@ def getsitepackages(prefixes=None):
seen.add(prefix) seen.add(prefix)
if os.sep == '/': if os.sep == '/':
@ -69,10 +70,10 @@ index a84e3bb..ba0d3ea 100644
sitepackages.append(prefix) sitepackages.append(prefix)
+ sitepackages.append(os.path.join(prefix, "lib64", "site-packages")) + sitepackages.append(os.path.join(prefix, "lib64", "site-packages"))
sitepackages.append(os.path.join(prefix, "lib", "site-packages")) sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
if sys.platform == "darwin": # for framework builds *only* we add the standard Apple locations.
# for framework builds *only* we add the standard Apple if sys.platform == "darwin" and sys._framework:
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
index b9bbfe5..2a5f29c 100644 index 9ee4d31..53c8606 100644
--- a/Lib/sysconfig.py --- a/Lib/sysconfig.py
+++ b/Lib/sysconfig.py +++ b/Lib/sysconfig.py
@@ -20,10 +20,10 @@ __all__ = [ @@ -20,10 +20,10 @@ __all__ = [
@ -89,7 +90,7 @@ index b9bbfe5..2a5f29c 100644
'include': 'include':
'{installed_base}/include/python{py_version_short}{abiflags}', '{installed_base}/include/python{py_version_short}{abiflags}',
'platinclude': 'platinclude':
@@ -61,10 +61,10 @@ _INSTALL_SCHEMES = { @@ -62,10 +62,10 @@ _INSTALL_SCHEMES = {
'data': '{userbase}', 'data': '{userbase}',
}, },
'posix_user': { 'posix_user': {
@ -104,10 +105,10 @@ index b9bbfe5..2a5f29c 100644
'scripts': '{userbase}/bin', 'scripts': '{userbase}/bin',
'data': '{userbase}', 'data': '{userbase}',
diff --git a/Lib/test/test_site.py b/Lib/test/test_site.py diff --git a/Lib/test/test_site.py b/Lib/test/test_site.py
index f698927..bc977b5 100644 index 99e7b4f..c4c98a6 100644
--- a/Lib/test/test_site.py --- a/Lib/test/test_site.py
+++ b/Lib/test/test_site.py +++ b/Lib/test/test_site.py
@@ -248,8 +248,8 @@ class HelperFunctionsTests(unittest.TestCase): @@ -275,8 +275,8 @@ class HelperFunctionsTests(unittest.TestCase):
self.assertEqual(dirs[1], wanted) self.assertEqual(dirs[1], wanted)
elif os.sep == '/': elif os.sep == '/':
# OS X non-framwework builds, Linux, FreeBSD, etc # OS X non-framwework builds, Linux, FreeBSD, etc
@ -119,10 +120,10 @@ index f698927..bc977b5 100644
'site-packages') 'site-packages')
self.assertEqual(dirs[0], wanted) self.assertEqual(dirs[0], wanted)
diff --git a/Makefile.pre.in b/Makefile.pre.in diff --git a/Makefile.pre.in b/Makefile.pre.in
index 8fa7934..a693917 100644 index e8df8f7..a5a9d5e 100644
--- a/Makefile.pre.in --- a/Makefile.pre.in
+++ b/Makefile.pre.in +++ b/Makefile.pre.in
@@ -126,7 +126,7 @@ LIBDIR= @libdir@ @@ -133,7 +133,7 @@ LIBDIR= @libdir@
MANDIR= @mandir@ MANDIR= @mandir@
INCLUDEDIR= @includedir@ INCLUDEDIR= @includedir@
CONFINCLUDEDIR= $(exec_prefix)/include CONFINCLUDEDIR= $(exec_prefix)/include
@ -132,7 +133,7 @@ index 8fa7934..a693917 100644
# Detailed destination directories # Detailed destination directories
diff --git a/Modules/getpath.c b/Modules/getpath.c diff --git a/Modules/getpath.c b/Modules/getpath.c
index 65b47a3..eaa756c 100644 index dd3387a..1258fcd 100644
--- a/Modules/getpath.c --- a/Modules/getpath.c
+++ b/Modules/getpath.c +++ b/Modules/getpath.c
@@ -494,7 +494,7 @@ calculate_path(void) @@ -494,7 +494,7 @@ calculate_path(void)
@ -163,10 +164,10 @@ index 65b47a3..eaa756c 100644
/* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */ /* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */
diff --git a/setup.py b/setup.py diff --git a/setup.py b/setup.py
index 0f2dfc4..da37896 100644 index 11c4ec6..c3e5512 100644
--- a/setup.py --- a/setup.py
+++ b/setup.py +++ b/setup.py
@@ -492,7 +492,7 @@ class PyBuildExt(build_ext): @@ -513,7 +513,7 @@ class PyBuildExt(build_ext):
# directories (i.e. '.' and 'Include') must be first. See issue # directories (i.e. '.' and 'Include') must be first. See issue
# 10520. # 10520.
if not cross_compiling: if not cross_compiling:
@ -175,7 +176,7 @@ index 0f2dfc4..da37896 100644
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
# only change this for cross builds for 3.3, issues on Mageia # only change this for cross builds for 3.3, issues on Mageia
if cross_compiling: if cross_compiling:
@@ -780,11 +780,11 @@ class PyBuildExt(build_ext): @@ -809,11 +809,11 @@ class PyBuildExt(build_ext):
elif curses_library: elif curses_library:
readline_libs.append(curses_library) readline_libs.append(curses_library)
elif self.compiler.find_library_file(lib_dirs + elif self.compiler.find_library_file(lib_dirs +
@ -189,7 +190,7 @@ index 0f2dfc4..da37896 100644
extra_link_args=readline_extra_link_args, extra_link_args=readline_extra_link_args,
libraries=readline_libs) ) libraries=readline_libs) )
else: else:
@@ -821,8 +821,8 @@ class PyBuildExt(build_ext): @@ -850,8 +850,8 @@ class PyBuildExt(build_ext):
if krb5_h: if krb5_h:
ssl_incs += krb5_h ssl_incs += krb5_h
ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs, ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,

View File

@ -1,9 +1,9 @@
diff --git a/Makefile.pre.in b/Makefile.pre.in diff --git a/Makefile.pre.in b/Makefile.pre.in
index 70e5927..04c8e3d 100644 index a5a9d5e..51e8132 100644
--- a/Makefile.pre.in --- a/Makefile.pre.in
+++ b/Makefile.pre.in +++ b/Makefile.pre.in
@@ -556,7 +556,7 @@ clinic: $(BUILDPYTHON) $(srcdir)/Modules/_blake2/blake2s_impl.c @@ -530,7 +530,7 @@ clinic: $(BUILDPYTHON) $(srcdir)/Modules/_blake2/blake2s_impl.c
$(RUNSHARED) $(PYTHON_FOR_BUILD) ./Tools/clinic/clinic.py --make $(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/Tools/clinic/clinic.py --make --srcdir $(srcdir)
# Build the interpreter # Build the interpreter
-$(BUILDPYTHON): Programs/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) -$(BUILDPYTHON): Programs/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY)
@ -11,26 +11,20 @@ index 70e5927..04c8e3d 100644
$(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
platform: $(BUILDPYTHON) pybuilddir.txt platform: $(BUILDPYTHON) pybuilddir.txt
@@ -601,18 +601,6 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o @@ -574,12 +574,6 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o
_TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \
$(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
-
-# Build static library -# Build static library
-# avoid long command lines, same as LIBRARY_OBJS
-$(LIBRARY): $(LIBRARY_OBJS) -$(LIBRARY): $(LIBRARY_OBJS)
- -rm -f $@ - -rm -f $@
- $(AR) $(ARFLAGS) $@ Modules/getbuildinfo.o - $(AR) $(ARFLAGS) $@ $(LIBRARY_OBJS)
- $(AR) $(ARFLAGS) $@ $(PARSER_OBJS)
- $(AR) $(ARFLAGS) $@ $(OBJECT_OBJS)
- $(AR) $(ARFLAGS) $@ $(PYTHON_OBJS) Python/frozen.o
- $(AR) $(ARFLAGS) $@ $(MODULE_OBJS)
- $(AR) $(ARFLAGS) $@ $(MODOBJS)
- $(RANLIB) $@
- -
libpython$(LDVERSION).so: $(LIBRARY_OBJS) libpython$(LDVERSION).so: $(LIBRARY_OBJS)
if test $(INSTSONAME) != $(LDLIBRARY); then \ if test $(INSTSONAME) != $(LDLIBRARY); then \
$(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \ $(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
@@ -702,7 +690,7 @@ Modules/Setup: $(srcdir)/Modules/Setup.dist @@ -667,7 +661,7 @@ Modules/Setup: $(srcdir)/Modules/Setup.dist
echo "-----------------------------------------------"; \ echo "-----------------------------------------------"; \
fi fi
@ -39,7 +33,7 @@ index 70e5927..04c8e3d 100644
$(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
############################################################################ ############################################################################
@@ -1382,18 +1370,6 @@ libainstall: all python-config @@ -1408,17 +1402,6 @@ libainstall: @DEF_MAKE_RULE@ python-config
else true; \ else true; \
fi; \ fi; \
done done
@ -49,7 +43,6 @@ index 70e5927..04c8e3d 100644
- $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \ - $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
- else \ - else \
- $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \ - $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
- $(RANLIB) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
- fi; \ - fi; \
- else \ - else \
- echo Skip install of $(LIBRARY) - use make frameworkinstall; \ - echo Skip install of $(LIBRARY) - use make frameworkinstall; \

View File

@ -1,8 +1,8 @@
diff --git a/Include/object.h b/Include/object.h diff --git a/Include/object.h b/Include/object.h
index 0c88603..e3413e8 100644 index cb57359..f928f97 100644
--- a/Include/object.h --- a/Include/object.h
+++ b/Include/object.h +++ b/Include/object.h
@@ -1059,6 +1059,49 @@ PyAPI_FUNC(void) @@ -1069,6 +1069,49 @@ PyAPI_FUNC(void)
_PyObject_DebugTypeStats(FILE *out); _PyObject_DebugTypeStats(FILE *out);
#endif /* ifndef Py_LIMITED_API */ #endif /* ifndef Py_LIMITED_API */
@ -53,7 +53,7 @@ index 0c88603..e3413e8 100644
} }
#endif #endif
diff --git a/Lib/test/test_gc.py b/Lib/test/test_gc.py diff --git a/Lib/test/test_gc.py b/Lib/test/test_gc.py
index e727499..6efcafb 100644 index 904fc7d..5676007 100644
--- a/Lib/test/test_gc.py --- a/Lib/test/test_gc.py
+++ b/Lib/test/test_gc.py +++ b/Lib/test/test_gc.py
@@ -1,10 +1,11 @@ @@ -1,10 +1,11 @@
@ -69,7 +69,7 @@ index e727499..6efcafb 100644
import time import time
import gc import gc
import weakref import weakref
@@ -50,6 +51,8 @@ class GC_Detector(object): @@ -46,6 +47,8 @@ class GC_Detector(object):
# gc collects it. # gc collects it.
self.wr = weakref.ref(C1055820(666), it_happened) self.wr = weakref.ref(C1055820(666), it_happened)
@ -78,7 +78,7 @@ index e727499..6efcafb 100644
@with_tp_del @with_tp_del
class Uncollectable(object): class Uncollectable(object):
"""Create a reference cycle with multiple __del__ methods. """Create a reference cycle with multiple __del__ methods.
@@ -862,6 +865,50 @@ class GCCallbackTests(unittest.TestCase): @@ -863,6 +866,50 @@ class GCCallbackTests(unittest.TestCase):
self.assertEqual(len(gc.garbage), 0) self.assertEqual(len(gc.garbage), 0)
@ -130,10 +130,10 @@ index e727499..6efcafb 100644
def setUp(self): def setUp(self):
gc.enable() gc.enable()
diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c
index 0c6f444..87edd5a 100644 index 6e26c7a..8410206 100644
--- a/Modules/gcmodule.c --- a/Modules/gcmodule.c
+++ b/Modules/gcmodule.c +++ b/Modules/gcmodule.c
@@ -341,7 +341,8 @@ update_refs(PyGC_Head *containers) @@ -238,7 +238,8 @@ update_refs(PyGC_Head *containers)
{ {
PyGC_Head *gc = containers->gc.gc_next; PyGC_Head *gc = containers->gc.gc_next;
for (; gc != containers; gc = gc->gc.gc_next) { for (; gc != containers; gc = gc->gc.gc_next) {
@ -143,7 +143,7 @@ index 0c6f444..87edd5a 100644
_PyGCHead_SET_REFS(gc, Py_REFCNT(FROM_GC(gc))); _PyGCHead_SET_REFS(gc, Py_REFCNT(FROM_GC(gc)));
/* Python's cyclic gc should never see an incoming refcount /* Python's cyclic gc should never see an incoming refcount
* of 0: if something decref'ed to 0, it should have been * of 0: if something decref'ed to 0, it should have been
@@ -361,7 +362,8 @@ update_refs(PyGC_Head *containers) @@ -258,7 +259,8 @@ update_refs(PyGC_Head *containers)
* so serious that maybe this should be a release-build * so serious that maybe this should be a release-build
* check instead of an assert? * check instead of an assert?
*/ */
@ -153,7 +153,7 @@ index 0c6f444..87edd5a 100644
} }
} }
@@ -376,7 +378,9 @@ visit_decref(PyObject *op, void *data) @@ -273,7 +275,9 @@ visit_decref(PyObject *op, void *data)
* generation being collected, which can be recognized * generation being collected, which can be recognized
* because only they have positive gc_refs. * because only they have positive gc_refs.
*/ */
@ -164,7 +164,7 @@ index 0c6f444..87edd5a 100644
if (_PyGCHead_REFS(gc) > 0) if (_PyGCHead_REFS(gc) > 0)
_PyGCHead_DECREF(gc); _PyGCHead_DECREF(gc);
} }
@@ -436,9 +440,10 @@ visit_reachable(PyObject *op, PyGC_Head *reachable) @@ -333,9 +337,10 @@ visit_reachable(PyObject *op, PyGC_Head *reachable)
* If gc_refs == GC_UNTRACKED, it must be ignored. * If gc_refs == GC_UNTRACKED, it must be ignored.
*/ */
else { else {
@ -178,7 +178,7 @@ index 0c6f444..87edd5a 100644
} }
} }
return 0; return 0;
@@ -480,7 +485,7 @@ move_unreachable(PyGC_Head *young, PyGC_Head *unreachable) @@ -377,7 +382,7 @@ move_unreachable(PyGC_Head *young, PyGC_Head *unreachable)
*/ */
PyObject *op = FROM_GC(gc); PyObject *op = FROM_GC(gc);
traverseproc traverse = Py_TYPE(op)->tp_traverse; traverseproc traverse = Py_TYPE(op)->tp_traverse;
@ -187,7 +187,7 @@ index 0c6f444..87edd5a 100644
_PyGCHead_SET_REFS(gc, GC_REACHABLE); _PyGCHead_SET_REFS(gc, GC_REACHABLE);
(void) traverse(op, (void) traverse(op,
(visitproc)visit_reachable, (visitproc)visit_reachable,
@@ -543,7 +548,7 @@ move_legacy_finalizers(PyGC_Head *unreachable, PyGC_Head *finalizers) @@ -440,7 +445,7 @@ move_legacy_finalizers(PyGC_Head *unreachable, PyGC_Head *finalizers)
for (gc = unreachable->gc.gc_next; gc != unreachable; gc = next) { for (gc = unreachable->gc.gc_next; gc != unreachable; gc = next) {
PyObject *op = FROM_GC(gc); PyObject *op = FROM_GC(gc);
@ -196,7 +196,7 @@ index 0c6f444..87edd5a 100644
next = gc->gc.gc_next; next = gc->gc.gc_next;
if (has_legacy_finalizer(op)) { if (has_legacy_finalizer(op)) {
@@ -619,7 +624,7 @@ handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old) @@ -516,7 +521,7 @@ handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old)
PyWeakReference **wrlist; PyWeakReference **wrlist;
op = FROM_GC(gc); op = FROM_GC(gc);
@ -205,7 +205,7 @@ index 0c6f444..87edd5a 100644
next = gc->gc.gc_next; next = gc->gc.gc_next;
if (! PyType_SUPPORTS_WEAKREFS(Py_TYPE(op))) if (! PyType_SUPPORTS_WEAKREFS(Py_TYPE(op)))
@@ -640,9 +645,9 @@ handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old) @@ -537,9 +542,9 @@ handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old)
* the callback pointer intact. Obscure: it also * the callback pointer intact. Obscure: it also
* changes *wrlist. * changes *wrlist.
*/ */
@ -217,7 +217,7 @@ index 0c6f444..87edd5a 100644
if (wr->wr_callback == NULL) if (wr->wr_callback == NULL)
continue; /* no callback */ continue; /* no callback */
@@ -676,7 +681,7 @@ handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old) @@ -573,7 +578,7 @@ handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old)
*/ */
if (IS_TENTATIVELY_UNREACHABLE(wr)) if (IS_TENTATIVELY_UNREACHABLE(wr))
continue; continue;
@ -226,7 +226,7 @@ index 0c6f444..87edd5a 100644
/* Create a new reference so that wr can't go away /* Create a new reference so that wr can't go away
* before we can process it again. * before we can process it again.
@@ -685,7 +690,8 @@ handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old) @@ -582,7 +587,8 @@ handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old)
/* Move wr to wrcb_to_call, for the next pass. */ /* Move wr to wrcb_to_call, for the next pass. */
wrasgc = AS_GC(wr); wrasgc = AS_GC(wr);
@ -236,7 +236,7 @@ index 0c6f444..87edd5a 100644
next isn't, so they can't next isn't, so they can't
be the same */ be the same */
gc_list_move(wrasgc, &wrcb_to_call); gc_list_move(wrasgc, &wrcb_to_call);
@@ -701,11 +707,11 @@ handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old) @@ -598,11 +604,11 @@ handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old)
gc = wrcb_to_call.gc.gc_next; gc = wrcb_to_call.gc.gc_next;
op = FROM_GC(gc); op = FROM_GC(gc);
@ -251,7 +251,7 @@ index 0c6f444..87edd5a 100644
/* copy-paste of weakrefobject.c's handle_callback() */ /* copy-paste of weakrefobject.c's handle_callback() */
temp = PyObject_CallFunctionObjArgs(callback, wr, NULL); temp = PyObject_CallFunctionObjArgs(callback, wr, NULL);
@@ -822,12 +828,14 @@ check_garbage(PyGC_Head *collectable) @@ -719,12 +725,14 @@ check_garbage(PyGC_Head *collectable)
for (gc = collectable->gc.gc_next; gc != collectable; for (gc = collectable->gc.gc_next; gc != collectable;
gc = gc->gc.gc_next) { gc = gc->gc.gc_next) {
_PyGCHead_SET_REFS(gc, Py_REFCNT(FROM_GC(gc))); _PyGCHead_SET_REFS(gc, Py_REFCNT(FROM_GC(gc)));
@ -269,11 +269,11 @@ index 0c6f444..87edd5a 100644
return -1; return -1;
} }
diff --git a/Objects/object.c b/Objects/object.c diff --git a/Objects/object.c b/Objects/object.c
index 559794f..a47d47f 100644 index ed8a62a..5279b15 100644
--- a/Objects/object.c --- a/Objects/object.c
+++ b/Objects/object.c +++ b/Objects/object.c
@@ -2022,6 +2022,35 @@ _PyTrash_thread_destroy_chain(void) @@ -2116,6 +2116,35 @@ _PyTrash_thread_destroy_chain(void)
} --tstate->trash_delete_nesting;
} }
+PyAPI_FUNC(void) +PyAPI_FUNC(void)

View File

@ -1,6 +1,7 @@
diff -Nur Python-3.4.1/Lib/ensurepip/__init__.py Python-3.4.1-rewheel/Lib/ensurepip/__init__.py diff --git a/Lib/ensurepip/__init__.py b/Lib/ensurepip/__init__.py
--- Python-3.4.1/Lib/ensurepip/__init__.py 2014-08-21 10:49:30.792695824 +0200 index d69e09f..5cb12df 100644
+++ Python-3.4.1-rewheel/Lib/ensurepip/__init__.py 2014-08-21 10:10:41.958341726 +0200 --- a/Lib/ensurepip/__init__.py
+++ b/Lib/ensurepip/__init__.py
@@ -1,8 +1,10 @@ @@ -1,8 +1,10 @@
import os import os
import os.path import os.path
@ -12,16 +13,16 @@ diff -Nur Python-3.4.1/Lib/ensurepip/__init__.py Python-3.4.1-rewheel/Lib/ensure
__all__ = ["version", "bootstrap"] __all__ = ["version", "bootstrap"]
@@ -38,6 +40,8 @@ @@ -25,6 +27,8 @@ def _run_pip(args, additional_paths=None):
# Install the bundled software # Install the bundled software
import pip import pip
+ if args[0] in ["install", "list", "wheel"]: + if args[0] in ["install", "list", "wheel"]:
+ args.append('--pre') + args.append('--pre')
pip.main(args) return pip.main(args)
@@ -87,20 +91,39 @@ @@ -88,20 +92,39 @@ def _bootstrap(*, root=None, upgrade=False, user=False,
# omit pip and easy_install # omit pip and easy_install
os.environ["ENSUREPIP_OPTIONS"] = "install" os.environ["ENSUREPIP_OPTIONS"] = "install"
@ -71,9 +72,11 @@ diff -Nur Python-3.4.1/Lib/ensurepip/__init__.py Python-3.4.1-rewheel/Lib/ensure
# Construct the arguments to be passed to the pip command # Construct the arguments to be passed to the pip command
args = ["install", "--no-index", "--find-links", tmpdir] args = ["install", "--no-index", "--find-links", tmpdir]
diff -Nur Python-3.4.1/Lib/ensurepip/rewheel/__init__.py Python-3.4.1-rewheel/Lib/ensurepip/rewheel/__init__.py diff --git a/Lib/ensurepip/rewheel/__init__.py b/Lib/ensurepip/rewheel/__init__.py
--- Python-3.4.1/Lib/ensurepip/rewheel/__init__.py 1970-01-01 01:00:00.000000000 +0100 new file mode 100644
+++ Python-3.4.1-rewheel/Lib/ensurepip/rewheel/__init__.py 2014-08-21 10:11:22.560320121 +0200 index 0000000..753c764
--- /dev/null
+++ b/Lib/ensurepip/rewheel/__init__.py
@@ -0,0 +1,143 @@ @@ -0,0 +1,143 @@
+import argparse +import argparse
+import codecs +import codecs
@ -218,10 +221,11 @@ diff -Nur Python-3.4.1/Lib/ensurepip/rewheel/__init__.py Python-3.4.1-rewheel/Li
+ else: + else:
+ pass # bad RECORD or empty line + pass # bad RECORD or empty line
+ return to_write, to_omit + return to_write, to_omit
diff -Nur Python-3.4.1/Makefile.pre.in Python-3.4.1-rewheel/Makefile.pre.in diff --git a/Makefile.pre.in b/Makefile.pre.in
--- Python-3.4.1/Makefile.pre.in 2014-08-21 10:49:31.512695040 +0200 index 51e8132..42b3d29 100644
+++ Python-3.4.1-rewheel/Makefile.pre.in 2014-08-21 10:10:41.961341722 +0200 --- a/Makefile.pre.in
@@ -1145,7 +1145,7 @@ +++ b/Makefile.pre.in
@@ -1241,7 +1241,7 @@ LIBSUBDIRS= tkinter tkinter/test tkinter/test/test_tkinter \
test/test_asyncio \ test/test_asyncio \
collections concurrent concurrent/futures encodings \ collections concurrent concurrent/futures encodings \
email email/mime test/test_email test/test_email/data \ email email/mime test/test_email test/test_email/data \

File diff suppressed because it is too large Load Diff

View File

@ -1,43 +0,0 @@
From 54849962eacc38f4e6c6f8a72ae258b3e7c2ecd5 Mon Sep 17 00:00:00 2001
From: Victor Stinner <victor.stinner@gmail.com>
Date: Thu, 5 Oct 2017 15:05:30 +0200
Subject: [PATCH] bpo-31178: Mock os.waitpid() in test_subprocess
Fix test_exception_errpipe_bad_data() and
test_exception_errpipe_normal() of test_subprocess: mock os.waitpid()
to avoid calling the real os.waitpid(0, 0) which is an unexpected
side effect of the test.
---
Lib/test/test_subprocess.py | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
index 00dc37bc2c7..3ba5c028517 100644
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -1559,8 +1559,10 @@ def proper_error(*args):
fork_exec.side_effect = proper_error
- with self.assertRaises(IsADirectoryError):
- self.PopenNoDestructor(["non_existent_command"])
+ with mock.patch("subprocess.os.waitpid",
+ side_effect=ChildProcessError):
+ with self.assertRaises(IsADirectoryError):
+ self.PopenNoDestructor(["non_existent_command"])
@mock.patch("subprocess._posixsubprocess.fork_exec")
def test_exception_errpipe_bad_data(self, fork_exec):
@@ -1577,8 +1579,10 @@ def bad_error(*args):
fork_exec.side_effect = bad_error
- with self.assertRaises(subprocess.SubprocessError) as e:
- self.PopenNoDestructor(["non_existent_command"])
+ with mock.patch("subprocess.os.waitpid",
+ side_effect=ChildProcessError):
+ with self.assertRaises(subprocess.SubprocessError) as e:
+ self.PopenNoDestructor(["non_existent_command"])
self.assertIn(repr(error_data), str(e.exception))

View File

@ -1,13 +0,0 @@
diff --git a/Modules/getpath.c b/Modules/getpath.c
index c4055be..1258fcd 100644
--- a/Modules/getpath.c
+++ b/Modules/getpath.c
@@ -735,7 +735,7 @@ calculate_path(void)
bufsz += wcslen(zip_path) + 1;
bufsz += wcslen(exec_prefix) + 1;
- buf = PyMem_New(wchar_t, bufsz);
+ buf = PyMem_RawMalloc(bufsz * sizeof(wchar_t));
if (buf == NULL) {
Py_FatalError(
"Not enough memory for dynamic PYTHONPATH");

View File

@ -6,15 +6,18 @@ Name: python3
Summary: Interpreter of the Python programming language Summary: Interpreter of the Python programming language
URL: https://www.python.org/ URL: https://www.python.org/
%global pybasever 3.6 %global pybasever 3.7
# pybasever without the dot: # pybasever without the dot:
%global pyshortver 36 %global pyshortver 37
# Second alpha
%global prerel a2
# WARNING When rebasing to a new Python version, # WARNING When rebasing to a new Python version,
# remember to update the python3-docs package as well # remember to update the python3-docs package as well
Version: %{pybasever}.3 Version: %{pybasever}.0
Release: 4%{?dist} Release: 0.1.%{?prerel}%{?dist}
License: Python License: Python
@ -183,6 +186,7 @@ BuildRequires: gmp-devel
BuildRequires: libappstream-glib BuildRequires: libappstream-glib
BuildRequires: libffi-devel BuildRequires: libffi-devel
BuildRequires: libGL-devel BuildRequires: libGL-devel
BuildRequires: libuuid-devel
BuildRequires: libX11-devel BuildRequires: libX11-devel
BuildRequires: ncurses-devel BuildRequires: ncurses-devel
@ -225,7 +229,7 @@ BuildRequires: python3-pip
# Source code and patches # Source code and patches
# ======================= # =======================
Source: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz Source: https://www.python.org/ftp/python/%{version}/Python-%{version}%{prerel}.tar.xz
# Supply an RPM macro "py_byte_compile" for the python3-devel subpackage # Supply an RPM macro "py_byte_compile" for the python3-devel subpackage
# to enable specfiles to selectively byte-compile individual files and paths # to enable specfiles to selectively byte-compile individual files and paths
@ -354,13 +358,6 @@ Patch205: 00205-make-libpl-respect-lib64.patch
# Fedora Change: https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe # Fedora Change: https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe
Patch251: 00251-change-user-install-location.patch Patch251: 00251-change-user-install-location.patch
# 00262 #
# Backport of PEP 538: Coercing the legacy C locale to a UTF-8 based locale
# https://www.python.org/dev/peps/pep-0538/
# Fedora Change: https://fedoraproject.org/wiki/Changes/python3_c.utf-8_locale
# Original proposal: https://bugzilla.redhat.com/show_bug.cgi?id=1404918
Patch262: 00262-pep538_coerce_legacy_c_locale.patch
# 00264 # # 00264 #
# test_pass_by_value was added in Python 3.6.1 and on aarch64 # test_pass_by_value was added in Python 3.6.1 and on aarch64
# it is catching an error that was there, but wasn't tested before. # it is catching an error that was there, but wasn't tested before.
@ -377,18 +374,6 @@ Patch273: 00273-skip-float-test.patch
# Upstream uses Debian-style architecture naming. Change to match Fedora. # Upstream uses Debian-style architecture naming. Change to match Fedora.
Patch274: 00274-fix-arch-names.patch Patch274: 00274-fix-arch-names.patch
# 00277 #
# Fix test_exception_errpipe_bad_data() and
# test_exception_errpipe_normal() of test_subprocess: mock os.waitpid()
# to avoid calling the real os.waitpid(0, 0) which is an unexpected
# side effect of the test, which makes the koji builds hang.
# Fixed upstream: https://github.com/python/cpython/commit/11045c9d8a21dd9bd182a3939189db02815f9783
Patch277: 00277-fix-test-subprocess-hanging-tests.patch
# 00279 #
# Fix memory corruption due to allocator mix
# Fixed upstream: https://bugs.python.org/issue31532
Patch279: 00279-fix-memory-corruption-due-to-allocator-mix.patch
# (New patches go here ^^^) # (New patches go here ^^^)
# #
@ -619,7 +604,6 @@ cp -a %{SOURCE7} .
# Remove bundled libraries to ensure that we're using the system copy. # Remove bundled libraries to ensure that we're using the system copy.
rm -r Modules/expat rm -r Modules/expat
rm -r Modules/zlib
%if %{with rewheel} %if %{with rewheel}
%global pip_version 9.0.1 %global pip_version 9.0.1
@ -652,7 +636,6 @@ sed -r -i s/'_PIP_VERSION = "[0-9.]+"'/'_PIP_VERSION = "%{pip_version}"'/ Lib/en
%patch205 -p1 %patch205 -p1
%patch251 -p1 %patch251 -p1
%patch262 -p1
%ifarch aarch64 %ifarch aarch64
%patch264 -p1 %patch264 -p1
@ -660,8 +643,6 @@ sed -r -i s/'_PIP_VERSION = "[0-9.]+"'/'_PIP_VERSION = "%{pip_version}"'/ Lib/en
%patch273 -p1 %patch273 -p1
%patch274 -p1 %patch274 -p1
%patch277 -p1
%patch279 -p1
# Remove files that should be generated by the build # Remove files that should be generated by the build
@ -1266,6 +1247,7 @@ fi
#%{dynload_dir}/time.%{SOABI_optimized}.so #%{dynload_dir}/time.%{SOABI_optimized}.so
%{dynload_dir}/_testmultiphase.%{SOABI_optimized}.so %{dynload_dir}/_testmultiphase.%{SOABI_optimized}.so
%{dynload_dir}/unicodedata.%{SOABI_optimized}.so %{dynload_dir}/unicodedata.%{SOABI_optimized}.so
%{dynload_dir}/_uuid.%{SOABI_optimized}.so
%{dynload_dir}/xxlimited.%{SOABI_optimized}.so %{dynload_dir}/xxlimited.%{SOABI_optimized}.so
%{dynload_dir}/zlib.%{SOABI_optimized}.so %{dynload_dir}/zlib.%{SOABI_optimized}.so
@ -1416,6 +1398,7 @@ fi
%{dynload_dir}/_testbuffer.%{SOABI_optimized}.so %{dynload_dir}/_testbuffer.%{SOABI_optimized}.so
%{dynload_dir}/_testcapi.%{SOABI_optimized}.so %{dynload_dir}/_testcapi.%{SOABI_optimized}.so
%{dynload_dir}/_testimportmultiple.%{SOABI_optimized}.so %{dynload_dir}/_testimportmultiple.%{SOABI_optimized}.so
%{dynload_dir}/_xxtestfuzz.%{SOABI_optimized}.so
%{pylibdir}/lib2to3/tests %{pylibdir}/lib2to3/tests
%{pylibdir}/tkinter/test %{pylibdir}/tkinter/test
%{pylibdir}/unittest/test %{pylibdir}/unittest/test
@ -1502,6 +1485,8 @@ fi
#%{dynload_dir}/time.%{SOABI_debug}.so #%{dynload_dir}/time.%{SOABI_debug}.so
%{dynload_dir}/_testmultiphase.%{SOABI_debug}.so %{dynload_dir}/_testmultiphase.%{SOABI_debug}.so
%{dynload_dir}/unicodedata.%{SOABI_debug}.so %{dynload_dir}/unicodedata.%{SOABI_debug}.so
%{dynload_dir}/_uuid.%{SOABI_debug}.so
%{dynload_dir}/_xxtestfuzz.%{SOABI_debug}.so
%{dynload_dir}/zlib.%{SOABI_debug}.so %{dynload_dir}/zlib.%{SOABI_debug}.so
# No need to split things out the "Makefile" and the config-32/64.h file as we # No need to split things out the "Makefile" and the config-32/64.h file as we
@ -1560,6 +1545,10 @@ fi
# ====================================================== # ======================================================
%changelog %changelog
* Tue Nov 28 2017 Miro Hrončok <mhroncok@redhat.com> - 3.7.0-0.1.a2
- Update to 3.7.0 alpha 2
- Removed merged patches 262, 277, 279
* Tue Nov 21 2017 Miro Hrončok <mhroncok@redhat.com> - 3.6.3-4 * Tue Nov 21 2017 Miro Hrončok <mhroncok@redhat.com> - 3.6.3-4
- Raise the release of platform-python obsoletes for better maintainability - Raise the release of platform-python obsoletes for better maintainability