dtcooper / python-fitparse

Python library to parse ANT/Garmin .FIT files
http://pythonhosted.org/fitparse/
MIT License
738 stars 184 forks source link

Adds pathlib support to fileish_open #101

Closed AartGoossens closed 3 years ago

pR0Ps commented 4 years ago

Currently this project still supports Python 2.7 and 3.0. The pathlib was added in Python 3.4. Would you be able to rework this patch to not require pathlib be available?

Something like:

try:
    from pathlib import PurePath
except ImportError:
    PurePath = None

# ...

if PurePath and isinstance(fileish, PurePath):
    # do thing
pR0Ps commented 3 years ago

Merged as 52a6f01