PyLinks 0.1.2__tar.gz → 0.1.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. {pylinks-0.1.2 → pylinks-0.1.3}/PKG-INFO +1 -1
  2. {pylinks-0.1.2 → pylinks-0.1.3}/pyproject.toml +1 -1
  3. {pylinks-0.1.2 → pylinks-0.1.3}/src/PyLinks.egg-info/PKG-INFO +1 -1
  4. {pylinks-0.1.2 → pylinks-0.1.3}/src/pylinks/exception/api.py +5 -2
  5. {pylinks-0.1.2 → pylinks-0.1.3}/src/pylinks/exception/base.py +2 -1
  6. {pylinks-0.1.2 → pylinks-0.1.3}/src/pylinks/exception/media_type.py +2 -2
  7. {pylinks-0.1.2 → pylinks-0.1.3}/src/pylinks/exception/uri.py +1 -2
  8. {pylinks-0.1.2 → pylinks-0.1.3}/src/pylinks/site/binder.py +2 -1
  9. {pylinks-0.1.2 → pylinks-0.1.3}/src/pylinks/site/conda.py +2 -3
  10. {pylinks-0.1.2 → pylinks-0.1.3}/src/pylinks/site/github.py +2 -3
  11. {pylinks-0.1.2 → pylinks-0.1.3}/src/pylinks/site/lib_io.py +2 -2
  12. {pylinks-0.1.2 → pylinks-0.1.3}/src/pylinks/site/pypi.py +2 -3
  13. {pylinks-0.1.2 → pylinks-0.1.3}/src/pylinks/site/readthedocs.py +2 -5
  14. {pylinks-0.1.2 → pylinks-0.1.3}/setup.cfg +0 -0
  15. {pylinks-0.1.2 → pylinks-0.1.3}/src/PyLinks.egg-info/SOURCES.txt +0 -0
  16. {pylinks-0.1.2 → pylinks-0.1.3}/src/PyLinks.egg-info/dependency_links.txt +0 -0
  17. {pylinks-0.1.2 → pylinks-0.1.3}/src/PyLinks.egg-info/not-zip-safe +0 -0
  18. {pylinks-0.1.2 → pylinks-0.1.3}/src/PyLinks.egg-info/requires.txt +0 -0
  19. {pylinks-0.1.2 → pylinks-0.1.3}/src/PyLinks.egg-info/top_level.txt +0 -0
  20. {pylinks-0.1.2 → pylinks-0.1.3}/src/pylinks/__init__.py +0 -0
  21. {pylinks-0.1.2 → pylinks-0.1.3}/src/pylinks/_settings.py +0 -0
  22. {pylinks-0.1.2 → pylinks-0.1.3}/src/pylinks/api/__init__.py +0 -0
  23. {pylinks-0.1.2 → pylinks-0.1.3}/src/pylinks/api/doi.py +0 -0
  24. {pylinks-0.1.2 → pylinks-0.1.3}/src/pylinks/api/github.py +0 -0
  25. {pylinks-0.1.2 → pylinks-0.1.3}/src/pylinks/api/orcid.py +0 -0
  26. {pylinks-0.1.2 → pylinks-0.1.3}/src/pylinks/api/zenodo.py +0 -0
  27. {pylinks-0.1.2 → pylinks-0.1.3}/src/pylinks/exception/__init__.py +0 -0
  28. {pylinks-0.1.2 → pylinks-0.1.3}/src/pylinks/http.py +0 -0
  29. {pylinks-0.1.2 → pylinks-0.1.3}/src/pylinks/media_type.py +0 -0
  30. {pylinks-0.1.2 → pylinks-0.1.3}/src/pylinks/site/__init__.py +0 -0
  31. {pylinks-0.1.2 → pylinks-0.1.3}/src/pylinks/string.py +0 -0
  32. {pylinks-0.1.2 → pylinks-0.1.3}/src/pylinks/uri/__init__.py +0 -0
  33. {pylinks-0.1.2 → pylinks-0.1.3}/src/pylinks/uri/data.py +0 -0
  34. {pylinks-0.1.2 → pylinks-0.1.3}/src/pylinks/url.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyLinks
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Requires-Python: >=3.10
5
5
  Requires-Dist: requests<3,>=2.31.0
