deezer-oauth-cli 1.7.0__tar.gz → 2.0.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.
- {deezer_oauth_cli-1.7.0 → deezer_oauth_cli-2.0.0}/PKG-INFO +5 -5
- {deezer_oauth_cli-1.7.0 → deezer_oauth_cli-2.0.0}/README.md +2 -2
- {deezer_oauth_cli-1.7.0 → deezer_oauth_cli-2.0.0}/pyproject.toml +25 -46
- deezer_oauth_cli-2.0.0/src/deezer_oauth/__init__.py +1 -0
- {deezer_oauth_cli-1.7.0 → deezer_oauth_cli-2.0.0}/src/deezer_oauth/server.py +2 -4
- {deezer_oauth_cli-1.7.0 → deezer_oauth_cli-2.0.0}/src/deezer_oauth_cli.egg-info/PKG-INFO +5 -5
- {deezer_oauth_cli-1.7.0 → deezer_oauth_cli-2.0.0}/tests/test_dunder_main.py +1 -1
- {deezer_oauth_cli-1.7.0 → deezer_oauth_cli-2.0.0}/tests/test_main.py +1 -1
- {deezer_oauth_cli-1.7.0 → deezer_oauth_cli-2.0.0}/tests/test_server.py +3 -6
- deezer_oauth_cli-1.7.0/src/deezer_oauth/__init__.py +0 -1
- {deezer_oauth_cli-1.7.0 → deezer_oauth_cli-2.0.0}/LICENSE +0 -0
- {deezer_oauth_cli-1.7.0 → deezer_oauth_cli-2.0.0}/setup.cfg +0 -0
- {deezer_oauth_cli-1.7.0 → deezer_oauth_cli-2.0.0}/src/deezer_oauth/__main__.py +0 -0
- {deezer_oauth_cli-1.7.0 → deezer_oauth_cli-2.0.0}/src/deezer_oauth/client.py +0 -0
- {deezer_oauth_cli-1.7.0 → deezer_oauth_cli-2.0.0}/src/deezer_oauth/constants.py +0 -0
- {deezer_oauth_cli-1.7.0 → deezer_oauth_cli-2.0.0}/src/deezer_oauth/files.py +0 -0
- {deezer_oauth_cli-1.7.0 → deezer_oauth_cli-2.0.0}/src/deezer_oauth/main.py +0 -0
- {deezer_oauth_cli-1.7.0 → deezer_oauth_cli-2.0.0}/src/deezer_oauth/py.typed +0 -0
- {deezer_oauth_cli-1.7.0 → deezer_oauth_cli-2.0.0}/src/deezer_oauth_cli.egg-info/SOURCES.txt +0 -0
- {deezer_oauth_cli-1.7.0 → deezer_oauth_cli-2.0.0}/src/deezer_oauth_cli.egg-info/dependency_links.txt +0 -0
- {deezer_oauth_cli-1.7.0 → deezer_oauth_cli-2.0.0}/src/deezer_oauth_cli.egg-info/entry_points.txt +0 -0
- {deezer_oauth_cli-1.7.0 → deezer_oauth_cli-2.0.0}/src/deezer_oauth_cli.egg-info/requires.txt +0 -0
- {deezer_oauth_cli-1.7.0 → deezer_oauth_cli-2.0.0}/src/deezer_oauth_cli.egg-info/top_level.txt +0 -0
- {deezer_oauth_cli-1.7.0 → deezer_oauth_cli-2.0.0}/tests/test_client.py +0 -0
- {deezer_oauth_cli-1.7.0 → deezer_oauth_cli-2.0.0}/tests/test_files.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: deezer-oauth-cli
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0.0
|
|
4
4
|
Summary: A small CLI to quickly obtain an API token for Deezer API.
|
|
5
5
|
Author-email: Bruno Alla <alla.brunoo@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -15,13 +15,13 @@ Classifier: Intended Audience :: Developers
|
|
|
15
15
|
Classifier: Natural Language :: English
|
|
16
16
|
Classifier: Operating System :: OS Independent
|
|
17
17
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
19
18
|
Classifier: Programming Language :: Python :: 3.11
|
|
20
19
|
Classifier: Programming Language :: Python :: 3.12
|
|
21
20
|
Classifier: Programming Language :: Python :: 3.13
|
|
22
21
|
Classifier: Programming Language :: Python :: 3.14
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
23
23
|
Classifier: Topic :: Software Development :: Libraries
|
|
24
|
-
Requires-Python: >=3.
|
|
24
|
+
Requires-Python: >=3.11
|
|
25
25
|
Description-Content-Type: text/markdown
|
|
26
26
|
License-File: LICENSE
|
|
27
27
|
Requires-Dist: httpx>=0.27
|
|
@@ -46,8 +46,8 @@ Dynamic: license-file
|
|
|
46
46
|
<a href="https://github.com/astral-sh/ruff">
|
|
47
47
|
<img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json" alt="Ruff">
|
|
48
48
|
</a>
|
|
49
|
-
<a href="https://github.com/
|
|
50
|
-
<img src="https://img.shields.io/
|
|
49
|
+
<a href="https://github.com/j178/prek">
|
|
50
|
+
<img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/j178/prek/master/docs/assets/badge-v0.json" alt="prek">
|
|
51
51
|
</a>
|
|
52
52
|
</p>
|
|
53
53
|
<p align="center">
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
<a href="https://github.com/astral-sh/ruff">
|
|
16
16
|
<img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json" alt="Ruff">
|
|
17
17
|
</a>
|
|
18
|
-
<a href="https://github.com/
|
|
19
|
-
<img src="https://img.shields.io/
|
|
18
|
+
<a href="https://github.com/j178/prek">
|
|
19
|
+
<img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/j178/prek/master/docs/assets/badge-v0.json" alt="prek">
|
|
20
20
|
</a>
|
|
21
21
|
</p>
|
|
22
22
|
<p align="center">
|
|
@@ -4,28 +4,27 @@ requires = [ "setuptools>=77.0.3" ]
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "deezer-oauth-cli"
|
|
7
|
-
version = "
|
|
7
|
+
version = "2.0.0"
|
|
8
8
|
description = "A small CLI to quickly obtain an API token for Deezer API."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "MIT"
|
|
11
11
|
authors = [
|
|
12
12
|
{ name = "Bruno Alla", email = "alla.brunoo@gmail.com" },
|
|
13
13
|
]
|
|
14
|
-
requires-python = ">=3.
|
|
14
|
+
requires-python = ">=3.11"
|
|
15
15
|
classifiers = [
|
|
16
16
|
"Development Status :: 2 - Pre-Alpha",
|
|
17
17
|
"Intended Audience :: Developers",
|
|
18
18
|
"Natural Language :: English",
|
|
19
19
|
"Operating System :: OS Independent",
|
|
20
20
|
"Programming Language :: Python :: 3 :: Only",
|
|
21
|
-
"Programming Language :: Python :: 3.10",
|
|
22
21
|
"Programming Language :: Python :: 3.11",
|
|
23
22
|
"Programming Language :: Python :: 3.12",
|
|
24
23
|
"Programming Language :: Python :: 3.13",
|
|
25
24
|
"Programming Language :: Python :: 3.14",
|
|
25
|
+
"Programming Language :: Python :: 3.15",
|
|
26
26
|
"Topic :: Software Development :: Libraries",
|
|
27
27
|
]
|
|
28
|
-
|
|
29
28
|
dependencies = [
|
|
30
29
|
"httpx>=0.27",
|
|
31
30
|
"rich>=10",
|
|
@@ -41,16 +40,16 @@ scripts.deezer-oauth = "deezer_oauth.main:app"
|
|
|
41
40
|
|
|
42
41
|
[dependency-groups]
|
|
43
42
|
dev = [
|
|
44
|
-
"pyfakefs>=
|
|
45
|
-
"pytest>=
|
|
43
|
+
"pyfakefs>=6,<7",
|
|
44
|
+
"pytest>=9,<10",
|
|
46
45
|
"pytest-cov>=7,<8",
|
|
47
46
|
"pytest-mock>=3.6,<4",
|
|
48
47
|
"respx>=0.22",
|
|
48
|
+
"ty==0.0.99",
|
|
49
49
|
]
|
|
50
50
|
|
|
51
51
|
[tool.ruff]
|
|
52
52
|
line-length = 88
|
|
53
|
-
|
|
54
53
|
lint.select = [
|
|
55
54
|
"B", # flake8-bugbear
|
|
56
55
|
"C4", # flake8-comprehensions
|
|
@@ -83,63 +82,43 @@ lint.per-file-ignores."tests/**/*" = [
|
|
|
83
82
|
lint.isort.known-first-party = [ "deezer_oauth", "tests" ]
|
|
84
83
|
|
|
85
84
|
[tool.pyproject-fmt]
|
|
86
|
-
max_supported_python = "3.
|
|
85
|
+
max_supported_python = "3.15"
|
|
87
86
|
|
|
88
|
-
[tool.
|
|
89
|
-
|
|
90
|
-
|
|
87
|
+
[tool.ty]
|
|
88
|
+
terminal.error-on-warning = true
|
|
89
|
+
analysis.allowed-unresolved-imports = [ "test.**" ]
|
|
91
90
|
|
|
92
|
-
[tool.
|
|
93
|
-
|
|
91
|
+
[tool.pytest]
|
|
92
|
+
addopts = [ "-v", "-Wonce", "--cov=deezer_oauth" ]
|
|
93
|
+
minversion = "9.0"
|
|
94
|
+
pythonpath = [ "src" ]
|
|
94
95
|
|
|
95
|
-
[tool.coverage
|
|
96
|
-
|
|
97
|
-
exclude_lines = [
|
|
98
|
-
"pragma: no cover",
|
|
96
|
+
[tool.coverage]
|
|
97
|
+
run.branch = true
|
|
98
|
+
report.exclude_lines = [
|
|
99
99
|
"@overload",
|
|
100
100
|
"if TYPE_CHECKING",
|
|
101
|
+
"pragma: no cover",
|
|
101
102
|
]
|
|
102
|
-
|
|
103
|
-
[tool.mypy]
|
|
104
|
-
check_untyped_defs = true
|
|
105
|
-
disallow_any_generics = true
|
|
106
|
-
disallow_incomplete_defs = true
|
|
107
|
-
disallow_untyped_defs = true
|
|
108
|
-
mypy_path = "src/"
|
|
109
|
-
no_implicit_optional = true
|
|
110
|
-
show_error_codes = true
|
|
111
|
-
warn_unreachable = true
|
|
112
|
-
warn_unused_ignores = true
|
|
113
|
-
|
|
114
|
-
[[tool.mypy.overrides]]
|
|
115
|
-
module = "tests.*"
|
|
116
|
-
allow_untyped_defs = true
|
|
103
|
+
report.ignore_errors = true
|
|
117
104
|
|
|
118
105
|
[tool.semantic_release]
|
|
119
|
-
version_toml = [ "pyproject.toml:project.version" ]
|
|
120
106
|
version_variables = [
|
|
121
107
|
"src/deezer_oauth/__init__.py:__version__",
|
|
122
108
|
]
|
|
109
|
+
version_toml = [ "pyproject.toml:project.version" ]
|
|
123
110
|
build_command = """
|
|
124
111
|
pip install uv
|
|
125
112
|
uv lock
|
|
126
113
|
git add uv.lock
|
|
127
114
|
uv build
|
|
128
115
|
"""
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
116
|
+
branches.main.match = "main"
|
|
117
|
+
branches.noop.match = "(?!main$)"
|
|
118
|
+
branches.noop.prerelease = true
|
|
119
|
+
changelog.environment.keep_trailing_newline = true
|
|
120
|
+
changelog.exclude_commit_patterns = [
|
|
132
121
|
"chore.*",
|
|
133
122
|
"ci.*",
|
|
134
123
|
"Merge pull request .*",
|
|
135
124
|
]
|
|
136
|
-
|
|
137
|
-
[tool.semantic_release.changelog.environment]
|
|
138
|
-
keep_trailing_newline = true
|
|
139
|
-
|
|
140
|
-
[tool.semantic_release.branches.main]
|
|
141
|
-
match = "main"
|
|
142
|
-
|
|
143
|
-
[tool.semantic_release.branches.noop]
|
|
144
|
-
match = "(?!main$)"
|
|
145
|
-
prerelease = true
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.0.0"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
from http.server import BaseHTTPRequestHandler, HTTPServer
|
|
4
|
-
from typing import TYPE_CHECKING, Any
|
|
4
|
+
from typing import TYPE_CHECKING, Any, cast
|
|
5
5
|
from urllib.parse import parse_qsl
|
|
6
6
|
|
|
7
7
|
from deezer_oauth.constants import HOST_NAME, OAUTH_RETURN_PATH, SERVER_PORT
|
|
@@ -53,12 +53,10 @@ PAGE_CONTENT = """
|
|
|
53
53
|
class LocalRequestHandler(BaseHTTPRequestHandler):
|
|
54
54
|
"""Simple HTTP request handler to perform the OAuth dance."""
|
|
55
55
|
|
|
56
|
-
server: LocalHTTPServer
|
|
57
|
-
|
|
58
56
|
@property
|
|
59
57
|
def oauth_dancer(self) -> OAuthDancer:
|
|
60
58
|
"""Shortcut to access the `OAuthDancer` instance."""
|
|
61
|
-
return self.server.oauth_dancer
|
|
59
|
+
return cast(LocalHTTPServer, self.server).oauth_dancer
|
|
62
60
|
|
|
63
61
|
def do_GET(self) -> None:
|
|
64
62
|
"""Route GET requests to the right handler."""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: deezer-oauth-cli
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0.0
|
|
4
4
|
Summary: A small CLI to quickly obtain an API token for Deezer API.
|
|
5
5
|
Author-email: Bruno Alla <alla.brunoo@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -15,13 +15,13 @@ Classifier: Intended Audience :: Developers
|
|
|
15
15
|
Classifier: Natural Language :: English
|
|
16
16
|
Classifier: Operating System :: OS Independent
|
|
17
17
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
19
18
|
Classifier: Programming Language :: Python :: 3.11
|
|
20
19
|
Classifier: Programming Language :: Python :: 3.12
|
|
21
20
|
Classifier: Programming Language :: Python :: 3.13
|
|
22
21
|
Classifier: Programming Language :: Python :: 3.14
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
23
23
|
Classifier: Topic :: Software Development :: Libraries
|
|
24
|
-
Requires-Python: >=3.
|
|
24
|
+
Requires-Python: >=3.11
|
|
25
25
|
Description-Content-Type: text/markdown
|
|
26
26
|
License-File: LICENSE
|
|
27
27
|
Requires-Dist: httpx>=0.27
|
|
@@ -46,8 +46,8 @@ Dynamic: license-file
|
|
|
46
46
|
<a href="https://github.com/astral-sh/ruff">
|
|
47
47
|
<img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json" alt="Ruff">
|
|
48
48
|
</a>
|
|
49
|
-
<a href="https://github.com/
|
|
50
|
-
<img src="https://img.shields.io/
|
|
49
|
+
<a href="https://github.com/j178/prek">
|
|
50
|
+
<img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/j178/prek/master/docs/assets/badge-v0.json" alt="prek">
|
|
51
51
|
</a>
|
|
52
52
|
</p>
|
|
53
53
|
<p align="center">
|
|
@@ -2,7 +2,6 @@ import http.client
|
|
|
2
2
|
import threading
|
|
3
3
|
|
|
4
4
|
import pytest
|
|
5
|
-
from test.support.threading_helper import threading_cleanup, threading_setup
|
|
6
5
|
|
|
7
6
|
from deezer_oauth.client import OAuthDancer
|
|
8
7
|
from deezer_oauth.server import LocalHTTPServer, LocalRequestHandler, run_server
|
|
@@ -38,8 +37,9 @@ class ServerWrapperThread(threading.Thread):
|
|
|
38
37
|
"""
|
|
39
38
|
|
|
40
39
|
server: LocalHTTPServer
|
|
40
|
+
test_class: "TestLocalRequestHandler | None"
|
|
41
41
|
|
|
42
|
-
def __init__(self, test_class):
|
|
42
|
+
def __init__(self, test_class: "TestLocalRequestHandler"):
|
|
43
43
|
threading.Thread.__init__(self)
|
|
44
44
|
self.test_class = test_class
|
|
45
45
|
|
|
@@ -49,6 +49,7 @@ class ServerWrapperThread(threading.Thread):
|
|
|
49
49
|
("localhost", 0),
|
|
50
50
|
LocalRequestHandler,
|
|
51
51
|
)
|
|
52
|
+
assert self.test_class is not None
|
|
52
53
|
self.test_class.host, self.test_class.port = self.server.socket.getsockname()
|
|
53
54
|
self.test_class.server_started.set()
|
|
54
55
|
self.test_class = None
|
|
@@ -69,16 +70,12 @@ class TestLocalRequestHandler:
|
|
|
69
70
|
|
|
70
71
|
@pytest.fixture
|
|
71
72
|
def http_server(self):
|
|
72
|
-
_threads = threading_setup()
|
|
73
73
|
self.server_started = threading.Event()
|
|
74
74
|
thread = ServerWrapperThread(self)
|
|
75
75
|
thread.start()
|
|
76
76
|
self.server_started.wait()
|
|
77
77
|
yield
|
|
78
78
|
thread.stop()
|
|
79
|
-
# clear assignment to avoid dangling thread
|
|
80
|
-
thread = None # type: ignore[assignment]
|
|
81
|
-
threading_cleanup(*_threads)
|
|
82
79
|
|
|
83
80
|
def request(self, uri, method="GET"):
|
|
84
81
|
self.connection = http.client.HTTPConnection(self.host, self.port)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "1.7.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{deezer_oauth_cli-1.7.0 → deezer_oauth_cli-2.0.0}/src/deezer_oauth_cli.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{deezer_oauth_cli-1.7.0 → deezer_oauth_cli-2.0.0}/src/deezer_oauth_cli.egg-info/entry_points.txt
RENAMED
|
File without changes
|
{deezer_oauth_cli-1.7.0 → deezer_oauth_cli-2.0.0}/src/deezer_oauth_cli.egg-info/requires.txt
RENAMED
|
File without changes
|
{deezer_oauth_cli-1.7.0 → deezer_oauth_cli-2.0.0}/src/deezer_oauth_cli.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|