Skip to content

bugfix/97-format-generic-http-urls - #162

Merged
protoroto merged 1 commit into
nephila:masterfrom
bensynapse:bugfix/97-generic-http-urls
Oct 13, 2026
Merged

protoroto merged 1 commit into
nephila:masterfrom
bensynapse:bugfix/97-generic-http-urls

Conversation

@bensynapse

Copy link
Copy Markdown
Contributor

I run Live Tennis API.

Description

Generic Git hosts declare HTTP as a supported protocol, but BasePlatform.FORMATS has no HTTP template. For example, parse("http://git.example.org/project.git").normalized raises KeyError("http"). Accessing .urls also fails for generic HTTP, HTTPS, SSH and Git URLs because it formats every supported protocol.

This adds the HTTP template and regression tests for normalization, protocol conversions and name updates. The tests cover ports, nested paths and repository URLs with and without .git.

The commit hooks also require ClassVar annotations for the existing shared dictionaries and updated formatting in two test messages. Those changes let the edited files pass the newer Ruff hook.

All seven tests pass in each of the Python 3.8, 3.9, 3.10 and 3.11 tox environments. inv lint and the project commit hooks pass.

References

Related to #97. This addresses the formatting exception reported there. The separate URL validation examples are outside this change.

Checklist

  • Code lint checked via inv lint
  • Tests added

@protoroto
protoroto merged commit 95089ce into nephila:master Oct 13, 2026
13 checks passed
@protoroto

Copy link
Copy Markdown
Member

@bensynapse Hi! Thanks for contributing! I've just released a new version, 0.16.0, with your contribution. Thanks again!

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.

2 participants