Skip to content

v0.1.1

Latest

Choose a tag to compare

@github-actions github-actions released this 17 Oct 06:00

Added

  • SVNPath: a read-only path in a Subversion repository served over HTTP by
    mod_dav_svn, built on pathapi.http alone. SVNPath("trunk/README", instance=URL, ref=None, username=None, password=None, token=None, backend=None): a stat() is one
    PROPFIND, a listing one PROPFIND with Depth: 1 whose children keep their stat,
    ref is a revision number read through the revision stub the server announces, the md5
    and sha1 digests come with the stat (checksum(), without reading the file), and a link
    is read with readlink() and followed on its last name. Properties are asked for by
    name: an allprop reply can be invalid XML. RepoPath(type="svn", instance=URL) returns
    one; RepoPath.kinds() lists "svn".
  • SourceForgePath("README", project="docutils", mount="code", ref=None, instance=None, backend=None): the Subversion tool of a SourceForge project, found through the site's
    REST API once per backend. A Git or Mercurial tool is NotImplementedError, a missing
    project FileNotFoundError. RepoPath(type="sourceforge", project=...) returns one.
  • The schemes svn+https:, svn+http: (SVNURIPath) and sourceforge:
    (SourceForgeURIPath) in repopath.uri, registered through the uripath.schemes entry
    points like the others. svn: (svnserve) is not one of them.
  • RepoBackend(auth=(user, password)), sent as Authorization: Basic, and
    allow_redirects= on RepoBackend.request().
  • GiteaPath("src/mod.py", owner="acme", repo="widgets", ref=None, instance=None, token=None, backend=None): a read-only path in a repository on Gitea or Forgejo, through
    the REST API at https://<instance>/api/v1. The default instance and the only one detected
    is codeberg.org; any other needs RepoPath(type="gitea", instance=HOST), and "forgejo"
    is another name of the kind. Directories are read through the Git Trees API in pages of
    1,000 (the contents API answers a directory whole, 15 s for 2,000 entries), file bodies
    with one GET of the raw route; the server answers 405 to HEAD, so none is sent. A
    symlink is a file that reads as its target, a submodule an empty directory, and a file in
    Git LFS reads as the pointer Git holds, with the pointer's size. A private repository and
    a missing one are both FileNotFoundError; an unknown token is PermissionError.
  • The scheme gitea: (GiteaURIPath, gitea://[TOKEN@]host/owner/repo/path?ref=REF) in
    repopath.uri, declared in the uripath.schemes entry points like the others (run pip install -e . again after updating an editable checkout), and repo://codeberg.org/...,
    which detects the kind. The token in the user slot is hidden from str(), repr() and
    every message, as for github: and gitlab:.
  • ALIASES, a class attribute of a kind: other names type= takes for it. RepoPath.kinds()
    lists TYPE only.

Changed

  • The uri extra requires pathapi-uri>=0.1.1,<0.2 (it allowed >=0.1.0):
    0.1.1 hides the userinfo of every scheme whose class marks it a secret, which the
    repo:, github:, gitlab: and gitea: classes do, so a token is never shown in
    str() or repr() of a Source. pip install "repopath[uri]" upgrades it.

Full Changelog: v0.1.0...v0.1.1