6
6
  Requires-Dist: ExceptionMan<0.2,>=0.1
@@ -17,7 +17,7 @@ namespaces = true
17
17
  # ----------------------------------------- Project Metadata -------------------------------------
18
18
  #
19
19
  [project]
20
- version = "0.1.2"
20
+ version = "0.1.3"
21
21
  name = "PyLinks"
22
22
  dependencies = [
23
23
  "requests >= 2.31.0, < 3",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyLinks
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Requires-Python: >=3.10
5
5
  Requires-Dist: requests<3,>=2.31.0
6
6
  Requires-Dist: ExceptionMan<0.2,>=0.1
@@ -5,8 +5,6 @@ from __future__ import annotations as _annotations
5
5
  import json
6
6
  from typing import TYPE_CHECKING as _TYPE_CHECKING
7
7
 
8
- import mdit as _mdit
9
-
10
8
  from pylinks.exception.base import PyLinksError
11
9
 
12
10
  if _TYPE_CHECKING:
@@ -23,6 +21,7 @@ class WebAPIError(PyLinksError):
23
21
 
24
22
  class WebAPIRequestError(WebAPIError):
25
23
  def __init__(self, request_error: RequestException) -> None:
24
+ import mdit as _mdit
26
25
  self.request = request_error.request
27
26
  self.response = request_error.response
28
27
  self.error = request_error
@@ -47,6 +46,7 @@ class WebAPIStatusCodeError(WebAPIError):
47
46
  """
48
47
 
49
48
  def __init__(self, response: Response) -> None:
49
+ import mdit as _mdit
50
50
  self.request = response.request
51
51
  self.response = response
52
52
  response_summary, response_details = _process_response(response)
@@ -97,6 +97,7 @@ class GraphQLResponseError(WebAPIError):
97
97
  """Exception class for GraphQL."""
98
98
 
99
99
  def __init__(self, response: dict, query: str) -> None:
100
+ import mdit as _mdit
100
101
  if "errors" in response:
101
102
  intro = "GraphQL response contains errors."
102
103
  elif "data" not in response:
@@ -121,6 +122,7 @@ class GraphQLResponseError(WebAPIError):
121
122
 
122
123
 
123
124
  def _process_response(response: Response):
125
+ import mdit as _mdit
124
126
  # Decode error reason from server
125
127
  # This part is adapted from `requests` library; See PR #3538 on their GitHub
126
128
  if isinstance(response.reason, bytes):
@@ -160,6 +162,7 @@ def _process_response(response: Response):
160
162
 
161
163
 
162
164
  def _process_request(request: Request | PreparedRequest):
165
+ import mdit as _mdit
163
166
  request_info = []
164
167
  request_summary = _mdit.element.field_list()
165
168
  for title, attr_name in (
@@ -5,7 +5,6 @@ from __future__ import annotations as _annotations
5
5
  from functools import partial as _partial
6
6
  from typing import TYPE_CHECKING as _TYPE_CHECKING
7
7
 
8
- import mdit as _mdit
9
8
  from exceptionman import ReporterException as _ReporterException
10
9
 
11
10
  if _TYPE_CHECKING:
@@ -24,6 +23,7 @@ class PyLinksError(_ReporterException):
24
23
  intro,
25
24
  details=None,
26
25
  ) -> None:
26
+ import mdit as _mdit
27
27
  sphinx_config = {"html_title": "PyLinks Error Report"}
28
28
  sphinx_target_config = _mdit.target.sphinx(
29
29
  renderer=_partial(
@@ -46,6 +46,7 @@ class PyLinksFileNotFoundError(PyLinksError):
46
46
  """File not found error."""
47
47
 
48
48
  def __init__(self, path: Path) -> None:
49
+ import mdit as _mdit
49
50
  super().__init__(
50
51
  title="File Not Found Error",
51
52
  intro=_mdit.inline_container(
@@ -1,5 +1,3 @@
1
- import mdit as _mdit
2
-
3
1
  from pylinks.exception.base import PyLinksError as _PyLinksError
4
2
 
5
3
 
@@ -7,6 +5,7 @@ class PyLinksMediaTypeParseError(_PyLinksError):
7
5
  """Error parsing a media type."""
8
6
 
9
7
  def __init__(self, problem: str, media_type: str) -> None:
8
+ import mdit as _mdit
10
9
  super().__init__(
11
10
  title="Media Type Parse Error",
12
11
  intro=_mdit.inline_container(
@@ -24,6 +23,7 @@ class PyLinksMediaTypeGuessError(_PyLinksError):
24
23
  """Error guessing the media type of a data URI."""
25
24
 
26
25
  def __init__(self, path: str) -> None:
26
+ import mdit as _mdit
27
27
  super().__init__(
28
28
  title="Media Type Guess Error",
29
29
  intro=_mdit.inline_container(
@@ -1,5 +1,3 @@
1
- import mdit as _mdit
2
-
3
1
  from pylinks.exception.base import PyLinksError as _PyLinksError
4
2
 
5
3
 
@@ -7,6 +5,7 @@ class PyLinksDataURIParseError(_PyLinksError):
7
5
  """Error parsing a data URI."""
8
6
 
9
7
  def __init__(self, problem: str, data_uri: str) -> None:
8
+ import mdit as _mdit
10
9
  super().__init__(
11
10
  title="Data URI Parse Error",
12
11
  intro=_mdit.inline_container(
@@ -6,8 +6,9 @@ References
6
6
  """
7
7
 
8
8
  import pylinks as _pylinks
9
+ import pylinks.url as _url
9
10
 
10
- _BASE_URL = _pylinks.url.create(url="https://mybinder.org/v2")
11
+ _BASE_URL = _url.create(url="https://mybinder.org/v2")
11
12
 
12
13
 
13
14
  def github(
@@ -1,14 +1,13 @@
1
1
  """URLs for Conda packages."""
2
2
 
3
- # Standard libraries
4
3
  import re
5
4
 
6
- # Non-standard libraries
7
5
  import requests
8
6
 
9
7
  import pylinks as _pylinks
8
+ import pylinks.url as _url
10
9
 
11
- BASE_URL = _pylinks.url.create(url="https://anaconda.org")
10
+ BASE_URL = _url.create(url="https://anaconda.org")
12
11
 
13
12
 
14
13
  class Package:
@@ -1,15 +1,14 @@
1
1
  """URLs for GitHub users, repositories, branches, and more."""
2
2
 
3
- # Standard libraries
4
3
  import re
5
4
  from typing import Literal
6
5
 
7
- # Non-standard libraries
8
6
  import requests
9
7
 
10
8
  import pylinks as _pylinks
9
+ import pylinks.url as _url
11
10
 
12
- BASE_URL = _pylinks.url.create(url="https://github.com")
11
+ BASE_URL = _url.create(url="https://github.com")
13
12
 
14
13
 
15
14
  class User:
@@ -1,11 +1,11 @@
1
1
  """URLs for the Libraries.io website."""
2
2
 
3
- # Non-standard libraries
4
3
  import requests
5
4
 
6
5
  import pylinks as _pylinks
6
+ import pylinks.url as _url
7
7
 
8
- BASE_URL = _pylinks.url.create(url="https://libraries.io")
8
+ BASE_URL = _url.create(url="https://libraries.io")
9
9
 
10
10
 
11
11
  class Package:
@@ -1,14 +1,13 @@
1
1
  """URLs for PyPI packages."""
2
2
 
3
- # Standard libraries
4
3
  import re
5
4
 
6
- # Non-standard libraries
7
5
  import requests
8
6
 
9
7
  import pylinks as _pylinks
8
+ import pylinks.url as _url
10
9
 
11
- BASE_URL = _pylinks.url.create("https://pypi.org")
10
+ BASE_URL = _url.create("https://pypi.org")
12
11
 
13
12
 
14
13
  class Package:
@@ -1,14 +1,11 @@
1
1
  """URLs for ReadTheDocs websites."""
2
2
 
3
-
4
- # Standard libraries
5
-
6
- # Non-standard libraries
7
3
  import requests
8
4
 
9
5
  import pylinks as _pylinks
6
+ import pylinks.url as _url
10
7
 
11
- BASE_URL = _pylinks.url.create(url="https://readthedocs.org")
8
+ BASE_URL = _url.create(url="https://readthedocs.org")
12
9
 
13
10
 
14
11
  class Project:
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes