Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ jobs:
env: TOXENV=py37
- python: "3.8"
env: TOXENV=py38
- python: "pypy2.7-5.10.0"
- python: "pypy2.7-7.3.1"
env: TOXENV=pypy
- python: "pypy3.5-5.10.1"
- python: "pypy3.6-7.3.1"
env: TOXENV=pypy3

# Also run the tests against cryptography master.
Expand All @@ -42,9 +42,9 @@ jobs:
env: TOXENV=py37-cryptographyMaster
- python: "3.8"
env: TOXENV=py38-cryptographyMaster
- python: "pypy2.7-5.10.0"
- python: "pypy2.7-7.3.1"
env: TOXENV=pypy-cryptographyMaster
- python: "pypy3.5-5.10.1"
- python: "pypy3.6-7.3.1"
env: TOXENV=pypy3-cryptographyMaster

# And current minimum cryptography version.
Expand All @@ -58,9 +58,9 @@ jobs:
env: TOXENV=py37-cryptographyMinimum
- python: "3.8"
env: TOXENV=py38-cryptographyMinimum
- python: "pypy2.7-5.10.0"
- python: "pypy2.7-7.3.1"
env: TOXENV=pypy-cryptographyMinimum
- python: "pypy3.5-5.10.1"
- python: "pypy3.6-7.3.1"
env: TOXENV=pypy3-cryptographyMinimum

# Run tests in random order
Expand Down
13 changes: 1 addition & 12 deletions src/OpenSSL/_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,15 +155,4 @@ def text_to_bytes_and_warn(label, obj):
return obj


try:
# newer versions of cffi free the buffer deterministically
with ffi.from_buffer(b""):
pass
from_buffer = ffi.from_buffer
except AttributeError:
# cffi < 0.12 frees the buffer with refcounting gc
from contextlib import contextmanager

@contextmanager
def from_buffer(*args):
yield ffi.from_buffer(*args)
from_buffer = ffi.from_buffer