Skip to content

Commit

Permalink
Merge branch 'cegid' of github.com:marrow/uri into cegid
Browse files Browse the repository at this point in the history
  • Loading branch information
amcgregor committed Dec 10, 2023
2 parents 1c4ea8c + fe1245d commit da4e19d
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 19 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ watch: develop
${PROJECT}.egg-info/PKG-INFO: pyproject.toml
@mkdir -p ${VIRTUAL_ENV}/lib/pip-cache
pip install --cache-dir "${VIRTUAL_ENV}/lib/pip-cache" -Ue ".[${USE}]"

33 changes: 17 additions & 16 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,41 +38,43 @@ Repository = "https://github.com/marrow/uri.git"
http = ['requests'] # Support for the http:// and https:// protocols.
test = [
'pytest', # Test collector and extensible runner.
'pytest-black', # Syntax linting.
'pytest-cov[toml]', # Coverage reporting.
'pytest-flakes', # Syntax validation.
'pytest-isort', # Import ordering.
'pytest-mypy', # Static type validation.
'pytest-black', # Syntax linting.
'requests', # Support for the http:// and https:// protocols.
'types-setuptools', # Typing stubs.
'webob', # Request WSGI environment mocking.
'requests', # Support for the http:// and https:// protocols.
]
development = [ # Development-time dependencies.
'bandit', # Automated security analysis.
'black', # Syntax linting.
'build[virtualenv]', # Python packaging build tool.
'cibuildwheel', # Build automation.
'e', # Try: python3 -me
'mypy', # Type hinting analysis.
'pre-commit', # Commit hooks for code quality.
'ptipython', # Enhanced interactive REPL shell.
'pytest', # Test collector and extensible runner.
'pytest-black', # Syntax linting.
'pytest-cov[toml]', # Coverage reporting.
'pytest-flakes', # Syntax validation.
'pytest-isort', # Import ordering.
'pytest-mypy', # Static type validation.
'pytest-black', # Syntax linting.
'types-setuptools', # Typing stubs.
'webob', # Request WSGI environment mocking.
'requests', # Support for the http:// and https:// protocols.
'pre-commit', # Commit hooks for code quality.
'mypy', # Type hinting analysis.
'rope', # Project symbols collection.
'bandit', # Automated security analysis.
'black', # Syntax linting.
'ptipython', # Enhanced interactive REPL shell.
'e', # Try: python3 -me
'build[virtualenv]', # Python packaging build tool.
'wheel', # "Wheel" package format support.
'cibuildwheel', # Build automation.
'twine', # Python package release tool.
'types-setuptools', # Typing stubs.
'webob', # Request WSGI environment mocking.
'wheel', # "Wheel" package format support.
]

[project.entry-points."uri.scheme"]
# https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml
# https://www.w3.org/wiki/UriSchemes
# https://github.com/APSL/uri/commit/709b4b73daae7b8651b92fd4fa63af41c4db2986
# https://docs.mongodb.com/manual/reference/connection-string
file = 'uri.scheme:URLScheme'
ftp = 'uri.scheme:URLScheme'
http = 'uri.scheme:URLScheme'
Expand All @@ -81,12 +83,11 @@ irc = 'uri.scheme:URLScheme'
ldap = 'uri.scheme:URLScheme'
telnet = 'uri.scheme:URLScheme'
sftp = 'uri.scheme:URLScheme'
# Care of https://github.com/APSL/uri/commit/709b4b73daae7b8651b92fd4fa63af41c4db2986
mysql = 'uri.scheme:URLScheme'
redis = 'uri.scheme:URLScheme'
postgres = 'uri.scheme:URLScheme'
postgresql = 'uri.scheme:URLScheme'
mongodb = 'uri.scheme:URLScheme' # https://docs.mongodb.com/manual/reference/connection-string
mongodb = 'uri.scheme:URLScheme'


[tool.setuptools_scm]
Expand Down
4 changes: 3 additions & 1 deletion uri/bucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,7 @@ def __len__(self):

def __str__(self):
# Certain symbols are explicitly allowed, ref: http://pretty-rfc.herokuapp.com/RFC3986#query
iterator = (quote_plus(i.encode('utf8')).replace('%3F', '?').replace('%2F', '/') for i in self) if self.valid else self
# XXX: __import__('wdb').set_trace()
iterator = (quote_plus(i.encode('utf8')).replace(b'%3F', b'?').replace(b'%2F', b'/') for i in self) if self.valid else self
return self.sep.join(iterator)

2 changes: 1 addition & 1 deletion uri/part/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@


class Part:
"""Descriptor protocol objects for combantorial string parts with validation."""
"""Descriptor protocol objects for combinatorial string parts with validation."""

__slots__ = ()

Expand Down
2 changes: 1 addition & 1 deletion uri/uri.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class URI:

# Additional Compound Interfaces
uri = URIPart(__parts__) # Whole-URI retrieval or storage as string.
safe_uri = URIPart(__safe_parts__, False) # URI retrieval without password component, useful for logging.
safe = safe_uri = URIPart(__safe_parts__, False) # URI retrieval without password component, useful for logging.
base = BasePart()
summary = URIPart(('host', 'path'), False)
resource = URIPart(('path', 'query', 'fragment'), False)
Expand Down

0 comments on commit da4e19d

Please sign in to comment.