File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ BUILDDIR = build
4242help :
4343 @$(SPHINXBUILD ) -M help " $( SOURCEDIR) " " $( BUILDDIR) " $(SPHINXOPTS ) $(O )
4444
45- .PHONY : help Makefile
45+ .PHONY : help build Makefile
4646
4747# Catch-all target: route all unknown targets to Sphinx using the new
4848# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ name = "pypi"
44verify_ssl = true
55
66[packages ]
7- e1839a8 = {path = " ." ,editable = true }
87requests = {extras = [" security" ]}
98requests-toolbelt = " *"
109progressbar2 = " *"
@@ -22,6 +21,7 @@ pyyaml = "*"
2221python-dateutil = " >=2.0,<3.0"
2322websocket-client = " *"
2423gradient-utils = " >=0.5.0"
24+ packaging = " *"
2525sphinx = " *"
2626recommonmark = " *"
2727sphinx-click = " *"
Original file line number Diff line number Diff line change 1- version = "0.0 .0"
1+ version = "2.99 .0"
Original file line number Diff line number Diff line change 33from platform import system
44import json
55
6+ import six
67import requests
7- from distutils .version import StrictVersion
8+ from packaging .version import Version
89
910from gradient .clilogger import CliLogger
1011from gradient .version import version
@@ -20,9 +21,7 @@ class VersionChecker(object):
2021 def is_up_to_date (self , module_name , current_version ):
2122 version_in_repository = self .get_version_from_repository (module_name )
2223
23- up_to_date = StrictVersion (current_version ) >= StrictVersion (
24- version_in_repository
25- )
24+ up_to_date = Version (current_version ) >= Version (version_in_repository )
2625 return up_to_date , version_in_repository
2726
2827 def get_version_from_repository (
@@ -58,9 +57,9 @@ def get_version_from_repository(
5857 v2_versions = []
5958 for v in versions :
6059 try :
61- if StrictVersion (v ) < StrictVersion ("3.0.0" ):
60+ if Version (v ) < Version ("3.0.0" ):
6261 v2_versions .append (v )
63- except ValueError :
62+ except Exception :
6463 # Skip invalid version strings
6564 continue
6665
@@ -71,7 +70,7 @@ def get_version_from_repository(
7170 )
7271
7372 # Sort v2_versions to get the latest one (highest version number)
74- v2_versions .sort (key = lambda x : StrictVersion (x ), reverse = True )
73+ v2_versions .sort (key = lambda x : Version (x ), reverse = True )
7574 return v2_versions [0 ]
7675
7776
Original file line number Diff line number Diff line change @@ -66,13 +66,14 @@ def run(self):
6666 "requests-toolbelt" ,
6767 "progressbar2" ,
6868 "halo" ,
69- "marshmallow<3 .0" ,
69+ "marshmallow~=4 .0" ,
7070 "attrs<=19" ,
7171 "PyYAML==5.3.1" ,
7272 "python-dateutil==2.*" ,
7373 "websocket-client==0.57.*" ,
7474 "gradient-utils>=0.1.2" ,
7575 "gql[requests]==3.0.0a6" ,
76+ "packaging" ,
7677 'windows-curses>=2.3.0 ; platform_system=="Windows"' ,
7778 ],
7879 entry_points = {
You can’t perform that action at this time.
0 commit comments