mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-03 21:24:31 +03:00
Drop support for EOL Python 3.5
This commit is contained in:
parent
10615a7da7
commit
1fe4070af6
|
@ -13,7 +13,6 @@ def test_is_path():
|
||||||
assert it_is
|
assert it_is
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.skipif(not _util.py36, reason="os.path support for Paths added in 3.6")
|
|
||||||
def test_path_obj_is_path():
|
def test_path_obj_is_path():
|
||||||
# Arrange
|
# Arrange
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
|
@ -1,20 +1,9 @@
|
||||||
import os
|
import os
|
||||||
import sys
|
from pathlib import Path
|
||||||
|
|
||||||
py36 = sys.version_info[0:2] >= (3, 6)
|
|
||||||
|
|
||||||
|
|
||||||
if py36:
|
def isPath(f):
|
||||||
from pathlib import Path
|
return isinstance(f, (bytes, str, Path))
|
||||||
|
|
||||||
def isPath(f):
|
|
||||||
return isinstance(f, (bytes, str, Path))
|
|
||||||
|
|
||||||
|
|
||||||
else:
|
|
||||||
|
|
||||||
def isPath(f):
|
|
||||||
return isinstance(f, (bytes, str))
|
|
||||||
|
|
||||||
|
|
||||||
# Checks if an object is a string, and that it points to a directory.
|
# Checks if an object is a string, and that it points to a directory.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user