Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c85f7de

Browse filesBrowse files
authored
Update csv stubs for Python3.12 (#10250)
1 parent 628c88d commit c85f7de
Copy full SHA for c85f7de

2 files changed

+9Lines changed: 9 additions & 0 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎stdlib/_csv.pyi‎

Copy file name to clipboardExpand all lines: stdlib/_csv.pyi
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import sys
12
from _typeshed import SupportsWrite
23
from collections.abc import Iterable, Iterator
34
from typing import Any
@@ -9,6 +10,9 @@ QUOTE_ALL: Literal[1]
910
QUOTE_MINIMAL: Literal[0]
1011
QUOTE_NONE: Literal[3]
1112
QUOTE_NONNUMERIC: Literal[2]
13+
if sys.version_info >= (3, 12):
14+
QUOTE_STRINGS: Literal[4]
15+
QUOTE_NOTNULL: Literal[5]
1216

1317
# Ideally this would be `QUOTE_ALL | QUOTE_MINIMAL | QUOTE_NONE | QUOTE_NONNUMERIC`
1418
# However, using literals in situations like these can cause false-positives (see #7258)
Collapse file

‎stdlib/csv.pyi‎

Copy file name to clipboardExpand all lines: stdlib/csv.pyi
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ from _csv import (
2121
unregister_dialect as unregister_dialect,
2222
writer as writer,
2323
)
24+
25+
if sys.version_info >= (3, 12):
26+
from _csv import QUOTE_STRINGS as QUOTE_STRINGS, QUOTE_NOTNULL as QUOTE_NOTNULL
2427
from _typeshed import SupportsWrite
2528
from collections.abc import Collection, Iterable, Iterator, Mapping, Sequence
2629
from typing import Any, Generic, TypeVar, overload
@@ -57,6 +60,8 @@ __all__ = [
5760
"DictWriter",
5861
"unix_dialect",
5962
]
63+
if sys.version_info >= (3, 12):
64+
__all__ += ["QUOTE_STRINGS", "QUOTE_NOTNULL"]
6065

6166
_T = TypeVar("_T")
6267

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.