Skip to content

Tags: ido50/morgan

Tags

v0.14.2

Toggle v0.14.2's commit message
Bump version

v0.14.1

Toggle v0.14.1's commit message
Bump version

v0.14.0

Toggle v0.14.0's commit message
Bump version

v0.13.4

Toggle v0.13.4's commit message
Bump version to 0.13.4

v0.13.3

Toggle v0.13.3's commit message
Bugfix: mirroring can fail for some packages

When filtering files of a package to mirror, Morgan checks whether
the file's required Python version matches all environments. If
a package defines its required version as a simple number instead
of an actual specifier (e.g. '3' instead of the correct '==3'),
then Morgan would fail when determining whether the file should be
downloaded.

This commit fixes the issue by forcing such files to have a
valid specifier, and also ignoring files that still fail Morgan's
verification.

v0.13.2

Toggle v0.13.2's commit message
Bugfix: downloaded files may not match all environments

When Morgan mirrors packages, it chooses the most recent version
that satisfies the requirement strings, and the environments.
However, when matching environments, it would select files (and
therefore version) that matches at least one of the Python versions
of the environments, which could lead to Morgan choosing versions
that do not support all of the Python versions.

This commit fixes this bug by requiring the selected versions match
ALL of the Python versions defined in the environments. This could
potentially lead to Morgan not finding matches at all, but this
would be fixed in a subsequent release by treating each environment
independently of the others.

v0.13.1

Toggle v0.13.1's commit message
Bump version to 0.13.1

Package version is bumped to 0.13.1, introducing a fix to support
package metadata versions whose major component is 1, instead of
only 1.0, when mirroring PyPI packages.

v0.13.0

Toggle v0.13.0's commit message
Add server flag to disable serving of metadata files

By default, the Morgan server implements PEP 658 ("Serve Distribution
Metadata in the Simple Repository API"). This allows clients such as
`pip` to download and parse metadata files without having to download
complete package archives first. However, if the `pip` user provides
non-normalized names to the command (e.g. `pip install FastAPI`
instead of `pip install fastapi`), the install will fail, because the
name inside the returned metadata file is different than the name
provided to `pip`. This seems like a bug in `pip` (because it is
sending normalized names to the server), but it's better to at least
have a workaround.

The server now accepts the `--no-metadata` flag, which will disable
serving of metadata files completely if provided. This allows `pip`
to install with non-normalized names as well.

v0.12.3

Toggle v0.12.3's commit message

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
Decode request URLs before handling

Variants of some packages (e.g. CPU-only builds of PyTorch) may
have characters in their filenames that get percent-encoded. In
the given example, `+` gets encoded to `%2B`. When pip asks for
these filenames, (at least on my machine) it uses percent-encoded
URLs in its requests to the morgan server. The server however
does not decode these URLs, so it just returns a 404.

Pass the URL to `urllib.parse.unquote` before `urllib.parse.unsplit`
to fix this. I'm not sure this is the best way to fix it, but it
was the easiest. It might make more sense to instead unquote just
the path portion of the URL after urlsplit instead of the entire
thing.

v0.12.2

Toggle v0.12.2's commit message
bump version