Skip to content

Commit 5bd617d

Browse files
committed
Upgrade platformdirs to 4.3.7
1 parent 7eb71fa commit 5bd617d

File tree

7 files changed

+41
-31
lines changed

7 files changed

+41
-31
lines changed

news/platformdirs.vendor.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Upgrade platformdirs to 4.3.7

src/pip/_vendor/platformdirs/__init__.py

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def _set_platform_dir_class() -> type[PlatformDirsABC]:
5252

5353
def user_data_dir(
5454
appname: str | None = None,
55-
appauthor: str | None | Literal[False] = None,
55+
appauthor: str | Literal[False] | None = None,
5656
version: str | None = None,
5757
roaming: bool = False, # noqa: FBT001, FBT002
5858
ensure_exists: bool = False, # noqa: FBT001, FBT002
@@ -76,7 +76,7 @@ def user_data_dir(
7676

7777
def site_data_dir(
7878
appname: str | None = None,
79-
appauthor: str | None | Literal[False] = None,
79+
appauthor: str | Literal[False] | None = None,
8080
version: str | None = None,
8181
multipath: bool = False, # noqa: FBT001, FBT002
8282
ensure_exists: bool = False, # noqa: FBT001, FBT002
@@ -100,7 +100,7 @@ def site_data_dir(
100100

101101
def user_config_dir(
102102
appname: str | None = None,
103-
appauthor: str | None | Literal[False] = None,
103+
appauthor: str | Literal[False] | None = None,
104104
version: str | None = None,
105105
roaming: bool = False, # noqa: FBT001, FBT002
106106
ensure_exists: bool = False, # noqa: FBT001, FBT002
@@ -124,7 +124,7 @@ def user_config_dir(
124124

125125
def site_config_dir(
126126
appname: str | None = None,
127-
appauthor: str | None | Literal[False] = None,
127+
appauthor: str | Literal[False] | None = None,
128128
version: str | None = None,
129129
multipath: bool = False, # noqa: FBT001, FBT002
130130
ensure_exists: bool = False, # noqa: FBT001, FBT002
@@ -148,7 +148,7 @@ def site_config_dir(
148148

149149
def user_cache_dir(
150150
appname: str | None = None,
151-
appauthor: str | None | Literal[False] = None,
151+
appauthor: str | Literal[False] | None = None,
152152
version: str | None = None,
153153
opinion: bool = True, # noqa: FBT001, FBT002
154154
ensure_exists: bool = False, # noqa: FBT001, FBT002
@@ -172,7 +172,7 @@ def user_cache_dir(
172172

173173
def site_cache_dir(
174174
appname: str | None = None,
175-
appauthor: str | None | Literal[False] = None,
175+
appauthor: str | Literal[False] | None = None,
176176
version: str | None = None,
177177
opinion: bool = True, # noqa: FBT001, FBT002
178178
ensure_exists: bool = False, # noqa: FBT001, FBT002
@@ -196,7 +196,7 @@ def site_cache_dir(
196196

197197
def user_state_dir(
198198
appname: str | None = None,
199-
appauthor: str | None | Literal[False] = None,
199+
appauthor: str | Literal[False] | None = None,
200200
version: str | None = None,
201201
roaming: bool = False, # noqa: FBT001, FBT002
202202
ensure_exists: bool = False, # noqa: FBT001, FBT002
@@ -220,7 +220,7 @@ def user_state_dir(
220220

221221
def user_log_dir(
222222
appname: str | None = None,
223-
appauthor: str | None | Literal[False] = None,
223+
appauthor: str | Literal[False] | None = None,
224224
version: str | None = None,
225225
opinion: bool = True, # noqa: FBT001, FBT002
226226
ensure_exists: bool = False, # noqa: FBT001, FBT002
@@ -274,7 +274,7 @@ def user_desktop_dir() -> str:
274274

275275
def user_runtime_dir(
276276
appname: str | None = None,
277-
appauthor: str | None | Literal[False] = None,
277+
appauthor: str | Literal[False] | None = None,
278278
version: str | None = None,
279279
opinion: bool = True, # noqa: FBT001, FBT002
280280
ensure_exists: bool = False, # noqa: FBT001, FBT002
@@ -298,7 +298,7 @@ def user_runtime_dir(
298298

299299
def site_runtime_dir(
300300
appname: str | None = None,
301-
appauthor: str | None | Literal[False] = None,
301+
appauthor: str | Literal[False] | None = None,
302302
version: str | None = None,
303303
opinion: bool = True, # noqa: FBT001, FBT002
304304
ensure_exists: bool = False, # noqa: FBT001, FBT002
@@ -322,7 +322,7 @@ def site_runtime_dir(
322322

323323
def user_data_path(
324324
appname: str | None = None,
325-
appauthor: str | None | Literal[False] = None,
325+
appauthor: str | Literal[False] | None = None,
326326
version: str | None = None,
327327
roaming: bool = False, # noqa: FBT001, FBT002
328328
ensure_exists: bool = False, # noqa: FBT001, FBT002
@@ -346,7 +346,7 @@ def user_data_path(
346346

347347
def site_data_path(
348348
appname: str | None = None,
349-
appauthor: str | None | Literal[False] = None,
349+
appauthor: str | Literal[False] | None = None,
350350
version: str | None = None,
351351
multipath: bool = False, # noqa: FBT001, FBT002
352352
ensure_exists: bool = False, # noqa: FBT001, FBT002
@@ -370,7 +370,7 @@ def site_data_path(
370370

371371
def user_config_path(
372372
appname: str | None = None,
373-
appauthor: str | None | Literal[False] = None,
373+
appauthor: str | Literal[False] | None = None,
374374
version: str | None = None,
375375
roaming: bool = False, # noqa: FBT001, FBT002
376376
ensure_exists: bool = False, # noqa: FBT001, FBT002
@@ -394,7 +394,7 @@ def user_config_path(
394394

395395
def site_config_path(
396396
appname: str | None = None,
397-
appauthor: str | None | Literal[False] = None,
397+
appauthor: str | Literal[False] | None = None,
398398
version: str | None = None,
399399
multipath: bool = False, # noqa: FBT001, FBT002
400400
ensure_exists: bool = False, # noqa: FBT001, FBT002
@@ -418,7 +418,7 @@ def site_config_path(
418418

419419
def site_cache_path(
420420
appname: str | None = None,
421-
appauthor: str | None | Literal[False] = None,
421+
appauthor: str | Literal[False] | None = None,
422422
version: str | None = None,
423423
opinion: bool = True, # noqa: FBT001, FBT002
424424
ensure_exists: bool = False, # noqa: FBT001, FBT002
@@ -442,7 +442,7 @@ def site_cache_path(
442442

443443
def user_cache_path(
444444
appname: str | None = None,
445-
appauthor: str | None | Literal[False] = None,
445+
appauthor: str | Literal[False] | None = None,
446446
version: str | None = None,
447447
opinion: bool = True, # noqa: FBT001, FBT002
448448
ensure_exists: bool = False, # noqa: FBT001, FBT002
@@ -466,7 +466,7 @@ def user_cache_path(
466466

467467
def user_state_path(
468468
appname: str | None = None,
469-
appauthor: str | None | Literal[False] = None,
469+
appauthor: str | Literal[False] | None = None,
470470
version: str | None = None,
471471
roaming: bool = False, # noqa: FBT001, FBT002
472472
ensure_exists: bool = False, # noqa: FBT001, FBT002
@@ -490,7 +490,7 @@ def user_state_path(
490490

491491
def user_log_path(
492492
appname: str | None = None,
493-
appauthor: str | None | Literal[False] = None,
493+
appauthor: str | Literal[False] | None = None,
494494
version: str | None = None,
495495
opinion: bool = True, # noqa: FBT001, FBT002
496496
ensure_exists: bool = False, # noqa: FBT001, FBT002
@@ -544,7 +544,7 @@ def user_desktop_path() -> Path:
544544

545545
def user_runtime_path(
546546
appname: str | None = None,
547-
appauthor: str | None | Literal[False] = None,
547+
appauthor: str | Literal[False] | None = None,
548548
version: str | None = None,
549549
opinion: bool = True, # noqa: FBT001, FBT002
550550
ensure_exists: bool = False, # noqa: FBT001, FBT002
@@ -568,7 +568,7 @@ def user_runtime_path(
568568

569569
def site_runtime_path(
570570
appname: str | None = None,
571-
appauthor: str | None | Literal[False] = None,
571+
appauthor: str | Literal[False] | None = None,
572572
version: str | None = None,
573573
opinion: bool = True, # noqa: FBT001, FBT002
574574
ensure_exists: bool = False, # noqa: FBT001, FBT002

src/pip/_vendor/platformdirs/android.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class Android(PlatformDirsABC):
2323
@property
2424
def user_data_dir(self) -> str:
2525
""":return: data directory tied to the user, e.g. ``/data/user/<userid>/<packagename>/files/<AppName>``"""
26-
return self._append_app_name_and_version(cast(str, _android_folder()), "files")
26+
return self._append_app_name_and_version(cast("str", _android_folder()), "files")
2727

2828
@property
2929
def site_data_dir(self) -> str:
@@ -36,7 +36,7 @@ def user_config_dir(self) -> str:
3636
:return: config directory tied to the user, e.g. \
3737
``/data/user/<userid>/<packagename>/shared_prefs/<AppName>``
3838
"""
39-
return self._append_app_name_and_version(cast(str, _android_folder()), "shared_prefs")
39+
return self._append_app_name_and_version(cast("str", _android_folder()), "shared_prefs")
4040

4141
@property
4242
def site_config_dir(self) -> str:
@@ -46,7 +46,7 @@ def site_config_dir(self) -> str:
4646
@property
4747
def user_cache_dir(self) -> str:
4848
""":return: cache directory tied to the user, e.g.,``/data/user/<userid>/<packagename>/cache/<AppName>``"""
49-
return self._append_app_name_and_version(cast(str, _android_folder()), "cache")
49+
return self._append_app_name_and_version(cast("str", _android_folder()), "cache")
5050

5151
@property
5252
def site_cache_dir(self) -> str:

src/pip/_vendor/platformdirs/api.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
from typing import TYPE_CHECKING
99

1010
if TYPE_CHECKING:
11-
from typing import Iterator, Literal
11+
from collections.abc import Iterator
12+
from typing import Literal
1213

1314

1415
class PlatformDirsABC(ABC): # noqa: PLR0904
@@ -17,7 +18,7 @@ class PlatformDirsABC(ABC): # noqa: PLR0904
1718
def __init__( # noqa: PLR0913, PLR0917
1819
self,
1920
appname: str | None = None,
20-
appauthor: str | None | Literal[False] = None,
21+
appauthor: str | Literal[False] | None = None,
2122
version: str | None = None,
2223
roaming: bool = False, # noqa: FBT001, FBT002
2324
multipath: bool = False, # noqa: FBT001, FBT002

src/pip/_vendor/platformdirs/unix.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@
66
import sys
77
from configparser import ConfigParser
88
from pathlib import Path
9-
from typing import Iterator, NoReturn
9+
from typing import TYPE_CHECKING, NoReturn
1010

1111
from .api import PlatformDirsABC
1212

13+
if TYPE_CHECKING:
14+
from collections.abc import Iterator
15+
1316
if sys.platform == "win32":
1417

1518
def getuid() -> NoReturn:
Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1-
# file generated by setuptools_scm
1+
# file generated by setuptools-scm
22
# don't change, don't track in version control
3+
4+
__all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
5+
36
TYPE_CHECKING = False
47
if TYPE_CHECKING:
5-
from typing import Tuple, Union
8+
from typing import Tuple
9+
from typing import Union
10+
611
VERSION_TUPLE = Tuple[Union[int, str], ...]
712
else:
813
VERSION_TUPLE = object
@@ -12,5 +17,5 @@
1217
__version_tuple__: VERSION_TUPLE
1318
version_tuple: VERSION_TUPLE
1419

15-
__version__ = version = '4.3.6'
16-
__version_tuple__ = version_tuple = (4, 3, 6)
20+
__version__ = version = '4.3.7'
21+
__version_tuple__ = version_tuple = (4, 3, 7)

src/pip/_vendor/vendor.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ distlib==0.3.9
33
distro==1.9.0
44
msgpack==1.1.0
55
packaging==24.2
6-
platformdirs==4.3.6
6+
platformdirs==4.3.7
77
pyproject-hooks==1.2.0
88
requests==2.32.3
99
certifi==2025.1.31

0 commit comments

Comments
 (0)