Skip to content

Subprojects feature appears to conflict with "projects" dir on packaging.python.org #2292

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

Closed
ncoghlan opened this issue Jul 9, 2016 · 8 comments · Fixed by #10180
Closed
Labels
Accepted Accepted issue on our roadmap Bug A bug

Comments

@ncoghlan
Copy link

ncoghlan commented Jul 9, 2016

Details

packaging.python.org has a subpage called "projects" to list some of the core packaging related projects: https://github.com/pypa/python-packaging-user-guide/blob/master/source/projects.rst

Since PyPUG is built using Sphinx HtmlDir, that normally appears at: https://packaging.python.org/projects/

Expected Result

The ReST text linked above is rendered at the given URL

Actual Result

We get a 404 error as described in pypa/packaging.python.org#253

This works fine when building locally, so my suspicion is that it's a collision with the new(ish) subprojects feature: http://read-the-docs.readthedocs.io/en/latest/faq.html#how-do-i-host-multiple-projects-on-one-cname

@ncoghlan
Copy link
Author

ncoghlan commented Jul 9, 2016

Just noting that we'll probably address this specific instance on PyPUG's end by renaming the affected page, but it would still be preferable if the "projects" subdirectory was usable for documentation sets that aren't using the subprojects feature.

@ncoghlan
Copy link
Author

I've renamed the offending PyPUG page to "key_projects.rst", so the collision has been resolved in our particular case, but it was still a very confusing failure mode.

@agjohnson
Copy link
Contributor

Sorry for this confusion, yeah it's a path issue with the web servers in front of the docs. We have an issue open already for this on our operations repo, I'll update here when things should be resolved.

@agjohnson agjohnson added Operations Operations or server issue Bug A bug labels Jul 15, 2016
@agjohnson agjohnson added this to the File serving improvements milestone Sep 19, 2018
@agjohnson agjohnson added the Accepted Accepted issue on our roadmap label Sep 19, 2018
@stsewd
Copy link
Member

stsewd commented Nov 27, 2018

I'm not sure if something changed in the server, but I can't replicate this now https://test-simple-stsewd.readthedocs.io/en/latest/projects/ I'm using htmldir as builder, I also tested it with the html builder, /projects was 404 and /projects.html was ok.

@stsewd stsewd added the Needed: replication Bug replication is required label Nov 27, 2018
@stsewd
Copy link
Member

stsewd commented Nov 27, 2018

Oops, now I was able to replicate the problem, it happens when the project is a single version.

@stsewd stsewd removed the Needed: replication Bug replication is required label Nov 27, 2018
@humitos humitos removed the Operations Operations or server issue label Oct 28, 2020
@humitos
Copy link
Member

humitos commented Oct 4, 2022

I think we now have everything in place to make this issue/feature request/bug possible by allowing to define a different URL regex for projects.

@humitos
Copy link
Member

humitos commented Jan 31, 2023

@stsewd @ericholscher can we solve this issue by using our new feature for custom URLs?

@stsewd
Copy link
Member

stsewd commented Jan 31, 2023

@humitos the new proxito implementation won't have this problem.

@stsewd stsewd mentioned this issue Feb 23, 2023
stsewd added a commit that referenced this issue Mar 2, 2023
This is an initial usage of the new proxito implementation to serve files. It's under a feature flag, so it can be enabled per-project.

- We still need to adapt our 404 handler to make use of this new implementation (it could be simplified with #10061)
- We are still using our re paths to match the URLs, but we don't make use of the captured parameters, we use the unresolver for that. This also means that things like #2292 won't be solved till we do the whole migration.
-  There is a lot of repetition from the original get method, but some of it could be simplified with #10065.

Tests will pass once we have merged one private PR that we have pending.

> **Note**
> We don't support custom urlconfs yet, so we shouldn't enable it for those projects yet.
stsewd added a commit that referenced this issue Mar 23, 2023
This is only available in the new implementation.

Closes #2292
stsewd added a commit that referenced this issue Mar 27, 2023
Proxito: allow serving files under the projects dir

This is only available in the new implementation.

Closes #2292
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Accepted issue on our roadmap Bug A bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants