Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is PyPI case sensitive?

Tags:

python

pypi

How does PyPI handle case sensitivity?

For example, this SO question documents PyPI refusing a new package foobar if FooBar already exists.

Running pip against pypi.python.org seems to convert to the canonical case for a package:

$ pip install django Downloading/unpacking django   Downloading Django-1.7.tar.gz (7.5MB): 7.5MB downloaded 

Alternatively:

$ pip install Django Downloading/unpacking Django   Downloading Django-1.7.tar.gz (7.5MB): 7.5MB downloaded 

However, only some files seem to be in the canonical case in my virtualenv:

$ ls ~/pyenvs/test_venv/lib/python2.7/site-packages/ | grep -i django django/ Django-1.7-py2.7.egg-info/ 

What does the XML-RPC API expect? Can I always assume that http://pypi.python.org/simple/foo and http://pypi.python.org/simple/FoO will both return HTTP 200?

Is PyPI's position on case-sensitivity documented anywhere?

like image 922
Wilfred Hughes Avatar asked Oct 22 '14 08:10

Wilfred Hughes


People also ask

Are Python packages case sensitive?

Yes, Python Is a Case-Sensitive Language It's the differentiation between lower- and uppercase letters. It can be a feature not only of a programming language but of any computer program. The shortest answer to the question of case sensitivity in Python is yes.

Is pip the same as PyPI?

PyPy Pip Installation Pip/pip3 is the official package manager for Python, but it can also be used by PyPy for installing Python modules. The easiest way to install pip for PyPy on any operating system is to use the ensurepip package that comes with Python and PyPy by default.

What does PyPI stand for in Python?

The Python Package Index, abbreviated as PyPI (/ˌpaɪpiˈaɪ/) and also known as the Cheese Shop (a reference to the Monty Python's Flying Circus sketch "Cheese Shop"), is the official third-party software repository for Python.

What is https PyPI?

The Python Package Index (PyPI) is a repository of software for the Python programming language. PyPI helps you find and install software developed and shared by the Python community. Learn about installing packages.


1 Answers

No, pip is case insensitive.

All comparisons of distribution names MUST be case insensitive, and MUST consider hyphens and underscores to be equivalent.

from PEP 426

like image 173
Most Wanted Avatar answered Sep 18 '22 17:09

Most Wanted