Update to 5.10.1 (#1533689)

This commit is contained in:
Miro Hrončok 2018-01-12 10:01:38 +01:00
parent 82dcbae232
commit 93cd7d04cc
5 changed files with 8 additions and 86 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@
/pypy3-v5.7.0-src.tar.bz2
/pypy3-v5.9.0-src.tar.bz2
/pypy3-v5.10.0-src.tar.bz2
/pypy3-v5.10.1-src.tar.bz2

View File

@ -1,55 +0,0 @@
# HG changeset patch
# User Ronan Lamy <ronan.lamy@gmail.com>
# Date 1514473067 -3600
# Branch py3.5
# Node ID f145d85043878194d7eee33b2049063843e032d8
# Parent d7d2710e65359e1e8d69e82612cb96f2f3921de7
Fix issue #2717
diff --git a/pypy/interpreter/test/test_timeutils.py b/pypy/interpreter/test/test_timeutils.py
new file mode 100644
index 0000000..873b2b4
--- /dev/null
+++ b/pypy/interpreter/test/test_timeutils.py
@@ -0,0 +1,13 @@
+import pytest
+from rpython.rlib.rarithmetic import r_longlong
+from pypy.interpreter.error import OperationError
+from pypy.interpreter.timeutils import timestamp_w
+
+def test_timestamp_w(space):
+ w_1_year = space.newint(365 * 24 * 3600)
+ result = timestamp_w(space, w_1_year)
+ assert isinstance(result, r_longlong)
+ assert result // 10 ** 9 == space.int_w(w_1_year)
+ w_millenium = space.mul(w_1_year, space.newint(1000))
+ with pytest.raises(OperationError): # timestamps overflow after ~300 years
+ timestamp_w(space, w_millenium)
diff --git a/pypy/interpreter/timeutils.py b/pypy/interpreter/timeutils.py
index 336426b..7918dc8 100644
--- a/pypy/interpreter/timeutils.py
+++ b/pypy/interpreter/timeutils.py
@@ -3,7 +3,7 @@ Access to the time module's high-resolution monotonic clock
"""
import math
from rpython.rlib.rarithmetic import (
- r_longlong, ovfcheck, ovfcheck_float_to_longlong)
+ r_longlong, ovfcheck_float_to_longlong)
from pypy.interpreter.error import oefmt
SECS_TO_NS = 10 ** 9
@@ -28,10 +28,10 @@ def timestamp_w(space, w_secs):
raise oefmt(space.w_OverflowError,
"timestamp %R too large to convert to C _PyTime_t", w_secs)
else:
- sec = space.int_w(w_secs)
try:
- result = ovfcheck(sec * SECS_TO_NS)
+ sec = space.bigint_w(w_secs).tolonglong()
+ result = sec * r_longlong(SECS_TO_NS)
except OverflowError:
raise oefmt(space.w_OverflowError,
- "timestamp too large to convert to C _PyTime_t")
- return r_longlong(result)
+ "timestamp %R too large to convert to C _PyTime_t", w_secs)
+ return result

View File

@ -1,22 +0,0 @@
# HG changeset patch
# User Miro Hrončok <miro@hroncok.cz>
# Date 1514415016 0
# Branch hroncok/fix-typeerror-str-does-not-support-the-b-1514414905375
# Node ID 0551d04959425ea4a8ff7e87a5d357d03936cde0
# Parent a4194a67868fa916074416e96456d07d52b1a1a1
Fix: TypeError: 'str' does not support the buffer interface
Fixes https://bitbucket.org/pypy/pypy/issues/2718
diff --git a/lib_pypy/pyrepl/unix_console.py b/lib_pypy/pyrepl/unix_console.py
--- a/lib_pypy/pyrepl/unix_console.py
+++ b/lib_pypy/pyrepl/unix_console.py
@@ -500,7 +500,7 @@
os.write(self.output_fd, fmt[:x])
fmt = fmt[y:]
delay = int(m.group(1))
- if '*' in m.group(2):
+ if b'*' in m.group(2):
delay *= self.height
if self._pad:
nchars = (bps*delay)/1000

View File

@ -1,7 +1,7 @@
Name: pypy3
Version: 5.10.0
Version: 5.10.1
%global pyversion 3.5
Release: 3%{?dist}
Release: 1%{?dist}
Summary: Python 3 implementation with a Just-In-Time compiler
# LGPL and another free license we'd need to ask spot about are present in some
@ -158,12 +158,6 @@ Patch7: 007-remove-startup-message.patch
# It seems ppc64 has no faulthandler
Patch11: 011-no-faulthandler.patch
# https://bitbucket.org/pypy/pypy/issues/2717
Patch12: 012-time-sleep-i686-overflow.patch
# https://bitbucket.org/pypy/pypy/issues/2718
Patch13: 013-fix-typeerror.patch
# Build-time requirements:
# pypy's can be rebuilt using itself, rather than with CPython; doing so
@ -822,6 +816,10 @@ CheckPyPy %{name}-stackless
%changelog
* Fri Jan 12 2018 Miro Hrončok <mhroncok@redhat.com> - 5.10.1-1
- Update to 5.10.1 (#1533689)
- Removed two upstreamed patches
* Fri Dec 29 2017 Miro Hrončok <mhroncok@redhat.com> - 5.10.0-3
- Remove never used InstallPyPy function
- Actually call execstack as originally intended

View File

@ -1 +1 @@
SHA512 (pypy3-v5.10.0-src.tar.bz2) = 69a373c18dbad9dd617f994ad885c8d8975f0c484ba9dd547e6e892c9a3030a43e9e3ee668aee5f4969403883de1311cef97a0a5e5701921172ee6c2119b771b
SHA512 (pypy3-v5.10.1-src.tar.bz2) = 91b0ed25130bdbb46d5e577136b5fe63d5162917dcc2d0b69f5cac2a283ece9d0bfd3c7c8dc61ff391e0550fa1603326f6edeb2df3159d71617fefe6c07439f5