mirror of https://github.com/pypa/pip
Don't print that form link after the end of month.
This commit is contained in:
parent
4e4951066d
commit
1b2ae22e7b
|
@ -21,6 +21,7 @@ from pip._internal.locations import distutils_scheme
|
|||
from pip._internal.operations.check import check_install_conflicts
|
||||
from pip._internal.req import install_given_reqs
|
||||
from pip._internal.req.req_tracker import get_requirement_tracker
|
||||
from pip._internal.utils.datetime import today_is_later_than
|
||||
from pip._internal.utils.deprecation import deprecated
|
||||
from pip._internal.utils.distutils_args import parse_distutils_args
|
||||
from pip._internal.utils.filesystem import test_writable_dir
|
||||
|
@ -557,7 +558,7 @@ class InstallCommand(RequirementCommand):
|
|||
"your packages with the new resolver before it becomes the "
|
||||
"default.\n"
|
||||
)
|
||||
else:
|
||||
elif not today_is_later_than(year=2020, month=7, day=31):
|
||||
# NOTE: trailing newlines here are intentional
|
||||
parts.append(
|
||||
"Pip will install or upgrade your package(s) and its "
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
"""For when pip wants to check the date or time.
|
||||
"""
|
||||
|
||||
import datetime
|
||||
|
||||
|
||||
def today_is_later_than(year, month, day):
|
||||
# type: (int, int, int) -> bool
|
||||
today = datetime.date.today()
|
||||
given = datetime.date(year, month, day)
|
||||
|
||||
return today > given
|
Loading…
Reference in New Issue