Update to Python 3.4.1

This commit is contained in:
Matej Stuchlik 2014-05-26 00:20:13 +02:00
parent da5702456f
commit e602f7a288
5 changed files with 14 additions and 95 deletions

View File

@ -1,21 +0,0 @@
# HG changeset patch
# User Benjamin Peterson <benjamin@python.org>
# Date 1394679139 18000
# Node ID 4d626a9df062104b61c44c8a5be8b0fd52fae953
# Parent 6f93ab911d5dafcde364013e21723259fe2c85a8# Parent dbc9e3ed5e9f1bd11240eaa971f6c75d6a7013b5
merge 3.3 (#20901)
diff --git a/Lib/sqlite3/test/hooks.py b/Lib/sqlite3/test/hooks.py
--- a/Lib/sqlite3/test/hooks.py
+++ b/Lib/sqlite3/test/hooks.py
@@ -162,7 +162,7 @@ class ProgressTests(unittest.TestCase):
create table bar (a, b)
""")
second_count = len(progress_calls)
- self.assertGreater(first_count, second_count)
+ self.assertGreaterEqual(first_count, second_count)
def CheckCancelOperation(self):
"""

View File

@ -1,65 +0,0 @@
# HG changeset patch
# User Brett Cannon <brett@python.org>
# Date 1393602285 18000
# Node ID 432cb56db05d73f55d211501bf0dfc767768923b
# Parent ade5e4922a54cb84c99ec924ab7c700a014893da
Issue #20778: Fix modulefinder to work with bytecode-only modules.
Bug filed and initial attempt at a patch by Bohuslav Kabrda.
diff --git a/Lib/modulefinder.py b/Lib/modulefinder.py
--- a/Lib/modulefinder.py
+++ b/Lib/modulefinder.py
@@ -290,7 +290,7 @@ class ModuleFinder:
if fp.read(4) != imp.get_magic():
self.msgout(2, "raise ImportError: Bad magic number", pathname)
raise ImportError("Bad magic number in %s" % pathname)
- fp.read(4)
+ fp.read(8) # Skip mtime and size.
co = marshal.load(fp)
else:
co = None
diff --git a/Lib/test/test_modulefinder.py b/Lib/test/test_modulefinder.py
--- a/Lib/test/test_modulefinder.py
+++ b/Lib/test/test_modulefinder.py
@@ -1,5 +1,7 @@
import os
import errno
+import importlib.machinery
+import py_compile
import shutil
import unittest
import tempfile
@@ -208,6 +210,14 @@ a/module.py
from . import *
"""]
+bytecode_test = [
+ "a",
+ ["a"],
+ [],
+ [],
+ ""
+]
+
def open_file(path):
dirname = os.path.dirname(path)
@@ -288,6 +298,16 @@ class ModuleFinderTest(unittest.TestCase
def test_relative_imports_4(self):
self._do_test(relative_import_test_4)
+ def test_bytecode(self):
+ base_path = os.path.join(TEST_DIR, 'a')
+ source_path = base_path + importlib.machinery.SOURCE_SUFFIXES[0]
+ bytecode_path = base_path + importlib.machinery.BYTECODE_SUFFIXES[0]
+ with open_file(source_path) as file:
+ file.write('testing_modulefinder = True\n')
+ py_compile.compile(source_path, cfile=bytecode_path)
+ os.remove(source_path)
+ self._do_test(bytecode_test)
+
def test_main():
support.run_unittest(ModuleFinderTest)

View File

@ -127,8 +127,8 @@
# ==================
Summary: Version 3 of the Python programming language aka Python 3000
Name: python3
Version: %{pybasever}.0
Release: 8%{?dist}
Version: %{pybasever}.1
Release: 1%{?dist}
License: Python
Group: Development/Languages
@ -650,14 +650,16 @@ Patch189: 00189-add-rewheel-module.patch
# Fix tests with SQLite >= 3.8.4
# http://bugs.python.org/issue20901
# http://hg.python.org/cpython/rev/4d626a9df062
Patch190: 00190-fix-tests-with-sqlite-3.8.4.patch
# FIXED UPSTREAM
# Patch190: 00190-fix-tests-with-sqlite-3.8.4.patch
# 00193
#
# Skip correct number of *.pyc file bytes in ModuleFinder.load_module
# rhbz#1060338
# http://bugs.python.org/issue20778
Patch193: 00193-skip-correct-num-of-pycfile-bytes-in-modulefinder.patch
# FIXED UPSTREAM
# Patch193: 00193-skip-correct-num-of-pycfile-bytes-in-modulefinder.patch
# Tests requiring SIGHUP to work don't work in Koji
# see rhbz#1088233
@ -946,8 +948,8 @@ done
%patch189 -p1
%endif
%patch190 -p1
%patch193 -p1
# 00190: upstream as of Python 3.4.1
# 00193: upstream as of Python 3.4.1
%patch194 -p1
%patch195 -p1
%patch196 -p1
@ -1826,6 +1828,9 @@ rm -fr %{buildroot}
# ======================================================
%changelog
* Sun May 25 2014 Matej Stuchlik <mstuchli@redhat.com> - 3.4.1-1
- Update to Python 3.4.1
* Sun May 25 2014 Matej Stuchlik <mstuchli@redhat.com> - 3.4.0-8
- Fix test_gdb failure on ppc64le
Resolves: rhbz#1095355

View File

@ -1 +1 @@
77c22725e14af3d71022cbfdebff4903 Python-3.4.0.tar.xz
6cafc183b4106476dd73d5738d7f616a Python-3.4.1.tar.xz

View File

@ -8,8 +8,8 @@ diff -up Python-3.4.0/Lib/test/test_asyncio/test_events.py.orig Python-3.4.0/Lib
- @unittest.skipIf(sys.platform == 'win32', "Don't have SIGHUP")
+ @unittest.skipIf(True, "Temporarily skipped (rhbz#1088233)")
def test_subprocess_send_signal(self):
proto = None
transp = None
prog = os.path.join(os.path.dirname(__file__), 'echo.py')
diff -up Python-3.4.0/Lib/test/test_asyncio/test_subprocess.py.orig Python-3.4.0/Lib/test/test_asyncio/test_subprocess.py
--- Python-3.4.0/Lib/test/test_asyncio/test_subprocess.py.orig 2014-04-17 12:03:32.777827520 +0200