-
-
Notifications
You must be signed in to change notification settings - Fork 318
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
Reading credentials from .pypirc #789
Conversation
Any desire to rebase and pick this back up? |
yes, likely within some weeks. looking at the proposal again, personally i'd really prefer a complete |
57ebbed
to
bace85f
Compare
okay, i rebased and completed the feature. |
@ofek i don't know the interfaces here good enough, excuse me if this is redundant: i amended changes and the CI needs to be kicked off again. |
a7fbb52
to
be079d1
Compare
@ofek i rebased again. can you kick off the checks again? force-pushing seems to not play along well in the system. |
happy new year @ofek, i'd appreciate a feedback here. |
Happy new year to you as well! I plan to include this in the next minor release it's just that there are a lot of changes here so it takes up a lot more time to review. Would you be willing to refactor a bit less so I can review this faster? If not it's okay and I just have to schedule extra free time |
not really without specific suggestions. and i also think that the refactoring is worth it as it consolidates how the different credentials sources are considered (i could argue that this is overdue and thus should be prioritized over new features) and thus should allow easier extensions in the future. |
thanks for the valuable feedback. |
Note this resolves #1191 |
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.
Almost done, thanks!
Co-authored-by: Ofek Lev <[email protected]>
a'ight then. |
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.
Thank you very much for your efforts and your patience!
* publish: Moves credential obtaining to a utils module * publish: Implements credentials retrieval from .pypirc * publish: Moves PyPI credential handling to one class * cli/…/test_publish: Reformats with rush * publish: Adds test for .pypirc retrieval * publish: Use __token__ as username fallback on empty user input * publish: Updates docs * Deals with ruff's suggestions * Explicit code formatting with ruff * Moves the auth module into the publish package * Undoes style changes in a test module * Re-arranges docs about publishing * index-publisher: Lazily imports AuthenticationCredentials * publish docs: Various minor improvements & changes Co-authored-by: Ofek Lev <[email protected]> * Renames publishing related How-To docs --------- Co-authored-by: Ofek Lev <[email protected]> f59508b
From what version of hatch is this expected to be available? |
The next minor release. |
I see that hatch |
This project uses semantic versioning so features only happen in minor releases e.g. 1.10.0 |
I'm using last It seems it looks for a
Did I miss something obvious, or is that made on purpose ? If yes, may I ask the rationale (or a pointer to it) ? |
@vaab not sure whether i'm missing something from your description, but it seems that the behaviour that you expect is tested in the commit you reference. please verify that this is the case. |
Sorry if I was not clear. I guess you are referring to this test. However, the In my case, with a very default/simple installation, without customization, the first part of the logic looks for a And this explains why the test works, and a real world example fails. I believe my setup is a very default setup, and its quite clear why it fails, and it comes from this default 'main' section lookup, and these 2 different logic. The test should test on 'main' string and not empty string if it wants to reflect what I feel is normal usage. I'm obviously missing a lot of context, so I'm sorry if there are obvious things I missed. The workaround for me was to add an option
But this won't be expected by most user I guess (and the URL should be exactly matched, with leading |
As I have good reasons to think that this will be reported as an issue soon, should I open a bug request and or propose a PR to solve this ? I didn't get any perspective on this point. Many thanks for any feedback. |
Yes please! |
If you provide a PR with a reproducing test, I'll take it from there.
|
Is there a way to pass an option to |
this is an approach to solve #561.
another way could be to wrap it all up in one credentials object that contains all the logic, including the cache updates.
therefore i'd appreciate feedback in this regard.