Skip to content

Commit 4e6c6ef

Browse files
authored
newer pypy (#928)
* newer pypy * missed one * we don't support ancient cffi any more
1 parent beaf9f5 commit 4e6c6ef

File tree

2 files changed

+7
-18
lines changed

2 files changed

+7
-18
lines changed

.travis.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ jobs:
2626
env: TOXENV=py37
2727
- python: "3.8"
2828
env: TOXENV=py38
29-
- python: "pypy2.7-5.10.0"
29+
- python: "pypy2.7-7.3.1"
3030
env: TOXENV=pypy
31-
- python: "pypy3.5-5.10.1"
31+
- python: "pypy3.6-7.3.1"
3232
env: TOXENV=pypy3
3333

3434
# Also run the tests against cryptography master.
@@ -42,9 +42,9 @@ jobs:
4242
env: TOXENV=py37-cryptographyMaster
4343
- python: "3.8"
4444
env: TOXENV=py38-cryptographyMaster
45-
- python: "pypy2.7-5.10.0"
45+
- python: "pypy2.7-7.3.1"
4646
env: TOXENV=pypy-cryptographyMaster
47-
- python: "pypy3.5-5.10.1"
47+
- python: "pypy3.6-7.3.1"
4848
env: TOXENV=pypy3-cryptographyMaster
4949

5050
# And current minimum cryptography version.
@@ -58,9 +58,9 @@ jobs:
5858
env: TOXENV=py37-cryptographyMinimum
5959
- python: "3.8"
6060
env: TOXENV=py38-cryptographyMinimum
61-
- python: "pypy2.7-5.10.0"
61+
- python: "pypy2.7-7.3.1"
6262
env: TOXENV=pypy-cryptographyMinimum
63-
- python: "pypy3.5-5.10.1"
63+
- python: "pypy3.6-7.3.1"
6464
env: TOXENV=pypy3-cryptographyMinimum
6565

6666
# Run tests in random order

src/OpenSSL/_util.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -155,15 +155,4 @@ def text_to_bytes_and_warn(label, obj):
155155
return obj
156156

157157

158-
try:
159-
# newer versions of cffi free the buffer deterministically
160-
with ffi.from_buffer(b""):
161-
pass
162-
from_buffer = ffi.from_buffer
163-
except AttributeError:
164-
# cffi < 0.12 frees the buffer with refcounting gc
165-
from contextlib import contextmanager
166-
167-
@contextmanager
168-
def from_buffer(*args):
169-
yield ffi.from_buffer(*args)
158+
from_buffer = ffi.from_buffer

0 commit comments

Comments
 (0)