From 22c3cc4d0b7ae87092ef2ecba63b3555ea9836a9 Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Tue, 22 Feb 2022 18:12:43 +0000 Subject: [PATCH] Add `csv.__version__` (#7357) --- stdlib/_csv.pyi | 2 ++ stdlib/csv.pyi | 1 + tests/stubtest_allowlists/py3_common.txt | 1 - 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/stdlib/_csv.pyi b/stdlib/_csv.pyi index 051a5fb81..161a89778 100644 --- a/stdlib/_csv.pyi +++ b/stdlib/_csv.pyi @@ -1,6 +1,8 @@ from typing import Any, Iterable, Iterator, Protocol, Union from typing_extensions import Literal +__version__: str + QUOTE_ALL: Literal[1] QUOTE_MINIMAL: Literal[0] QUOTE_NONE: Literal[3] diff --git a/stdlib/csv.pyi b/stdlib/csv.pyi index 991aff601..dcb3f19be 100644 --- a/stdlib/csv.pyi +++ b/stdlib/csv.pyi @@ -6,6 +6,7 @@ from _csv import ( QUOTE_NONNUMERIC as QUOTE_NONNUMERIC, Dialect as Dialect, Error as Error, + __version__ as __version__, _DialectLike, _reader, _writer, diff --git a/tests/stubtest_allowlists/py3_common.txt b/tests/stubtest_allowlists/py3_common.txt index 496bca690..472696c7b 100644 --- a/tests/stubtest_allowlists/py3_common.txt +++ b/tests/stubtest_allowlists/py3_common.txt @@ -65,7 +65,6 @@ configparser.SectionProxy.getboolean configparser.SectionProxy.getfloat configparser.SectionProxy.getint copy.PyStringMap # defined only in Jython -csv.__version__ # Always "1.0". Using this is likely a bug. #6398 # The Dialect properties are initialized as None in Dialect but their values are enforced in _Dialect csv.Dialect.delimiter csv.Dialect.doublequote