Skip to content

Fix docs mentioning that index URLs must support JSON API (they do not)#274

Merged
hoodmane merged 3 commits intopyodide:mainfrom
alexprengere:docs/indexurls
Apr 30, 2026
Merged

Fix docs mentioning that index URLs must support JSON API (they do not)#274
hoodmane merged 3 commits intopyodide:mainfrom
alexprengere:docs/indexurls

Conversation

@alexprengere
Copy link
Copy Markdown
Contributor

Fixes #273

Comment thread micropip/package_manager.py Outdated
Comment on lines +136 to +137
- The index URL must support CORS when used in a web browser. Note that \
*https://pypi.org/simple* has CORS enabled.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- The index URL must support CORS when used in a web browser. Note that \
*https://pypi.org/simple* has CORS enabled.
- The index URL must support CORS when used in a web browser.

Sounds redundant to me.

Comment thread micropip/package_manager.py Outdated
Comment on lines 125 to 126
- The index URL may support the \
`JSON API <https://warehouse.pypa.io/api-reference/json/>`__ .
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's just say that the remote index should support Simple repository API. We support JSON api but it is not standardized so I don't really want to let users know about it. We may drop supporting it later.

Comment thread micropip/package_manager.py Outdated
Comment on lines 128 to 131
- The index URL may contain the placeholder {package_name}, for example \
*https://pypi.org/pypi/{package_name}/json*, this placeholder will be \
replaced with the package name when looking up a package. If it does not \
contain the placeholder, the package name will be appended to the URL.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's also remove this as well.

@alexprengere
Copy link
Copy Markdown
Contributor Author

I pushed the suggestions. I also changed similar things in micropip/package_manager.py

Copy link
Copy Markdown
Member

@hoodmane hoodmane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert test formatting changes.

@ryanking13
Copy link
Copy Markdown
Member

Revert test formatting changes.

I think they are done by pre-commit.ci for some reason

@alexprengere
Copy link
Copy Markdown
Contributor Author

Yeah I did not push those, and I did not configure precommit locally so this is coming from the CI

Copy link
Copy Markdown
Member

@hoodmane hoodmane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@hoodmane hoodmane merged commit f75b479 into pyodide:main Apr 30, 2026
7 checks passed
@alexprengere alexprengere deleted the docs/indexurls branch May 1, 2026 05:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Outdated docs for index_urls

3 participants