basedpyright 1.40.1 → 1.40.2
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.
- package/dist/pyright-langserver.js +1 -1
- package/dist/pyright.js +1 -1
- package/dist/typeshed-fallback/stdlib/_blake2.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/_curses.pyi +81 -54
- package/dist/typeshed-fallback/stdlib/_curses_panel.pyi +8 -1
- package/dist/typeshed-fallback/stdlib/_decimal.pyi +9 -6
- package/dist/typeshed-fallback/stdlib/_interpqueues.pyi +24 -36
- package/dist/typeshed-fallback/stdlib/_interpreters.pyi +26 -71
- package/dist/typeshed-fallback/stdlib/_json.pyi +15 -11
- package/dist/typeshed-fallback/stdlib/_remote_debugging.pyi +355 -72
- package/dist/typeshed-fallback/stdlib/_socket.pyi +21 -21
- package/dist/typeshed-fallback/stdlib/_sqlite3.pyi +0 -15
- package/dist/typeshed-fallback/stdlib/_struct.pyi +39 -42
- package/dist/typeshed-fallback/stdlib/_thread.pyi +18 -14
- package/dist/typeshed-fallback/stdlib/array.pyi +8 -4
- package/dist/typeshed-fallback/stdlib/ast.pyi +9 -3
- package/dist/typeshed-fallback/stdlib/binascii.pyi +113 -10
- package/dist/typeshed-fallback/stdlib/builtins.pyi +260 -43
- package/dist/typeshed-fallback/stdlib/collections/__init__.pyi +12 -4
- package/dist/typeshed-fallback/stdlib/dataclasses.pyi +3 -1
- package/dist/typeshed-fallback/stdlib/datetime.pyi +93 -25
- package/dist/typeshed-fallback/stdlib/decimal.pyi +272 -208
- package/dist/typeshed-fallback/stdlib/faulthandler.pyi +29 -4
- package/dist/typeshed-fallback/stdlib/fcntl.pyi +6 -12
- package/dist/typeshed-fallback/stdlib/importlib/metadata/__init__.pyi +2 -0
- package/dist/typeshed-fallback/stdlib/json/encoder.pyi +2 -10
- package/dist/typeshed-fallback/stdlib/marshal.pyi +33 -2
- package/dist/typeshed-fallback/stdlib/math/__init__.pyi +15 -7
- package/dist/typeshed-fallback/stdlib/math/integer.pyi +43 -8
- package/dist/typeshed-fallback/stdlib/mmap.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/os/__init__.pyi +60 -4
- package/dist/typeshed-fallback/stdlib/posixpath.pyi +14 -2
- package/dist/typeshed-fallback/stdlib/profiling/__init__.pyi +3 -3
- package/dist/typeshed-fallback/stdlib/profiling/sampling/__init__.pyi +17 -17
- package/dist/typeshed-fallback/stdlib/profiling/sampling/collector.pyi +25 -25
- package/dist/typeshed-fallback/stdlib/profiling/sampling/gecko_collector.pyi +111 -111
- package/dist/typeshed-fallback/stdlib/profiling/sampling/heatmap_collector.pyi +24 -24
- package/dist/typeshed-fallback/stdlib/profiling/sampling/jsonl_collector.pyi +15 -15
- package/dist/typeshed-fallback/stdlib/profiling/sampling/pstats_collector.pyi +17 -17
- package/dist/typeshed-fallback/stdlib/profiling/sampling/stack_collector.pyi +39 -39
- package/dist/typeshed-fallback/stdlib/profiling/sampling/string_table.pyi +5 -5
- package/dist/typeshed-fallback/stdlib/profiling/tracing.pyi +9 -9
- package/dist/typeshed-fallback/stdlib/pyexpat/__init__.pyi +24 -18
- package/dist/typeshed-fallback/stdlib/re.pyi +18 -3
- package/dist/typeshed-fallback/stdlib/select.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/signal.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/sqlite3/__init__.pyi +28 -5
- package/dist/typeshed-fallback/stdlib/sys/__init__.pyi +42 -4
- package/dist/typeshed-fallback/stdlib/types.pyi +44 -14
- package/dist/typeshed-fallback/stdlib/unicodedata.pyi +27 -9
- package/dist/typeshed-fallback/stdlib/urllib/parse.pyi +132 -6
- package/dist/typeshed-fallback/stdlib/winreg.pyi +5 -0
- package/dist/typeshed-fallback/stdlib/xml/utils.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/zlib.pyi +34 -2
- package/package.json +1 -1
|
@@ -29,6 +29,7 @@ last_traceback -- traceback of last uncaught exception
|
|
|
29
29
|
|
|
30
30
|
Static objects:
|
|
31
31
|
|
|
32
|
+
abi_info -- Python ABI information.
|
|
32
33
|
builtin_module_names -- tuple of module names built into this interpreter
|
|
33
34
|
copyright -- copyright notice pertaining to this interpreter
|
|
34
35
|
exec_prefix -- prefix used to find the machine-specific Python library
|
|
@@ -566,8 +567,21 @@ def getfilesystemencodeerrors() -> LiteralString:
|
|
|
566
567
|
...
|
|
567
568
|
|
|
568
569
|
if sys.version_info >= (3, 15):
|
|
569
|
-
def get_lazy_imports() -> _LazyImportMode:
|
|
570
|
-
|
|
570
|
+
def get_lazy_imports() -> _LazyImportMode:
|
|
571
|
+
"""
|
|
572
|
+
Gets the global lazy imports mode.
|
|
573
|
+
|
|
574
|
+
Returns "all" if all top level imports are potentially lazy.
|
|
575
|
+
Returns "normal" if only explicitly marked imports are lazy.
|
|
576
|
+
"""
|
|
577
|
+
...
|
|
578
|
+
def get_lazy_imports_filter() -> _LazyImportFilter | None:
|
|
579
|
+
"""
|
|
580
|
+
Get the current lazy imports filter callback.
|
|
581
|
+
|
|
582
|
+
Returns the filter callable or None if no filter is set.
|
|
583
|
+
"""
|
|
584
|
+
...
|
|
571
585
|
|
|
572
586
|
def getrefcount(object: Any, /) -> int:
|
|
573
587
|
"""
|
|
@@ -830,8 +844,32 @@ def get_int_max_str_digits() -> int:
|
|
|
830
844
|
...
|
|
831
845
|
|
|
832
846
|
if sys.version_info >= (3, 15):
|
|
833
|
-
def set_lazy_imports(mode: _LazyImportMode) -> None:
|
|
834
|
-
|
|
847
|
+
def set_lazy_imports(mode: _LazyImportMode) -> None:
|
|
848
|
+
"""
|
|
849
|
+
Sets the global lazy imports mode.
|
|
850
|
+
|
|
851
|
+
The mode parameter must be one of the following strings:
|
|
852
|
+
- "all": All top-level imports become potentially lazy
|
|
853
|
+
- "normal": Only explicitly marked imports (with 'lazy' keyword) are
|
|
854
|
+
lazy
|
|
855
|
+
|
|
856
|
+
In addition to the mode, lazy imports can be controlled via the filter
|
|
857
|
+
provided to sys.set_lazy_imports_filter
|
|
858
|
+
"""
|
|
859
|
+
...
|
|
860
|
+
def set_lazy_imports_filter(filter: _LazyImportFilter | None) -> None:
|
|
861
|
+
"""
|
|
862
|
+
Set the lazy imports filter callback.
|
|
863
|
+
|
|
864
|
+
The filter is a callable which disables lazy imports when they
|
|
865
|
+
would otherwise be enabled. Returns True if the import is still enabled
|
|
866
|
+
or False to disable it. The callable is called with:
|
|
867
|
+
|
|
868
|
+
(importing_module_name, resolved_imported_module_name, [fromlist])
|
|
869
|
+
|
|
870
|
+
Pass None to clear the filter.
|
|
871
|
+
"""
|
|
872
|
+
...
|
|
835
873
|
|
|
836
874
|
if sys.version_info >= (3, 12):
|
|
837
875
|
if sys.version_info >= (3, 13):
|
|
@@ -436,11 +436,10 @@ class CellType:
|
|
|
436
436
|
"""
|
|
437
437
|
Create a new cell object.
|
|
438
438
|
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
raise a ValueError.
|
|
439
|
+
contents
|
|
440
|
+
the contents of the cell. If not specified, the cell will be empty,
|
|
441
|
+
and further attempts to access its cell_contents attribute will
|
|
442
|
+
raise a ValueError.
|
|
444
443
|
"""
|
|
445
444
|
def __new__(cls, contents: object = ..., /) -> Self: ...
|
|
446
445
|
__hash__: ClassVar[None] # type: ignore[assignment]
|
|
@@ -467,7 +466,9 @@ class GeneratorType(Generator[_YieldT_co, _SendT_contra, _ReturnT_co]):
|
|
|
467
466
|
def gi_suspended(self) -> bool: ...
|
|
468
467
|
if sys.version_info >= (3, 15):
|
|
469
468
|
@property
|
|
470
|
-
def gi_state(self) -> Literal["GEN_CREATED", "GEN_SUSPENDED", "GEN_RUNNING", "GEN_CLOSED"]:
|
|
469
|
+
def gi_state(self) -> Literal["GEN_CREATED", "GEN_SUSPENDED", "GEN_RUNNING", "GEN_CLOSED"]:
|
|
470
|
+
"""state of the generator"""
|
|
471
|
+
...
|
|
471
472
|
__name__: str
|
|
472
473
|
__qualname__: str
|
|
473
474
|
def __iter__(self) -> Self:
|
|
@@ -534,7 +535,9 @@ class AsyncGeneratorType(AsyncGenerator[_YieldT_co, _SendT_contra]):
|
|
|
534
535
|
def ag_suspended(self) -> bool: ...
|
|
535
536
|
if sys.version_info >= (3, 15):
|
|
536
537
|
@property
|
|
537
|
-
def ag_state(self) -> Literal["AGEN_CREATED", "AGEN_SUSPENDED", "AGEN_RUNNING", "AGEN_CLOSED"]:
|
|
538
|
+
def ag_state(self) -> Literal["AGEN_CREATED", "AGEN_SUSPENDED", "AGEN_RUNNING", "AGEN_CLOSED"]:
|
|
539
|
+
"""state of the async generator"""
|
|
540
|
+
...
|
|
538
541
|
|
|
539
542
|
def __aiter__(self) -> Self:
|
|
540
543
|
"""Return an awaitable, that resolves in asynchronous iterator."""
|
|
@@ -603,7 +606,9 @@ class CoroutineType(Coroutine[_YieldT_co, _SendT_nd_contra, _ReturnT_nd_co]):
|
|
|
603
606
|
def cr_suspended(self) -> bool: ...
|
|
604
607
|
if sys.version_info >= (3, 15):
|
|
605
608
|
@property
|
|
606
|
-
def cr_state(self) -> Literal["CORO_CREATED", "CORO_SUSPENDED", "CORO_RUNNING", "CORO_CLOSED"]:
|
|
609
|
+
def cr_state(self) -> Literal["CORO_CREATED", "CORO_SUSPENDED", "CORO_RUNNING", "CORO_CLOSED"]:
|
|
610
|
+
"""state of the coroutine"""
|
|
611
|
+
...
|
|
607
612
|
|
|
608
613
|
def close(self) -> None:
|
|
609
614
|
"""close() -> raise GeneratorExit inside coroutine."""
|
|
@@ -819,7 +824,9 @@ class FrameType:
|
|
|
819
824
|
|
|
820
825
|
if sys.version_info >= (3, 15):
|
|
821
826
|
@property
|
|
822
|
-
def f_locals(self) -> FrameLocalsProxyType | dict[str, Any]:
|
|
827
|
+
def f_locals(self) -> FrameLocalsProxyType | dict[str, Any]:
|
|
828
|
+
"""Return the mapping used by the frame to look up local variables."""
|
|
829
|
+
...
|
|
823
830
|
else:
|
|
824
831
|
@property
|
|
825
832
|
def f_locals(self) -> dict[str, Any]:
|
|
@@ -841,12 +848,26 @@ class FrameType:
|
|
|
841
848
|
if sys.version_info >= (3, 15):
|
|
842
849
|
@final
|
|
843
850
|
class FrameLocalsProxyType(MutableMapping[str, Any]):
|
|
851
|
+
"""
|
|
852
|
+
Create a write-through view of the locals dictionary for a frame.
|
|
853
|
+
|
|
854
|
+
frame
|
|
855
|
+
the frame object to wrap.
|
|
856
|
+
"""
|
|
844
857
|
def __new__(cls, frame: FrameType, /) -> Self: ...
|
|
845
858
|
def __getitem__(self, key: str, /) -> Any: ...
|
|
846
|
-
def __setitem__(self, key: str, value: Any, /) -> None:
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
def
|
|
859
|
+
def __setitem__(self, key: str, value: Any, /) -> None:
|
|
860
|
+
"""Set self[key] to value."""
|
|
861
|
+
...
|
|
862
|
+
def __delitem__(self, key: str, /) -> None:
|
|
863
|
+
"""Delete self[key]."""
|
|
864
|
+
...
|
|
865
|
+
def __iter__(self) -> Iterator[str]:
|
|
866
|
+
"""Implement iter(self)."""
|
|
867
|
+
...
|
|
868
|
+
def __len__(self) -> int:
|
|
869
|
+
"""Return len(self)."""
|
|
870
|
+
...
|
|
850
871
|
def __contains__(self, key: object, /) -> bool: ...
|
|
851
872
|
def __reversed__(self) -> Iterator[str]: ...
|
|
852
873
|
def copy(self) -> dict[str, Any]: ...
|
|
@@ -856,9 +877,18 @@ if sys.version_info >= (3, 15):
|
|
|
856
877
|
|
|
857
878
|
@final
|
|
858
879
|
class LazyImportType:
|
|
880
|
+
"""
|
|
881
|
+
Represents a lazy import that will be resolved on first use.
|
|
882
|
+
|
|
883
|
+
Instances of this object accessed from the global scope will be
|
|
884
|
+
automatically imported based upon their name and then replaced with
|
|
885
|
+
the imported value.
|
|
886
|
+
"""
|
|
859
887
|
@property
|
|
860
888
|
def __name__(self) -> str: ...
|
|
861
|
-
def resolve(self) -> Any:
|
|
889
|
+
def resolve(self) -> Any:
|
|
890
|
+
"""Resolve the lazy import and return the imported object."""
|
|
891
|
+
...
|
|
862
892
|
|
|
863
893
|
@final
|
|
864
894
|
class GetSetDescriptorType:
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
This module provides access to the Unicode Character Database which
|
|
3
3
|
defines character properties for all Unicode characters. The data in
|
|
4
4
|
this database is based on the UnicodeData.txt file version
|
|
5
|
-
|
|
5
|
+
17.0.0 which is publicly available from ftp://ftp.unicode.org/.
|
|
6
6
|
|
|
7
7
|
The module uses the same names and symbols as defined by the
|
|
8
|
-
UnicodeData File Format
|
|
8
|
+
UnicodeData File Format 17.0.0.
|
|
9
9
|
"""
|
|
10
10
|
|
|
11
11
|
import sys
|
|
@@ -102,13 +102,31 @@ def is_normalized(form: _NormalizationForm, unistr: str, /) -> bool:
|
|
|
102
102
|
...
|
|
103
103
|
|
|
104
104
|
if sys.version_info >= (3, 15):
|
|
105
|
-
def block(chr: str, /) -> str:
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
def
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
def
|
|
105
|
+
def block(chr: str, /) -> str:
|
|
106
|
+
"""Return block assigned to the character chr."""
|
|
107
|
+
...
|
|
108
|
+
def extended_pictographic(chr: str, /) -> bool:
|
|
109
|
+
"""Returns the Extended_Pictographic property assigned to the character, as boolean."""
|
|
110
|
+
...
|
|
111
|
+
def grapheme_cluster_break(chr: str, /) -> str:
|
|
112
|
+
"""Returns the Grapheme_Cluster_Break property assigned to the character."""
|
|
113
|
+
...
|
|
114
|
+
def indic_conjunct_break(chr: str, /) -> str:
|
|
115
|
+
"""Returns the Indic_Conjunct_Break property assigned to the character."""
|
|
116
|
+
...
|
|
117
|
+
def isxidstart(chr: str, /) -> bool:
|
|
118
|
+
"""Return True if the character has the XID_Start property, else False."""
|
|
119
|
+
...
|
|
120
|
+
def isxidcontinue(chr: str, /) -> bool:
|
|
121
|
+
"""Return True if the character has the XID_Continue property, else False."""
|
|
122
|
+
...
|
|
123
|
+
def iter_graphemes(unistr: str, start: int = 0, end: int = sys.maxsize, /) -> Iterator[str]:
|
|
124
|
+
"""
|
|
125
|
+
Returns an iterator to iterate over grapheme clusters.
|
|
126
|
+
|
|
127
|
+
It uses extended grapheme cluster rules from TR29.
|
|
128
|
+
"""
|
|
129
|
+
...
|
|
112
130
|
|
|
113
131
|
def lookup(name: str | ReadOnlyBuffer, /) -> str:
|
|
114
132
|
"""
|
|
@@ -344,11 +344,53 @@ if sys.version_info >= (3, 15):
|
|
|
344
344
|
@overload
|
|
345
345
|
def urlsplit(
|
|
346
346
|
url: str, scheme: str = "", allow_fragments: bool = True, *, missing_as_none: Literal[True]
|
|
347
|
-
) -> SplitResult[str | None]:
|
|
347
|
+
) -> SplitResult[str | None]:
|
|
348
|
+
"""
|
|
349
|
+
Parse a URL into 5 components:
|
|
350
|
+
<scheme>://<netloc>/<path>?<query>#<fragment>
|
|
351
|
+
|
|
352
|
+
The result is a named 5-tuple with fields corresponding to the
|
|
353
|
+
above. It is either a SplitResult or SplitResultBytes object,
|
|
354
|
+
depending on the type of the url parameter.
|
|
355
|
+
|
|
356
|
+
The username, password, hostname, and port sub-components of netloc
|
|
357
|
+
can also be accessed as attributes of the returned object.
|
|
358
|
+
|
|
359
|
+
The scheme argument provides the default value of the scheme
|
|
360
|
+
component when no scheme is found in url.
|
|
361
|
+
|
|
362
|
+
If allow_fragments is False, no attempt is made to separate the
|
|
363
|
+
fragment component from the previous component, which can be either
|
|
364
|
+
path or query.
|
|
365
|
+
|
|
366
|
+
Note that % escapes are not expanded.
|
|
367
|
+
"""
|
|
368
|
+
...
|
|
348
369
|
@overload
|
|
349
370
|
def urlsplit(
|
|
350
371
|
url: str, scheme: str = "", allow_fragments: bool = True, *, missing_as_none: Literal[False] = False
|
|
351
|
-
) -> SplitResult[str]:
|
|
372
|
+
) -> SplitResult[str]:
|
|
373
|
+
"""
|
|
374
|
+
Parse a URL into 5 components:
|
|
375
|
+
<scheme>://<netloc>/<path>?<query>#<fragment>
|
|
376
|
+
|
|
377
|
+
The result is a named 5-tuple with fields corresponding to the
|
|
378
|
+
above. It is either a SplitResult or SplitResultBytes object,
|
|
379
|
+
depending on the type of the url parameter.
|
|
380
|
+
|
|
381
|
+
The username, password, hostname, and port sub-components of netloc
|
|
382
|
+
can also be accessed as attributes of the returned object.
|
|
383
|
+
|
|
384
|
+
The scheme argument provides the default value of the scheme
|
|
385
|
+
component when no scheme is found in url.
|
|
386
|
+
|
|
387
|
+
If allow_fragments is False, no attempt is made to separate the
|
|
388
|
+
fragment component from the previous component, which can be either
|
|
389
|
+
path or query.
|
|
390
|
+
|
|
391
|
+
Note that % escapes are not expanded.
|
|
392
|
+
"""
|
|
393
|
+
...
|
|
352
394
|
@overload
|
|
353
395
|
def urlsplit(
|
|
354
396
|
url: bytes | None,
|
|
@@ -356,7 +398,28 @@ if sys.version_info >= (3, 15):
|
|
|
356
398
|
allow_fragments: bool = True,
|
|
357
399
|
*,
|
|
358
400
|
missing_as_none: Literal[True],
|
|
359
|
-
) -> SplitResultBytes[bytes | None]:
|
|
401
|
+
) -> SplitResultBytes[bytes | None]:
|
|
402
|
+
"""
|
|
403
|
+
Parse a URL into 5 components:
|
|
404
|
+
<scheme>://<netloc>/<path>?<query>#<fragment>
|
|
405
|
+
|
|
406
|
+
The result is a named 5-tuple with fields corresponding to the
|
|
407
|
+
above. It is either a SplitResult or SplitResultBytes object,
|
|
408
|
+
depending on the type of the url parameter.
|
|
409
|
+
|
|
410
|
+
The username, password, hostname, and port sub-components of netloc
|
|
411
|
+
can also be accessed as attributes of the returned object.
|
|
412
|
+
|
|
413
|
+
The scheme argument provides the default value of the scheme
|
|
414
|
+
component when no scheme is found in url.
|
|
415
|
+
|
|
416
|
+
If allow_fragments is False, no attempt is made to separate the
|
|
417
|
+
fragment component from the previous component, which can be either
|
|
418
|
+
path or query.
|
|
419
|
+
|
|
420
|
+
Note that % escapes are not expanded.
|
|
421
|
+
"""
|
|
422
|
+
...
|
|
360
423
|
@overload
|
|
361
424
|
def urlsplit(
|
|
362
425
|
url: bytes | None,
|
|
@@ -364,15 +427,78 @@ if sys.version_info >= (3, 15):
|
|
|
364
427
|
allow_fragments: bool = True,
|
|
365
428
|
*,
|
|
366
429
|
missing_as_none: Literal[False] = False,
|
|
367
|
-
) -> SplitResultBytes[bytes]:
|
|
430
|
+
) -> SplitResultBytes[bytes]:
|
|
431
|
+
"""
|
|
432
|
+
Parse a URL into 5 components:
|
|
433
|
+
<scheme>://<netloc>/<path>?<query>#<fragment>
|
|
434
|
+
|
|
435
|
+
The result is a named 5-tuple with fields corresponding to the
|
|
436
|
+
above. It is either a SplitResult or SplitResultBytes object,
|
|
437
|
+
depending on the type of the url parameter.
|
|
438
|
+
|
|
439
|
+
The username, password, hostname, and port sub-components of netloc
|
|
440
|
+
can also be accessed as attributes of the returned object.
|
|
441
|
+
|
|
442
|
+
The scheme argument provides the default value of the scheme
|
|
443
|
+
component when no scheme is found in url.
|
|
444
|
+
|
|
445
|
+
If allow_fragments is False, no attempt is made to separate the
|
|
446
|
+
fragment component from the previous component, which can be either
|
|
447
|
+
path or query.
|
|
448
|
+
|
|
449
|
+
Note that % escapes are not expanded.
|
|
450
|
+
"""
|
|
451
|
+
...
|
|
368
452
|
@overload
|
|
369
453
|
def urlsplit(
|
|
370
454
|
url: str, scheme: str = "", allow_fragments: bool = True, *, missing_as_none: bool
|
|
371
|
-
) -> SplitResult[str | None]:
|
|
455
|
+
) -> SplitResult[str | None]:
|
|
456
|
+
"""
|
|
457
|
+
Parse a URL into 5 components:
|
|
458
|
+
<scheme>://<netloc>/<path>?<query>#<fragment>
|
|
459
|
+
|
|
460
|
+
The result is a named 5-tuple with fields corresponding to the
|
|
461
|
+
above. It is either a SplitResult or SplitResultBytes object,
|
|
462
|
+
depending on the type of the url parameter.
|
|
463
|
+
|
|
464
|
+
The username, password, hostname, and port sub-components of netloc
|
|
465
|
+
can also be accessed as attributes of the returned object.
|
|
466
|
+
|
|
467
|
+
The scheme argument provides the default value of the scheme
|
|
468
|
+
component when no scheme is found in url.
|
|
469
|
+
|
|
470
|
+
If allow_fragments is False, no attempt is made to separate the
|
|
471
|
+
fragment component from the previous component, which can be either
|
|
472
|
+
path or query.
|
|
473
|
+
|
|
474
|
+
Note that % escapes are not expanded.
|
|
475
|
+
"""
|
|
476
|
+
...
|
|
372
477
|
@overload
|
|
373
478
|
def urlsplit(
|
|
374
479
|
url: bytes | None, scheme: bytes | None | Literal[""] = "", allow_fragments: bool = True, *, missing_as_none: bool
|
|
375
|
-
) -> SplitResultBytes[bytes | None]:
|
|
480
|
+
) -> SplitResultBytes[bytes | None]:
|
|
481
|
+
"""
|
|
482
|
+
Parse a URL into 5 components:
|
|
483
|
+
<scheme>://<netloc>/<path>?<query>#<fragment>
|
|
484
|
+
|
|
485
|
+
The result is a named 5-tuple with fields corresponding to the
|
|
486
|
+
above. It is either a SplitResult or SplitResultBytes object,
|
|
487
|
+
depending on the type of the url parameter.
|
|
488
|
+
|
|
489
|
+
The username, password, hostname, and port sub-components of netloc
|
|
490
|
+
can also be accessed as attributes of the returned object.
|
|
491
|
+
|
|
492
|
+
The scheme argument provides the default value of the scheme
|
|
493
|
+
component when no scheme is found in url.
|
|
494
|
+
|
|
495
|
+
If allow_fragments is False, no attempt is made to separate the
|
|
496
|
+
fragment component from the previous component, which can be either
|
|
497
|
+
path or query.
|
|
498
|
+
|
|
499
|
+
Note that % escapes are not expanded.
|
|
500
|
+
"""
|
|
501
|
+
...
|
|
376
502
|
|
|
377
503
|
if sys.version_info >= (3, 15):
|
|
378
504
|
# Requires an iterable of length 6
|
|
@@ -7,7 +7,9 @@ CloseKey() - Closes a registry key.
|
|
|
7
7
|
ConnectRegistry() - Establishes a connection to a predefined registry handle
|
|
8
8
|
on another computer.
|
|
9
9
|
CreateKey() - Creates the specified key, or opens it if it already exists.
|
|
10
|
+
CreateKeyEx() - Creates the specified key, or opens it if it already exists.
|
|
10
11
|
DeleteKey() - Deletes the specified key.
|
|
12
|
+
DeleteKeyEx() - Deletes the specified key.
|
|
11
13
|
DeleteValue() - Removes a named value from the specified registry key.
|
|
12
14
|
DeleteTree() - Deletes the specified key and all its subkeys and values recursively.
|
|
13
15
|
EnumKey() - Enumerates subkeys of the specified open registry key.
|
|
@@ -28,6 +30,9 @@ QueryInfoKey() - Returns information about the specified key.
|
|
|
28
30
|
SaveKey() - Saves the specified key, and all its subkeys a file.
|
|
29
31
|
SetValue() - Associates a value with a specified key.
|
|
30
32
|
SetValueEx() - Stores data in the value field of an open registry key.
|
|
33
|
+
DisableReflectionKey() - Disables registry reflection for 32bit processes running on a 64bit OS.
|
|
34
|
+
EnableReflectionKey() - Restores registry reflection for a key.
|
|
35
|
+
QueryReflectionKey() - Determines the reflection state for a key.
|
|
31
36
|
|
|
32
37
|
Special objects:
|
|
33
38
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
def is_valid_name(name: str) -> bool: ...
|
|
2
|
-
def is_valid_text(data: str) -> bool: ...
|
|
1
|
+
def is_valid_name(name: str) -> bool: ...
|
|
2
|
+
def is_valid_text(data: str) -> bool: ...
|
|
@@ -3,9 +3,11 @@ The functions in this module allow compression and decompression using the
|
|
|
3
3
|
zlib library, which is based on GNU zip.
|
|
4
4
|
|
|
5
5
|
adler32(string[, start]) -- Compute an Adler-32 checksum.
|
|
6
|
+
adler32_combine(adler1, adler2, len2, /) -- Combine two Adler-32 checksums.
|
|
6
7
|
compress(data[, level]) -- Compress data, with compression level 0-9 or -1.
|
|
7
8
|
compressobj([level[, ...]]) -- Return a compressor object.
|
|
8
9
|
crc32(string[, start]) -- Compute a CRC-32 checksum.
|
|
10
|
+
crc32_combine(crc1, crc2, len2, /) -- Combine two CRC-32 checksums.
|
|
9
11
|
decompress(string,[wbits],[bufsize]) -- Decompresses a compressed string.
|
|
10
12
|
decompressobj([wbits[, zdict]]) -- Return a decompressor object.
|
|
11
13
|
|
|
@@ -86,7 +88,22 @@ def adler32(data: ReadableBuffer, value: int = 1, /) -> int:
|
|
|
86
88
|
...
|
|
87
89
|
|
|
88
90
|
if sys.version_info >= (3, 15):
|
|
89
|
-
def adler32_combine(adler1: int, adler2: int, len2: int, /) -> int:
|
|
91
|
+
def adler32_combine(adler1: int, adler2: int, len2: int, /) -> int:
|
|
92
|
+
"""
|
|
93
|
+
Combine two Adler-32 checksums into one.
|
|
94
|
+
|
|
95
|
+
adler1
|
|
96
|
+
Adler-32 checksum for sequence A
|
|
97
|
+
adler2
|
|
98
|
+
Adler-32 checksum for sequence B
|
|
99
|
+
len2
|
|
100
|
+
Length of sequence B
|
|
101
|
+
|
|
102
|
+
Given the Adler-32 checksum 'adler1' of a sequence A and the
|
|
103
|
+
Adler-32 checksum 'adler2' of a sequence B of length 'len2',
|
|
104
|
+
return the Adler-32 checksum of A and B concatenated.
|
|
105
|
+
"""
|
|
106
|
+
...
|
|
90
107
|
|
|
91
108
|
if sys.version_info >= (3, 11):
|
|
92
109
|
def compress(data: ReadableBuffer, /, level: int = -1, wbits: int = 15) -> bytes:
|
|
@@ -155,7 +172,22 @@ def crc32(data: ReadableBuffer, value: int = 0, /) -> int:
|
|
|
155
172
|
...
|
|
156
173
|
|
|
157
174
|
if sys.version_info >= (3, 15):
|
|
158
|
-
def crc32_combine(crc1: int, crc2: int, len2: int, /) -> int:
|
|
175
|
+
def crc32_combine(crc1: int, crc2: int, len2: int, /) -> int:
|
|
176
|
+
"""
|
|
177
|
+
Combine two CRC-32 checksums into one.
|
|
178
|
+
|
|
179
|
+
crc1
|
|
180
|
+
CRC-32 checksum for sequence A
|
|
181
|
+
crc2
|
|
182
|
+
CRC-32 checksum for sequence B
|
|
183
|
+
len2
|
|
184
|
+
Length of sequence B
|
|
185
|
+
|
|
186
|
+
Given the CRC-32 checksum 'crc1' of a sequence A and the
|
|
187
|
+
CRC-32 checksum 'crc2' of a sequence B of length 'len2',
|
|
188
|
+
return the CRC-32 checksum of A and B concatenated.
|
|
189
|
+
"""
|
|
190
|
+
...
|
|
159
191
|
|
|
160
192
|
def decompress(data: ReadableBuffer, /, wbits: int = 15, bufsize: int = 16384) -> bytes:
|
|
161
193
|
"""
|
package/package.json
CHANGED