github3-utils 0.7.0__tar.gz → 0.8.0__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.
- {github3_utils-0.7.0 → github3_utils-0.8.0}/PKG-INFO +14 -9
- {github3_utils-0.7.0 → github3_utils-0.8.0}/README.rst +5 -5
- {github3_utils-0.7.0 → github3_utils-0.8.0}/github3_utils/__init__.py +8 -5
- {github3_utils-0.7.0 → github3_utils-0.8.0}/github3_utils/apps.py +1 -1
- {github3_utils-0.7.0 → github3_utils-0.8.0}/github3_utils/testing.py +1 -1
- {github3_utils-0.7.0 → github3_utils-0.8.0}/pyproject.toml +28 -26
- github3_utils-0.8.0/requirements.txt +11 -0
- github3_utils-0.7.0/requirements.txt +0 -8
- {github3_utils-0.7.0 → github3_utils-0.8.0}/LICENSE +0 -0
- {github3_utils-0.7.0 → github3_utils-0.8.0}/github3_utils/check_labels.py +0 -0
- {github3_utils-0.7.0 → github3_utils-0.8.0}/github3_utils/click.py +0 -0
- {github3_utils-0.7.0 → github3_utils-0.8.0}/github3_utils/headers.py +0 -0
- {github3_utils-0.7.0 → github3_utils-0.8.0}/github3_utils/py.typed +0 -0
- {github3_utils-0.7.0 → github3_utils-0.8.0}/github3_utils/secrets.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: github3-utils
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.8.0
|
|
4
4
|
Summary: Handy utilities for github3.py
|
|
5
5
|
Author-email: Dominic Davis-Foster <dominic@davis-foster.co.uk>
|
|
6
6
|
License: MIT
|
|
@@ -18,21 +18,26 @@ Classifier: License :: OSI Approved :: MIT License
|
|
|
18
18
|
Classifier: Operating System :: OS Independent
|
|
19
19
|
Classifier: Programming Language :: Python
|
|
20
20
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
21
|
-
Classifier: Programming Language :: Python :: 3.6
|
|
22
21
|
Classifier: Programming Language :: Python :: 3.7
|
|
23
22
|
Classifier: Programming Language :: Python :: 3.8
|
|
24
23
|
Classifier: Programming Language :: Python :: 3.9
|
|
25
24
|
Classifier: Programming Language :: Python :: 3.10
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
26
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
27
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
26
28
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
27
29
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
28
30
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
29
31
|
Classifier: Typing :: Typed
|
|
30
|
-
Requires-Python: >=3.
|
|
32
|
+
Requires-Python: >=3.7
|
|
31
33
|
Requires-Dist: apeye-core>=1.0.0
|
|
32
34
|
Requires-Dist: attrs>=20.3.0
|
|
33
35
|
Requires-Dist: click>=7.1.2
|
|
36
|
+
Requires-Dist: cryptography<44; implementation_name == "pypy" and python_version == "3.8"
|
|
37
|
+
Requires-Dist: cryptography<40; implementation_name == "pypy" and python_version <= "3.7"
|
|
34
38
|
Requires-Dist: domdf-python-tools>=1.1.0
|
|
35
39
|
Requires-Dist: github3-py>=1.3.0
|
|
40
|
+
Requires-Dist: pyjwt<2.11.0
|
|
36
41
|
Requires-Dist: pynacl>=1.4.0
|
|
37
42
|
Requires-Dist: requests>=2.25.1
|
|
38
43
|
Requires-Dist: typing-extensions!=3.10.0.1,>=3.10.0.0
|
|
@@ -105,8 +110,8 @@ github3-utils
|
|
|
105
110
|
:target: https://github.com/domdfcoding/github3-utils/actions?query=workflow%3A%22mypy%22
|
|
106
111
|
:alt: mypy status
|
|
107
112
|
|
|
108
|
-
.. |requires| image:: https://dependency-dash.
|
|
109
|
-
:target: https://dependency-dash.
|
|
113
|
+
.. |requires| image:: https://dependency-dash.repo-helper.uk/github/domdfcoding/github3-utils/badge.svg
|
|
114
|
+
:target: https://dependency-dash.repo-helper.uk/github/domdfcoding/github3-utils/
|
|
110
115
|
:alt: Requirements Status
|
|
111
116
|
|
|
112
117
|
.. |coveralls| image:: https://img.shields.io/coveralls/github/domdfcoding/github3-utils/master?logo=coveralls
|
|
@@ -148,7 +153,7 @@ github3-utils
|
|
|
148
153
|
.. |language| image:: https://img.shields.io/github/languages/top/domdfcoding/github3-utils
|
|
149
154
|
:alt: GitHub top language
|
|
150
155
|
|
|
151
|
-
.. |commits-since| image:: https://img.shields.io/github/commits-since/domdfcoding/github3-utils/v0.
|
|
156
|
+
.. |commits-since| image:: https://img.shields.io/github/commits-since/domdfcoding/github3-utils/v0.8.0
|
|
152
157
|
:target: https://github.com/domdfcoding/github3-utils/pulse
|
|
153
158
|
:alt: GitHub commits since tagged version
|
|
154
159
|
|
|
@@ -156,11 +161,11 @@ github3-utils
|
|
|
156
161
|
:target: https://github.com/domdfcoding/github3-utils/commit/master
|
|
157
162
|
:alt: GitHub last commit
|
|
158
163
|
|
|
159
|
-
.. |maintained| image:: https://img.shields.io/maintenance/yes/
|
|
164
|
+
.. |maintained| image:: https://img.shields.io/maintenance/yes/2026
|
|
160
165
|
:alt: Maintenance
|
|
161
166
|
|
|
162
167
|
.. |pypi-downloads| image:: https://img.shields.io/pypi/dm/github3-utils
|
|
163
|
-
:target: https://
|
|
168
|
+
:target: https://pypistats.org/packages/github3-utils
|
|
164
169
|
:alt: PyPI - Downloads
|
|
165
170
|
|
|
166
171
|
.. end shields
|
|
@@ -58,8 +58,8 @@ github3-utils
|
|
|
58
58
|
:target: https://github.com/domdfcoding/github3-utils/actions?query=workflow%3A%22mypy%22
|
|
59
59
|
:alt: mypy status
|
|
60
60
|
|
|
61
|
-
.. |requires| image:: https://dependency-dash.
|
|
62
|
-
:target: https://dependency-dash.
|
|
61
|
+
.. |requires| image:: https://dependency-dash.repo-helper.uk/github/domdfcoding/github3-utils/badge.svg
|
|
62
|
+
:target: https://dependency-dash.repo-helper.uk/github/domdfcoding/github3-utils/
|
|
63
63
|
:alt: Requirements Status
|
|
64
64
|
|
|
65
65
|
.. |coveralls| image:: https://img.shields.io/coveralls/github/domdfcoding/github3-utils/master?logo=coveralls
|
|
@@ -101,7 +101,7 @@ github3-utils
|
|
|
101
101
|
.. |language| image:: https://img.shields.io/github/languages/top/domdfcoding/github3-utils
|
|
102
102
|
:alt: GitHub top language
|
|
103
103
|
|
|
104
|
-
.. |commits-since| image:: https://img.shields.io/github/commits-since/domdfcoding/github3-utils/v0.
|
|
104
|
+
.. |commits-since| image:: https://img.shields.io/github/commits-since/domdfcoding/github3-utils/v0.8.0
|
|
105
105
|
:target: https://github.com/domdfcoding/github3-utils/pulse
|
|
106
106
|
:alt: GitHub commits since tagged version
|
|
107
107
|
|
|
@@ -109,11 +109,11 @@ github3-utils
|
|
|
109
109
|
:target: https://github.com/domdfcoding/github3-utils/commit/master
|
|
110
110
|
:alt: GitHub last commit
|
|
111
111
|
|
|
112
|
-
.. |maintained| image:: https://img.shields.io/maintenance/yes/
|
|
112
|
+
.. |maintained| image:: https://img.shields.io/maintenance/yes/2026
|
|
113
113
|
:alt: Maintenance
|
|
114
114
|
|
|
115
115
|
.. |pypi-downloads| image:: https://img.shields.io/pypi/dm/github3-utils
|
|
116
|
-
:target: https://
|
|
116
|
+
:target: https://pypistats.org/packages/github3-utils
|
|
117
117
|
:alt: PyPI - Downloads
|
|
118
118
|
|
|
119
119
|
.. end shields
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
#
|
|
3
3
|
# __init__.py
|
|
4
4
|
"""
|
|
5
|
-
Handy utilities for `github3.py <https://
|
|
5
|
+
Handy utilities for `github3.py <https://github3.readthedocs.io/en/latest/>`_.
|
|
6
6
|
"""
|
|
7
7
|
#
|
|
8
8
|
# Copyright © 2020 Dominic Davis-Foster <dominic@davis-foster.co.uk>
|
|
@@ -56,7 +56,7 @@ Handy utilities for `github3.py <https://github3py.readthedocs.io/en/master/>`_.
|
|
|
56
56
|
import datetime
|
|
57
57
|
import os
|
|
58
58
|
from contextlib import contextmanager
|
|
59
|
-
from typing import Iterable, Iterator, List, Optional, Union, overload
|
|
59
|
+
from typing import Iterable, Iterator, List, Optional, Union, cast, overload
|
|
60
60
|
|
|
61
61
|
# 3rd party
|
|
62
62
|
import attr
|
|
@@ -75,7 +75,7 @@ from github3_utils.headers import LUKE_CAGE
|
|
|
75
75
|
__author__: str = "Dominic Davis-Foster"
|
|
76
76
|
__copyright__: str = "2020 Dominic Davis-Foster"
|
|
77
77
|
__license__: str = "MIT License"
|
|
78
|
-
__version__: str = "0.
|
|
78
|
+
__version__: str = "0.8.0"
|
|
79
79
|
__email__: str = "dominic@davis-foster.co.uk"
|
|
80
80
|
|
|
81
81
|
__all__ = (
|
|
@@ -92,6 +92,8 @@ __all__ = (
|
|
|
92
92
|
class RateLimitExceeded(RuntimeError):
|
|
93
93
|
"""
|
|
94
94
|
Custom exception class to indicate the GitHub rate limit has been exceeded and no further requests should be made.
|
|
95
|
+
|
|
96
|
+
:param reset_time: The time at which the rate limit will be reset.
|
|
95
97
|
"""
|
|
96
98
|
|
|
97
99
|
#: The time at which the rate limit will be reset.
|
|
@@ -283,9 +285,10 @@ def get_repos(
|
|
|
283
285
|
url = user_or_org._build_url("users", user_or_org.login, "repos")
|
|
284
286
|
params = {"type": "owner", "sort": "full_name", "direction": "asc"}
|
|
285
287
|
|
|
286
|
-
|
|
288
|
+
repo: ShortRepository
|
|
289
|
+
for repo in user_or_org._iter(-1, url, ShortRepository, params): # type: ignore[arg-type,assignment]
|
|
287
290
|
if full:
|
|
288
|
-
yield repo.refresh()
|
|
291
|
+
yield cast(Repository, repo.refresh())
|
|
289
292
|
else:
|
|
290
293
|
yield repo
|
|
291
294
|
|
|
@@ -64,7 +64,7 @@ class ContextSwitcher:
|
|
|
64
64
|
Login as the GitHub app.
|
|
65
65
|
"""
|
|
66
66
|
|
|
67
|
-
self.client.login_as_app(self.private_key_pem, self.app_id)
|
|
67
|
+
self.client.login_as_app(self.private_key_pem, str(self.app_id))
|
|
68
68
|
|
|
69
69
|
def login_as_user_installation(self, username: str) -> int:
|
|
70
70
|
"""
|
|
@@ -48,7 +48,7 @@ from typing import Iterator
|
|
|
48
48
|
# 3rd party
|
|
49
49
|
import pytest # nodep
|
|
50
50
|
from _pytest.fixtures import FixtureRequest # nodep
|
|
51
|
-
from betamax import Betamax # type: ignore[import] # nodep
|
|
51
|
+
from betamax import Betamax # type: ignore[import-untyped] # nodep
|
|
52
52
|
from github3 import GitHub
|
|
53
53
|
|
|
54
54
|
__all__ = ("cassette", "github_client", "module_cassette")
|
|
@@ -4,7 +4,7 @@ build-backend = "whey"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "github3-utils"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.8.0"
|
|
8
8
|
description = "Handy utilities for github3.py"
|
|
9
9
|
readme = "README.rst"
|
|
10
10
|
keywords = [ "github",]
|
|
@@ -13,8 +13,11 @@ dependencies = [
|
|
|
13
13
|
"apeye-core>=1.0.0",
|
|
14
14
|
"attrs>=20.3.0",
|
|
15
15
|
"click>=7.1.2",
|
|
16
|
+
'cryptography<44; implementation_name == "pypy" and python_version == "3.8"',
|
|
17
|
+
'cryptography<40; implementation_name == "pypy" and python_version <= "3.7"',
|
|
16
18
|
"domdf-python-tools>=1.1.0",
|
|
17
19
|
"github3-py>=1.3.0",
|
|
20
|
+
"pyjwt<2.11.0",
|
|
18
21
|
"pynacl>=1.4.0",
|
|
19
22
|
"requests>=2.25.1",
|
|
20
23
|
"typing-extensions!=3.10.0.1,>=3.10.0.0",
|
|
@@ -27,7 +30,9 @@ classifiers = [
|
|
|
27
30
|
"Programming Language :: Python",
|
|
28
31
|
"Programming Language :: Python :: 3 :: Only",
|
|
29
32
|
"Programming Language :: Python :: 3.10",
|
|
30
|
-
"Programming Language :: Python :: 3.
|
|
33
|
+
"Programming Language :: Python :: 3.11",
|
|
34
|
+
"Programming Language :: Python :: 3.12",
|
|
35
|
+
"Programming Language :: Python :: 3.13",
|
|
31
36
|
"Programming Language :: Python :: 3.7",
|
|
32
37
|
"Programming Language :: Python :: 3.8",
|
|
33
38
|
"Programming Language :: Python :: 3.9",
|
|
@@ -36,16 +41,15 @@ classifiers = [
|
|
|
36
41
|
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
37
42
|
"Typing :: Typed",
|
|
38
43
|
]
|
|
39
|
-
requires-python = ">=3.
|
|
44
|
+
requires-python = ">=3.7"
|
|
45
|
+
|
|
46
|
+
[project.license]
|
|
47
|
+
file = "LICENSE"
|
|
40
48
|
|
|
41
49
|
[[project.authors]]
|
|
42
50
|
name = "Dominic Davis-Foster"
|
|
43
51
|
email = "dominic@davis-foster.co.uk"
|
|
44
52
|
|
|
45
|
-
|
|
46
|
-
[project.license]
|
|
47
|
-
file = "LICENSE"
|
|
48
|
-
|
|
49
53
|
[project.urls]
|
|
50
54
|
Homepage = "https://github.com/domdfcoding/github3-utils"
|
|
51
55
|
"Issue Tracker" = "https://github.com/domdfcoding/github3-utils/issues"
|
|
@@ -63,14 +67,19 @@ base-classifiers = [
|
|
|
63
67
|
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
64
68
|
"Typing :: Typed",
|
|
65
69
|
]
|
|
66
|
-
python-versions = [ "3.
|
|
70
|
+
python-versions = [ "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13",]
|
|
67
71
|
python-implementations = [ "CPython", "PyPy",]
|
|
68
72
|
platforms = [ "Windows", "macOS", "Linux",]
|
|
69
73
|
license-key = "MIT"
|
|
70
74
|
package = "github3_utils"
|
|
71
75
|
|
|
72
76
|
[tool.dep_checker]
|
|
73
|
-
allowed_unused = [ "cryptography",]
|
|
77
|
+
allowed_unused = [ "cryptography", "pyjwt",]
|
|
78
|
+
|
|
79
|
+
[tool.dep_checker.name_mapping]
|
|
80
|
+
github3_py = "github3"
|
|
81
|
+
pynacl = "nacl"
|
|
82
|
+
attrs = "attr"
|
|
74
83
|
|
|
75
84
|
[tool.mkrecipe]
|
|
76
85
|
conda-channels = [ "conda-forge", "domdfcoding",]
|
|
@@ -97,7 +106,6 @@ extensions = [
|
|
|
97
106
|
"sphinx.ext.mathjax",
|
|
98
107
|
"sphinxcontrib.extras_require",
|
|
99
108
|
"sphinx.ext.todo",
|
|
100
|
-
"sphinxemoji.sphinxemoji",
|
|
101
109
|
"notfound.extension",
|
|
102
110
|
"sphinx_copybutton",
|
|
103
111
|
"sphinxcontrib.default_values",
|
|
@@ -110,7 +118,6 @@ extensions = [
|
|
|
110
118
|
"sphinx_autofixture",
|
|
111
119
|
"sphinx_toolbox.more_autosummary.column_widths",
|
|
112
120
|
]
|
|
113
|
-
sphinxemoji_style = "twemoji"
|
|
114
121
|
gitstamp_fmt = "%d %b %Y"
|
|
115
122
|
templates_path = [ "_templates",]
|
|
116
123
|
html_static_path = [ "_static",]
|
|
@@ -160,7 +167,7 @@ autodoc_exclude_members = [
|
|
|
160
167
|
]
|
|
161
168
|
|
|
162
169
|
[tool.mypy]
|
|
163
|
-
python_version = "3.
|
|
170
|
+
python_version = "3.9"
|
|
164
171
|
namespace_packages = true
|
|
165
172
|
check_untyped_defs = true
|
|
166
173
|
warn_unused_ignores = true
|
|
@@ -170,10 +177,15 @@ show_error_codes = true
|
|
|
170
177
|
[tool.snippet-fmt]
|
|
171
178
|
directives = [ "code-block",]
|
|
172
179
|
|
|
173
|
-
[tool.
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
180
|
+
[tool.snippet-fmt.languages.python]
|
|
181
|
+
reformat = true
|
|
182
|
+
|
|
183
|
+
[tool.snippet-fmt.languages.TOML]
|
|
184
|
+
reformat = true
|
|
185
|
+
|
|
186
|
+
[tool.snippet-fmt.languages.ini]
|
|
187
|
+
|
|
188
|
+
[tool.snippet-fmt.languages.json]
|
|
177
189
|
|
|
178
190
|
[tool.dependency-dash."requirements.txt"]
|
|
179
191
|
order = 10
|
|
@@ -185,13 +197,3 @@ include = false
|
|
|
185
197
|
[tool.dependency-dash."doc-source/requirements.txt"]
|
|
186
198
|
order = 30
|
|
187
199
|
include = false
|
|
188
|
-
|
|
189
|
-
[tool.snippet-fmt.languages.python]
|
|
190
|
-
reformat = true
|
|
191
|
-
|
|
192
|
-
[tool.snippet-fmt.languages.TOML]
|
|
193
|
-
reformat = true
|
|
194
|
-
|
|
195
|
-
[tool.snippet-fmt.languages.ini]
|
|
196
|
-
|
|
197
|
-
[tool.snippet-fmt.languages.json]
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
apeye-core>=1.0.0
|
|
2
|
+
attrs>=20.3.0
|
|
3
|
+
click>=7.1.2
|
|
4
|
+
cryptography<44; implementation_name == "pypy" and python_version == "3.8"
|
|
5
|
+
cryptography<40; implementation_name == "pypy" and python_version <= "3.7"
|
|
6
|
+
domdf-python-tools>=1.1.0
|
|
7
|
+
github3-py>=1.3.0
|
|
8
|
+
pyjwt<2.11.0
|
|
9
|
+
pynacl>=1.4.0
|
|
10
|
+
requests>=2.25.1
|
|
11
|
+
typing-extensions!=3.10.0.1,>=3.10.0.0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|