Skip to content

Document reserved characters in FS URL resources - #609

Open
Hugohong258 wants to merge 1 commit into
PyFilesystem:masterfrom
Hugohong258:document-fs-url-reserved-characters
Open

Hugohong258 wants to merge 1 commit into
PyFilesystem:masterfrom
Hugohong258:document-fs-url-reserved-characters

Conversation

@Hugohong258

Copy link
Copy Markdown

Type of changes

  • Documentation / docstrings

Checklist

  • I've updated CHANGELOG.md and CONTRIBUTORS.md where appropriate.
  • I accept that @PyFilesystem/maintainers may be pedantic in the code review.

Description

An unescaped ! in an FS URL resource is parsed as the separator for an
optional path, which open_fs ignores. Document how to percent-encode it,
and the query delimiter ?, when they are part of the resource. This also
applies to paths passed without an explicit protocol. Closes #562.

On Windows with Python 3.9.25, I verified that an OSFS URL with !active
opens the parent directory while %21active opens the intended directory;
the parser also distinguishes literal ? from %3F. The existing opener
tests passed (34 tests, with four existing pkg_resources deprecation
warnings). The Sphinx 3.5.4 HTML build completed with 90 warnings, including
missing static files, autodoc warnings and the existing contributing page's
missing title. The documentation environment required compatible older Jinja2
and Sphinx extension versions. No implementation code was changed.

This branch has not been deployed

No deployments
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.

Opening absolute paths to folders containing exclamation marks fails

1 participant