Skip to content

Commit

Permalink
Replace pypi.io with pypi.org
Browse files Browse the repository at this point in the history
pypi.org is the official domain.

See pypi/warehouse#2184
  • Loading branch information
beenje committed Aug 17, 2024
1 parent b4df151 commit b51f964
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def pkg_pytest(tmpdir_factory) -> str:
# Correct info should be extracted from the metadata and not filename
dest_pkg = str(folder / "PYTEST-PKG-1.0.0.tar.gz")
download_sdist_pkg(
"https://pypi.io/packages/source/p/pytest/pytest-5.3.5.tar.gz", dest_pkg
"https://pypi.org/packages/source/p/pytest/pytest-5.3.5.tar.gz", dest_pkg
)
shutil.unpack_archive(dest_pkg, str(folder))
return dest_pkg
Expand Down
2 changes: 1 addition & 1 deletion tests/data/poetry/langchain-expected.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package:
version: {{ version }}

source:
url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/langchain-{{ version }}.tar.gz
url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}/langchain-{{ version }}.tar.gz
sha256: 95a93c966b1a2ff056c43870747aba1c39924c145179f0b8ffa27fef6a525610

build:
Expand Down
14 changes: 7 additions & 7 deletions tests/test_pypi.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def test_get_extra_from_requires_dist():
def dask_sdist_metadata():
config = Configuration(name="dask")
return get_sdist_metadata(
"https://pypi.io/packages/source/d/dask/dask-2022.6.1.tar.gz",
"https://pypi.org/packages/source/d/dask/dask-2022.6.1.tar.gz",
config,
)

Expand Down Expand Up @@ -283,7 +283,7 @@ def test_compose_test_section_with_console_scripts():
config = Configuration(name="pytest", version="7.1.2")
metadata1 = get_pypi_metadata(config)
metadata2 = get_sdist_metadata(
"https://pypi.io/packages/source/p/pytest/pytest-7.1.2.tar.gz", config
"https://pypi.org/packages/source/p/pytest/pytest-7.1.2.tar.gz", config
)
metadata = merge_pypi_sdist_metadata(metadata1, metadata2, config)
test_requirements = []
Expand Down Expand Up @@ -604,7 +604,7 @@ def test_get_sha256_from_pypi_metadata():
def test_injection_distutils(name):
config = Configuration(name="hypothesis")
data = get_sdist_metadata(
"https://pypi.io/packages/source/h/hypothesis/hypothesis-5.5.1.tar.gz",
"https://pypi.org/packages/source/h/hypothesis/hypothesis-5.5.1.tar.gz",
config,
)
assert sorted(data["install_requires"]) == sorted(
Expand All @@ -621,7 +621,7 @@ def test_injection_distutils(name):
def test_injection_distutils_pytest():
config = Configuration(name="pytest", version="5.3.2")
data = get_sdist_metadata(
"https://pypi.io/packages/source/p/pytest/pytest-5.3.2.tar.gz", config
"https://pypi.org/packages/source/p/pytest/pytest-5.3.2.tar.gz", config
)
assert sorted(data["install_requires"]) == sorted(
[
Expand All @@ -646,7 +646,7 @@ def test_injection_distutils_pytest():
def test_injection_distutils_compiler_gsw():
config = Configuration(name="gsw", version="3.3.1")
data = get_sdist_metadata(
"https://pypi.io/packages/source/g/gsw/gsw-3.3.1.tar.gz", config
"https://pypi.org/packages/source/g/gsw/gsw-3.3.1.tar.gz", config
)
assert data.get("compilers") == ["c"]
assert data["packages"] == ["gsw"]
Expand All @@ -656,7 +656,7 @@ def test_injection_distutils_setup_reqs_ensure_list():
pkg_name, pkg_ver = "pyinstaller-hooks-contrib", "2020.7"
config = Configuration(name=pkg_name, version=pkg_ver)
data = get_sdist_metadata(
f"https://pypi.io/packages/source/p/{pkg_name}/{pkg_name}-{pkg_ver}.tar.gz",
f"https://pypi.org/packages/source/p/{pkg_name}/{pkg_name}-{pkg_ver}.tar.gz",
config,
)
assert data.get("setup_requires") == ["setuptools >= 30.3.0"]
Expand Down Expand Up @@ -1112,7 +1112,7 @@ def test_recipe_extension():
recipe = create_python_recipe("azure-identity=1.3.1")[0]
assert (
recipe["source"]["url"]
== "https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/"
== "https://pypi.org/packages/source/{{ name[0] }}/{{ name }}/"
"azure-identity-{{ version }}.zip"
)

Expand Down

0 comments on commit b51f964

Please sign in to comment.