Skip to content

Commit

Permalink
cache: remove PY2 import from pytest internals (#309)
Browse files Browse the repository at this point in the history
fails with ImportError and we don't support Python 2
  • Loading branch information
g-k authored Jul 30, 2020
1 parent 4240b16 commit fa8a1ce
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import json

import py
from _pytest.compat import _PY2 as PY2
from dateutil.parser import parse


Expand Down Expand Up @@ -52,7 +51,7 @@ def datetime_encode_set(self, key, value):
self.warn("could not create cache path {path}", path=path)
return
try:
f = path.open("wb" if PY2 else "w")
f = path.open("w")
except (IOError, OSError):
self.warn("cache could not write path {path}", path=path)
else:
Expand Down

0 comments on commit fa8a1ce

Please sign in to comment.