-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Implement --upload-before #12717
base: main
Are you sure you want to change the base?
Implement --upload-before #12717
Conversation
Better named |
Should probably be |
Hang on, does this only look at files uploaded before or after the provided date? My understanding of #6257 was that if you provided 1st January as the date, pip would ignore any files uploaded after that date. So I'd write that as Having said that, I agree it's still not completely obvious what's going on (that could be read as "install the latest version of foo that was uploaded before 1st Jan" and not constrain the dependencies...). UI is hard 🙁 |
Any reason to not use |
Beyond "we didn't think of it"? Probably not... Ah, it's what |
I do kind of dislike that name though, it sounds too much like a boolean flag. |
I think the question of whether we should try to maintain option equivalence with Thinking about |
upload_before = datetime.datetime.fromisoformat(value) | ||
# Assume local timezone if no offset is given in the ISO string. | ||
if upload_before.tzinfo is None: | ||
upload_before = upload_before.astimezone() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use the utc
timezone here, unconditionally. That's what we'll be comparing against coming out of PyPI's responses AFAICT.
Nice to see this happening! My preference for the name would depend on its anticipated use. Say someone notes the date of successful environment creation or is using VCS metadata and wants to copy/paste. Would they be more or less likely to desire packages that were uploaded on that day? My instinct would tell me that the inclusion of that date would be more desirable in which case I would prefer The former seems more intuitive but I just wanted to write down my thoughts 😄 |
Close #6257. Still missing tests and docs, submitted for responses.