Follow repo perm redirect#1342
Conversation
|
Wouldn't it make more sense to somehow hook URL usage versus config? Many people don't use the |
|
@Caligatio What do they use instead? My original PR did follow the redirect at the time it was returned from the server, but there no really good options there. Either:
|
|
(clicked the wrong button) |
|
I'm a bit torn whether the below ideas are over-engineering the situation or not. However, I would definitely have a
To be clear here, I'm not a maintainer so my ideas are just ideas, not requests. EDIT: I have #1325 which needs to hook every HTTP request with custom certs. I have no idea if it will be actually accepted but, the more you can use already existing session objects, the more compatible things would be. |
Unfortunately, that doesn't help. It sends a 301 redirect, which allows changing a POST to a GET, and that is exactly what requests does. The end result is that the silent upload failure still happens (because a GET request to the same endpoint succeeds).
I don't know enough about the poetry internals to judge this, but if you can point out where it happens, I'm happy to investigate.
That's basically my original proposal, but @brycedrennan was concerned about the performance impact.
This is not substantially different from the current PR (unless I'm misunderstanding something).
Ideas and discussion are very much appreciated, maintainer or not :) |
|
I confused source and upload repositories in my mind when I gave above options; sorry about that. There are actually fewer places that are possibilities:
I don't think there is a perfect solution here. In the |
Why not though? I think the ideal solution would be all of the following:
The last point is essentially this PR. I think both changes would improve the behavior independently and it is worth doing both. |
|
It appears that the way configs were handled changed drastically between master and develop. It would have been entirely possible to write the values back in master as a handle was kept to each of the configs and they closely resembled files. In develop, the concept of the config was abstracted away and the individual config files are merged into the abstracted config; there is no longer a handle to the underlying files. |
|
@sztomi Thanks for your work on this and the first iteration of the PR. I'm a big fan of just providing a meaningful error message that will direct the user to fix their config. This avoids the need for extra requests or automatic configuration updates. What do you think? Perhaps your original PR can be re-purposed to that? |
|
I think this current PR would improve the situation independently, so I would keep this in addition to what you suggest. I suppose a clear error message is good though. |
|
Thanks for taking the time to make this PR! However, I don't the The work should be to improve the |
|
thanks @sdispater - do you think that |
|
For my part I think it’s safer to just provide a meaningful error. The user can then fix the configuration themselves. |
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This PR supersedes #1310 and fixes #858
In the documentation, I took the liberty to change the "foo.bar" domain to that of TestPyPI, because it's a common URL that people might want to add.
Pull Request Check List