Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dateutil as dependency #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
6 changes: 3 additions & 3 deletions libyear/pypi.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from distutils.version import LooseVersion

import dateutil.parser
from datetime import datetime
import requests


Expand Down Expand Up @@ -73,7 +73,7 @@ def get_version_release_dates(name, version, version_lt):
print(f'Latest version of {name!r} has no upload time.')
return None, None, None, None

latest_version_date = dateutil.parser.parse(latest_version_date)
latest_version_date = datetime.strptime(latest_version_date, "%Y-%m-%dT%H:%M:%S.%fZ")
if version not in releases:
return None, latest_version_date, latest_version, latest_version_date

Expand All @@ -83,7 +83,7 @@ def get_version_release_dates(name, version, version_lt):
print(f'Used release of {name}=={version} has no upload time.')
return None, None, None, None

version_date = dateutil.parser.parse(version_date)
version_date = datetime.strptime(version_date, "%Y-%m-%dT%H:%M:%S.%fZ")
return version, version_date, latest_version, latest_version_date


Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
install_requires=[
"requests>=2.0.0",
"prettytable>=0.7.2",
"python-dateutil>=2.7.0",
],
setup_requires=["pytest-runner"],
)