diff options
| author | shadchin <[email protected]> | 2022-02-10 16:44:39 +0300 | 
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:44:39 +0300 | 
| commit | e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (patch) | |
| tree | 64175d5cadab313b3e7039ebaa06c5bc3295e274 /contrib/python/py | |
| parent | 2598ef1d0aee359b4b6d5fdd1758916d5907d04f (diff) | |
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'contrib/python/py')
24 files changed, 829 insertions, 829 deletions
| diff --git a/contrib/python/py/.dist-info/METADATA b/contrib/python/py/.dist-info/METADATA index 9073d68f46b..a14febeb807 100644 --- a/contrib/python/py/.dist-info/METADATA +++ b/contrib/python/py/.dist-info/METADATA @@ -1,69 +1,69 @@ -Metadata-Version: 2.1  -Name: py  +Metadata-Version: 2.1 +Name: py  Version: 1.11.0 -Summary: library with cross-python path, ini-parsing, io, code, log facilities  -Home-page: https://py.readthedocs.io/  -Author: holger krekel, Ronny Pfannschmidt, Benjamin Peterson and others  -Author-email: [email protected]  -License: MIT license  -Platform: unix  -Platform: linux  -Platform: osx  -Platform: cygwin  -Platform: win32  -Classifier: Development Status :: 6 - Mature  -Classifier: Intended Audience :: Developers  -Classifier: License :: OSI Approved :: MIT License  -Classifier: Operating System :: POSIX  -Classifier: Operating System :: Microsoft :: Windows  -Classifier: Operating System :: MacOS :: MacOS X  -Classifier: Topic :: Software Development :: Testing  -Classifier: Topic :: Software Development :: Libraries  -Classifier: Topic :: Utilities  -Classifier: Programming Language :: Python  -Classifier: Programming Language :: Python :: 2  -Classifier: Programming Language :: Python :: 2.7  -Classifier: Programming Language :: Python :: 3  -Classifier: Programming Language :: Python :: 3.5  -Classifier: Programming Language :: Python :: 3.6  -Classifier: Programming Language :: Python :: 3.7  +Summary: library with cross-python path, ini-parsing, io, code, log facilities +Home-page: https://py.readthedocs.io/ +Author: holger krekel, Ronny Pfannschmidt, Benjamin Peterson and others +Author-email: [email protected] +License: MIT license +Platform: unix +Platform: linux +Platform: osx +Platform: cygwin +Platform: win32 +Classifier: Development Status :: 6 - Mature +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: MIT License +Classifier: Operating System :: POSIX +Classifier: Operating System :: Microsoft :: Windows +Classifier: Operating System :: MacOS :: MacOS X +Classifier: Topic :: Software Development :: Testing +Classifier: Topic :: Software Development :: Libraries +Classifier: Topic :: Utilities +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 2 +Classifier: Programming Language :: Python :: 2.7 +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3.5 +Classifier: Programming Language :: Python :: 3.6 +Classifier: Programming Language :: Python :: 3.7  Classifier: Programming Language :: Python :: 3.8  Classifier: Programming Language :: Python :: 3.9  Classifier: Programming Language :: Python :: 3.10 -Classifier: Programming Language :: Python :: Implementation :: CPython  -Classifier: Programming Language :: Python :: Implementation :: PyPy  +Classifier: Programming Language :: Python :: Implementation :: CPython +Classifier: Programming Language :: Python :: Implementation :: PyPy  Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.* -  -.. image:: https://img.shields.io/pypi/v/py.svg  -    :target: https://pypi.org/project/py  -  -.. image:: https://img.shields.io/conda/vn/conda-forge/py.svg  -    :target: https://anaconda.org/conda-forge/py  -  -.. image:: https://img.shields.io/pypi/pyversions/py.svg  -  :target: https://pypi.org/project/py  -  -.. image:: https://github.com/pytest-dev/py/workflows/build/badge.svg  -  :target: https://github.com/pytest-dev/py/actions  -  -  -**NOTE**: this library is in **maintenance mode** and should not be used in new code.  -  -The py lib is a Python development support library featuring  -the following tools and modules:  -  -* ``py.path``:  uniform local and svn path objects  -> please use pathlib/pathlib2 instead  -* ``py.apipkg``:  explicit API control and lazy-importing -> please use the standalone package instead  -* ``py.iniconfig``:  easy parsing of .ini files -> please use the standalone package instead  -* ``py.code``: dynamic code generation and introspection (deprecated, moved to ``pytest`` as a implementation detail).  -  -**NOTE**: prior to the 1.4 release this distribution used to  -contain py.test which is now its own package, see https://docs.pytest.org  -  -For questions and more information please visit https://py.readthedocs.io  -  -Bugs and issues: https://github.com/pytest-dev/py  -  -Authors: Holger Krekel and others, 2004-2017  -  -  + +.. image:: https://img.shields.io/pypi/v/py.svg +    :target: https://pypi.org/project/py + +.. image:: https://img.shields.io/conda/vn/conda-forge/py.svg +    :target: https://anaconda.org/conda-forge/py + +.. image:: https://img.shields.io/pypi/pyversions/py.svg +  :target: https://pypi.org/project/py + +.. image:: https://github.com/pytest-dev/py/workflows/build/badge.svg +  :target: https://github.com/pytest-dev/py/actions + + +**NOTE**: this library is in **maintenance mode** and should not be used in new code. + +The py lib is a Python development support library featuring +the following tools and modules: + +* ``py.path``:  uniform local and svn path objects  -> please use pathlib/pathlib2 instead +* ``py.apipkg``:  explicit API control and lazy-importing -> please use the standalone package instead +* ``py.iniconfig``:  easy parsing of .ini files -> please use the standalone package instead +* ``py.code``: dynamic code generation and introspection (deprecated, moved to ``pytest`` as a implementation detail). + +**NOTE**: prior to the 1.4 release this distribution used to +contain py.test which is now its own package, see https://docs.pytest.org + +For questions and more information please visit https://py.readthedocs.io + +Bugs and issues: https://github.com/pytest-dev/py + +Authors: Holger Krekel and others, 2004-2017 + + diff --git a/contrib/python/py/.dist-info/top_level.txt b/contrib/python/py/.dist-info/top_level.txt index a860193292c..edfce786a4d 100644 --- a/contrib/python/py/.dist-info/top_level.txt +++ b/contrib/python/py/.dist-info/top_level.txt @@ -1 +1 @@ -py  +py diff --git a/contrib/python/py/.yandex_meta/yamaker.yaml b/contrib/python/py/.yandex_meta/yamaker.yaml index 0bdb5ace6a8..df284fbe184 100644 --- a/contrib/python/py/.yandex_meta/yamaker.yaml +++ b/contrib/python/py/.yandex_meta/yamaker.yaml @@ -1,2 +1,2 @@ -mark_as_sources:  -- py/test.py  +mark_as_sources: +- py/test.py diff --git a/contrib/python/py/AUTHORS b/contrib/python/py/AUTHORS index 6073101f9ab..9c5dda9ceb0 100644 --- a/contrib/python/py/AUTHORS +++ b/contrib/python/py/AUTHORS @@ -1,25 +1,25 @@ -Holger Krekel, holger at merlinux eu  -Benjamin Peterson, benjamin at python org  -Ronny Pfannschmidt, Ronny.Pfannschmidt at gmx de  -Guido Wesdorp, johnny at johnnydebris net   -Samuele Pedroni, pedronis at openend se   -Carl Friedrich Bolz, cfbolz at gmx de  -Armin Rigo, arigo at tunes org   -Maciek Fijalkowski, fijal at genesilico pl  -Brian Dorsey, briandorsey at gmail com   -Floris Bruynooghe, flub at devork be  -merlinux GmbH, Germany, office at merlinux eu  -  -Contributors include::   -  -Ross Lawley  -Ralf Schmitt  -Chris Lamb   -Harald Armin Massa  -Martijn Faassen  -Ian Bicking   -Jan Balster  -Grig Gheorghiu  -Bob Ippolito  -Christian Tismer  -Wim Glenn  +Holger Krekel, holger at merlinux eu +Benjamin Peterson, benjamin at python org +Ronny Pfannschmidt, Ronny.Pfannschmidt at gmx de +Guido Wesdorp, johnny at johnnydebris net  +Samuele Pedroni, pedronis at openend se  +Carl Friedrich Bolz, cfbolz at gmx de +Armin Rigo, arigo at tunes org  +Maciek Fijalkowski, fijal at genesilico pl +Brian Dorsey, briandorsey at gmail com  +Floris Bruynooghe, flub at devork be +merlinux GmbH, Germany, office at merlinux eu + +Contributors include::  + +Ross Lawley +Ralf Schmitt +Chris Lamb  +Harald Armin Massa +Martijn Faassen +Ian Bicking  +Jan Balster +Grig Gheorghiu +Bob Ippolito +Christian Tismer +Wim Glenn diff --git a/contrib/python/py/README.rst b/contrib/python/py/README.rst index f72bfde6c38..80800b2b7ae 100644 --- a/contrib/python/py/README.rst +++ b/contrib/python/py/README.rst @@ -1,31 +1,31 @@ -.. image:: https://img.shields.io/pypi/v/py.svg  -    :target: https://pypi.org/project/py  -  -.. image:: https://img.shields.io/conda/vn/conda-forge/py.svg  -    :target: https://anaconda.org/conda-forge/py  -  -.. image:: https://img.shields.io/pypi/pyversions/py.svg  -  :target: https://pypi.org/project/py  -  -.. image:: https://github.com/pytest-dev/py/workflows/build/badge.svg  -  :target: https://github.com/pytest-dev/py/actions  -  -  -**NOTE**: this library is in **maintenance mode** and should not be used in new code.  -  -The py lib is a Python development support library featuring  -the following tools and modules:  -  -* ``py.path``:  uniform local and svn path objects  -> please use pathlib/pathlib2 instead  -* ``py.apipkg``:  explicit API control and lazy-importing -> please use the standalone package instead  -* ``py.iniconfig``:  easy parsing of .ini files -> please use the standalone package instead  -* ``py.code``: dynamic code generation and introspection (deprecated, moved to ``pytest`` as a implementation detail).  -  -**NOTE**: prior to the 1.4 release this distribution used to  -contain py.test which is now its own package, see https://docs.pytest.org  -  -For questions and more information please visit https://py.readthedocs.io  -  -Bugs and issues: https://github.com/pytest-dev/py  -  -Authors: Holger Krekel and others, 2004-2017  +.. image:: https://img.shields.io/pypi/v/py.svg +    :target: https://pypi.org/project/py + +.. image:: https://img.shields.io/conda/vn/conda-forge/py.svg +    :target: https://anaconda.org/conda-forge/py + +.. image:: https://img.shields.io/pypi/pyversions/py.svg +  :target: https://pypi.org/project/py + +.. image:: https://github.com/pytest-dev/py/workflows/build/badge.svg +  :target: https://github.com/pytest-dev/py/actions + + +**NOTE**: this library is in **maintenance mode** and should not be used in new code. + +The py lib is a Python development support library featuring +the following tools and modules: + +* ``py.path``:  uniform local and svn path objects  -> please use pathlib/pathlib2 instead +* ``py.apipkg``:  explicit API control and lazy-importing -> please use the standalone package instead +* ``py.iniconfig``:  easy parsing of .ini files -> please use the standalone package instead +* ``py.code``: dynamic code generation and introspection (deprecated, moved to ``pytest`` as a implementation detail). + +**NOTE**: prior to the 1.4 release this distribution used to +contain py.test which is now its own package, see https://docs.pytest.org + +For questions and more information please visit https://py.readthedocs.io + +Bugs and issues: https://github.com/pytest-dev/py + +Authors: Holger Krekel and others, 2004-2017 diff --git a/contrib/python/py/patches/01-arcadia.patch b/contrib/python/py/patches/01-arcadia.patch index 8223e2e488a..5739c8689f6 100644 --- a/contrib/python/py/patches/01-arcadia.patch +++ b/contrib/python/py/patches/01-arcadia.patch @@ -1,27 +1,27 @@ ---- contrib/python/py/py/_vendored_packages/iniconfig/__init__.py	(working tree)  -+++ contrib/python/py/py/_vendored_packages/iniconfig/__init__.py	(index)  -@@ -1,6 +1,8 @@  - """ brain-dead simple parser for ini-style files.  - (C) Ronny Pfannschmidt, Holger Krekel -- MIT licensed  - """  -+import io  -+  - __all__ = ['IniConfig', 'ParseError']  -  - COMMENTCHARS = "#;"  -@@ -49,7 +51,14 @@  -     def __init__(self, path, data=None):  -         self.path = str(path)  # convenience  -         if data is None:  --            f = open(self.path)  -+            if self.path.startswith('pkg:'):  -+                import pkgutil  -+  -+                _, package, resource = self.path.split(':')  -+                content = pkgutil.get_data(package, resource)  -+                f = io.StringIO(content.decode('utf-8'))  -+            else:  -+                f = open(self.path)  -             try:  -                 tokens = self._parse(iter(f))  -             finally:  +--- contrib/python/py/py/_vendored_packages/iniconfig/__init__.py	(working tree) ++++ contrib/python/py/py/_vendored_packages/iniconfig/__init__.py	(index) +@@ -1,6 +1,8 @@ + """ brain-dead simple parser for ini-style files. + (C) Ronny Pfannschmidt, Holger Krekel -- MIT licensed + """ ++import io ++ + __all__ = ['IniConfig', 'ParseError'] + + COMMENTCHARS = "#;" +@@ -49,7 +51,14 @@ +     def __init__(self, path, data=None): +         self.path = str(path)  # convenience +         if data is None: +-            f = open(self.path) ++            if self.path.startswith('pkg:'): ++                import pkgutil ++ ++                _, package, resource = self.path.split(':') ++                content = pkgutil.get_data(package, resource) ++                f = io.StringIO(content.decode('utf-8')) ++            else: ++                f = open(self.path) +             try: +                 tokens = self._parse(iter(f)) +             finally: diff --git a/contrib/python/py/py/__init__.pyi b/contrib/python/py/py/__init__.pyi index 12a844c632b..96859e310f4 100644 --- a/contrib/python/py/py/__init__.pyi +++ b/contrib/python/py/py/__init__.pyi @@ -1,20 +1,20 @@ -from typing import Any  -  -# py allows to use e.g. py.path.local even without importing py.path.  -# So import implicitly.  -from . import error  -from . import iniconfig  -from . import path  -from . import io  -from . import xml  -  -__version__: str  -  -# Untyped modules below here.  -std: Any  -test: Any  -process: Any  -apipkg: Any  -code: Any  -builtin: Any  -log: Any  +from typing import Any + +# py allows to use e.g. py.path.local even without importing py.path. +# So import implicitly. +from . import error +from . import iniconfig +from . import path +from . import io +from . import xml + +__version__: str + +# Untyped modules below here. +std: Any +test: Any +process: Any +apipkg: Any +code: Any +builtin: Any +log: Any diff --git a/contrib/python/py/py/_builtin.py b/contrib/python/py/py/_builtin.py index 45e80901c55..ddc89fc7be6 100644 --- a/contrib/python/py/py/_builtin.py +++ b/contrib/python/py/py/_builtin.py @@ -1,21 +1,21 @@  import sys -# Passthrough for builtins supported with py27.  -BaseException = BaseException  -GeneratorExit = GeneratorExit  -_sysex = (KeyboardInterrupt, SystemExit, MemoryError, GeneratorExit)  -all = all  -any = any  -callable = callable  +# Passthrough for builtins supported with py27. +BaseException = BaseException +GeneratorExit = GeneratorExit +_sysex = (KeyboardInterrupt, SystemExit, MemoryError, GeneratorExit) +all = all +any = any +callable = callable  enumerate = enumerate -reversed = reversed  -set, frozenset = set, frozenset  -sorted = sorted  +reversed = reversed +set, frozenset = set, frozenset +sorted = sorted  if sys.version_info >= (3, 0): -    exec("print_ = print ; exec_=exec")  +    exec("print_ = print ; exec_=exec")      import builtins      # some backward compatibility helpers @@ -32,7 +32,7 @@ if sys.version_info >= (3, 0):      def _isbytes(x):          return isinstance(x, bytes) -  +      def _istext(x):          return isinstance(x, str) diff --git a/contrib/python/py/py/_io/capture.py b/contrib/python/py/py/_io/capture.py index 5801f1fcaea..cacf2fa71a1 100644 --- a/contrib/python/py/py/_io/capture.py +++ b/contrib/python/py/py/_io/capture.py @@ -13,7 +13,7 @@ if sys.version_info < (3,0):          def write(self, data):              if not isinstance(data, unicode):                  data = unicode(data, getattr(self, '_encoding', 'UTF-8'), 'replace') -            return StringIO.write(self, data)  +            return StringIO.write(self, data)  else:      TextIO = StringIO @@ -24,7 +24,7 @@ except ImportError:          def write(self, data):              if isinstance(data, unicode):                  raise TypeError("not a byte value: %r" %(data,)) -            return StringIO.write(self, data)  +            return StringIO.write(self, data)  patchsysdict = {0: 'stdin', 1: 'stdout', 2: 'stderr'} @@ -266,7 +266,7 @@ class StdCaptureFD(Capture):              err = self._readsnapshot(self.err.tmpfile)          else:              err = "" -        return out, err  +        return out, err      def _readsnapshot(self, f):          f.seek(0) diff --git a/contrib/python/py/py/_io/terminalwriter.py b/contrib/python/py/py/_io/terminalwriter.py index 863a2908b5b..442ca2395e0 100644 --- a/contrib/python/py/py/_io/terminalwriter.py +++ b/contrib/python/py/py/_io/terminalwriter.py @@ -229,7 +229,7 @@ class TerminalWriter(object):              # i.e.    2 + 2*len(sepchar)*N + len(title) <= fullwidth              #         2*len(sepchar)*N <= fullwidth - len(title) - 2              #         N <= (fullwidth - len(title) - 2) // (2*len(sepchar)) -            N = max((fullwidth - len(title) - 2) // (2*len(sepchar)), 1)  +            N = max((fullwidth - len(title) - 2) // (2*len(sepchar)), 1)              fill = sepchar * N              line = "%s %s %s" % (fill, title, fill)          else: diff --git a/contrib/python/py/py/_path/common.py b/contrib/python/py/py/_path/common.py index 9d85dbb9223..2364e5fef50 100644 --- a/contrib/python/py/py/_path/common.py +++ b/contrib/python/py/py/_path/common.py @@ -11,12 +11,12 @@ import py  iswin32 = sys.platform == "win32" or (getattr(os, '_name', False) == 'nt')  try: -    # FileNotFoundError might happen in py34, and is not available with py27.  -    import_errors = (ImportError, FileNotFoundError)  -except NameError:  -    import_errors = (ImportError,)  -  -try:  +    # FileNotFoundError might happen in py34, and is not available with py27. +    import_errors = (ImportError, FileNotFoundError) +except NameError: +    import_errors = (ImportError,) + +try:      from os import fspath  except ImportError:      def fspath(path): @@ -41,7 +41,7 @@ except ImportError:                  raise              try:                  import pathlib -            except import_errors:  +            except import_errors:                  pass              else:                  if isinstance(path, pathlib.PurePath): diff --git a/contrib/python/py/py/_path/local.py b/contrib/python/py/py/_path/local.py index 57481515760..1385a039874 100644 --- a/contrib/python/py/py/_path/local.py +++ b/contrib/python/py/py/_path/local.py @@ -18,11 +18,11 @@ if sys.version_info > (3,0):  else:      map_as_list = map -ALLOW_IMPORTLIB_MODE = sys.version_info > (3,5)  -if ALLOW_IMPORTLIB_MODE:  -    import importlib  -  -  +ALLOW_IMPORTLIB_MODE = sys.version_info > (3,5) +if ALLOW_IMPORTLIB_MODE: +    import importlib + +  class Stat(object):      def __getattr__(self, name):          return getattr(self._osstatresult, "st_" + name) @@ -163,10 +163,10 @@ class LocalPath(FSBase):              self.strpath = abspath(path)      def __hash__(self): -        s = self.strpath  -        if iswin32:  -            s = s.lower()  -        return hash(s)  +        s = self.strpath +        if iswin32: +            s = s.lower() +        return hash(s)      def __eq__(self, other):          s1 = fspath(self) @@ -199,8 +199,8 @@ class LocalPath(FSBase):              other = abspath(other)          if self == other:              return True -        if not hasattr(os.path, "samefile"):  -            return False  +        if not hasattr(os.path, "samefile"): +            return False          return py.error.checked_call(                  os.path.samefile, self.strpath, other) @@ -583,16 +583,16 @@ class LocalPath(FSBase):      @contextmanager      def as_cwd(self):          """ -        Return a context manager, which changes to the path's dir during the  -        managed "with" context.  -        On __enter__ it returns the old dir, which might be ``None``.  -        """  +        Return a context manager, which changes to the path's dir during the +        managed "with" context. +        On __enter__ it returns the old dir, which might be ``None``. +        """          old = self.chdir()          try:              yield old          finally: -            if old is not None:  -                old.chdir()  +            if old is not None: +                old.chdir()      def realpath(self):          """ return a new path which contains no symbolic links.""" @@ -658,35 +658,35 @@ class LocalPath(FSBase):          If ensuresyspath=="append" the root dir will be appended          if it isn't already contained in sys.path.          if ensuresyspath is False no modification of syspath happens. -  -        Special value of ensuresyspath=="importlib" is intended  -        purely for using in pytest, it is capable only of importing  -        separate .py files outside packages, e.g. for test suite  -        without any __init__.py file. It effectively allows having  -        same-named test modules in different places and offers  -        mild opt-in via this option. Note that it works only in  -        recent versions of python.  + +        Special value of ensuresyspath=="importlib" is intended +        purely for using in pytest, it is capable only of importing +        separate .py files outside packages, e.g. for test suite +        without any __init__.py file. It effectively allows having +        same-named test modules in different places and offers +        mild opt-in via this option. Note that it works only in +        recent versions of python.          """          if not self.check():              raise py.error.ENOENT(self) -        if ensuresyspath == 'importlib':  -            if modname is None:  -                modname = self.purebasename  -            if not ALLOW_IMPORTLIB_MODE:  -                raise ImportError(  -                    "Can't use importlib due to old version of Python")  -            spec = importlib.util.spec_from_file_location(  -                modname, str(self))  -            if spec is None:  -                raise ImportError(  -                    "Can't find module %s at location %s" %  -                    (modname, str(self))  -                )  -            mod = importlib.util.module_from_spec(spec)  -            spec.loader.exec_module(mod)  -            return mod  -  +        if ensuresyspath == 'importlib': +            if modname is None: +                modname = self.purebasename +            if not ALLOW_IMPORTLIB_MODE: +                raise ImportError( +                    "Can't use importlib due to old version of Python") +            spec = importlib.util.spec_from_file_location( +                modname, str(self)) +            if spec is None: +                raise ImportError( +                    "Can't find module %s at location %s" % +                    (modname, str(self)) +                ) +            mod = importlib.util.module_from_spec(spec) +            spec.loader.exec_module(mod) +            return mod +          pkgpath = None          if modname is None:              pkgpath = self.pypkgpath() diff --git a/contrib/python/py/py/_path/svnwc.py b/contrib/python/py/py/_path/svnwc.py index b576f9c5683..b5b9d8d544a 100644 --- a/contrib/python/py/py/_path/svnwc.py +++ b/contrib/python/py/py/_path/svnwc.py @@ -396,7 +396,7 @@ class SvnAuth(object):      def __str__(self):          return "<SvnAuth username=%s ...>" %(self.username,) -rex_blame = re.compile(r'\s*(\d+)\s+(\S+) (.*)')  +rex_blame = re.compile(r'\s*(\d+)\s+(\S+) (.*)')  class SvnWCCommandPath(common.PathBase):      """ path implementation offering access/modification to svn working copies. diff --git a/contrib/python/py/py/_std.py b/contrib/python/py/py/_std.py index 7dc7dab12e6..66adb7b0239 100644 --- a/contrib/python/py/py/_std.py +++ b/contrib/python/py/py/_std.py @@ -15,9 +15,9 @@ class Std(object):          self.__dict__ = sys.modules      def __getattr__(self, name): -        warnings.warn("py.std is deprecated, please import %s directly" % name,  -                      category=PyStdIsDeprecatedWarning,  -                      stacklevel=2)  +        warnings.warn("py.std is deprecated, please import %s directly" % name, +                      category=PyStdIsDeprecatedWarning, +                      stacklevel=2)          try:              m = __import__(name)          except ImportError: diff --git a/contrib/python/py/py/_vendored_packages/apipkg/__init__.py b/contrib/python/py/py/_vendored_packages/apipkg/__init__.py index e1e0f195270..350d8c4b07a 100644 --- a/contrib/python/py/py/_vendored_packages/apipkg/__init__.py +++ b/contrib/python/py/py/_vendored_packages/apipkg/__init__.py @@ -1,7 +1,7 @@  """ -apipkg: control the exported namespace of a Python package.  +apipkg: control the exported namespace of a Python package. -see https://pypi.python.org/pypi/apipkg  +see https://pypi.python.org/pypi/apipkg  (c) holger krekel, 2009 - MIT license  """ @@ -37,9 +37,9 @@ def distribution_version(name):          return dist.version -def initpkg(pkgname, exportdefs, attr=None, eager=False):  +def initpkg(pkgname, exportdefs, attr=None, eager=False):      """ initialize given package from the export definitions. """ -    attr = attr or {}  +    attr = attr or {}      oldmod = sys.modules.get(pkgname)      d = {}      f = getattr(oldmod, "__file__", None) @@ -64,14 +64,14 @@ def initpkg(pkgname, exportdefs, attr=None, eager=False):      sys.modules[pkgname] = mod      # eagerload in bypthon to avoid their monkeypatching breaking packages      if "bpython" in sys.modules or eager: -        for module in list(sys.modules.values()):  +        for module in list(sys.modules.values()):              if isinstance(module, ApiModule):                  module.__dict__      return mod  def importobj(modpath, attrname): -    """imports a module, then resolves the attrname on it"""  +    """imports a module, then resolves the attrname on it"""      module = __import__(modpath, None, None, ["__doc__"])      if not attrname:          return module @@ -84,7 +84,7 @@ def importobj(modpath, attrname):  class ApiModule(ModuleType): -    """the magical lazy-loading module standing"""  +    """the magical lazy-loading module standing"""      def __docget(self):          try: @@ -130,12 +130,12 @@ class ApiModule(ModuleType):                      self.__map__[name] = (modpath, attrname)      def __repr__(self): -        repr_list = []  +        repr_list = []          if hasattr(self, "__version__"): -            repr_list.append("version=" + repr(self.__version__))  +            repr_list.append("version=" + repr(self.__version__))          if hasattr(self, "__file__"):              repr_list.append("from " + repr(self.__file__)) -        if repr_list:  +        if repr_list:              return "<ApiModule {!r} {}>".format(self.__name__, " ".join(repr_list))          return "<ApiModule {!r}>".format(self.__name__) diff --git a/contrib/python/py/py/_vendored_packages/apipkg/version.py b/contrib/python/py/py/_vendored_packages/apipkg/version.py index 1fa6601b372..c5b4e0e79fa 100644 --- a/contrib/python/py/py/_vendored_packages/apipkg/version.py +++ b/contrib/python/py/py/_vendored_packages/apipkg/version.py @@ -1,5 +1,5 @@ -# coding: utf-8  -# file generated by setuptools_scm  -# don't change, don't track in version control  +# coding: utf-8 +# file generated by setuptools_scm +# don't change, don't track in version control  version = '2.0.0'  version_tuple = (2, 0, 0) diff --git a/contrib/python/py/py/_vendored_packages/iniconfig/__init__.py b/contrib/python/py/py/_vendored_packages/iniconfig/__init__.py index 30493c8b2a2..ebef1fd7201 100644 --- a/contrib/python/py/py/_vendored_packages/iniconfig/__init__.py +++ b/contrib/python/py/py/_vendored_packages/iniconfig/__init__.py @@ -1,7 +1,7 @@  """ brain-dead simple parser for ini-style files.  (C) Ronny Pfannschmidt, Holger Krekel -- MIT licensed  """ -import io  +import io  __all__ = ['IniConfig', 'ParseError'] @@ -56,7 +56,7 @@ class IniConfig(object):                  _, package, resource = self.path.split(':')                  content = pkgutil.get_data(package, resource) -                f = io.StringIO(content.decode('utf-8'))  +                f = io.StringIO(content.decode('utf-8'))              else:                  f = open(self.path)              try: diff --git a/contrib/python/py/py/_vendored_packages/iniconfig/__init__.pyi b/contrib/python/py/py/_vendored_packages/iniconfig/__init__.pyi index 80396f65fe2..b6284bec3f6 100644 --- a/contrib/python/py/py/_vendored_packages/iniconfig/__init__.pyi +++ b/contrib/python/py/py/_vendored_packages/iniconfig/__init__.pyi @@ -1,31 +1,31 @@ -from typing import Callable, Iterator, Mapping, Optional, Tuple, TypeVar, Union  -from typing_extensions import Final  -  -_D = TypeVar('_D')  -_T = TypeVar('_T')  -  -class ParseError(Exception):  -    # Private __init__.  -    path: Final[str]  -    lineno: Final[int]  -    msg: Final[str]  -  -class SectionWrapper:  -    # Private __init__.  -    config: Final[IniConfig]  -    name: Final[str]  -    def __getitem__(self, key: str) -> str: ...  -    def __iter__(self) -> Iterator[str]: ...  -    def get(self, key: str, default: _D = ..., convert: Callable[[str], _T] = ...) -> Union[_T, _D]: ...  -    def items(self) -> Iterator[Tuple[str, str]]: ...  -    def lineof(self, name: str) -> Optional[int]: ...  -  -class IniConfig:  -    path: Final[str]  -    sections: Final[Mapping[str, Mapping[str, str]]]  -    def __init__(self, path: str, data: Optional[str] = None): ...  -    def __contains__(self, arg: str) -> bool: ...  -    def __getitem__(self, name: str) -> SectionWrapper: ...  -    def __iter__(self) -> Iterator[SectionWrapper]: ...  -    def get(self, section: str, name: str, default: _D = ..., convert: Callable[[str], _T] = ...) -> Union[_T, _D]: ...  -    def lineof(self, section: str, name: Optional[str] = ...) -> Optional[int]: ...  +from typing import Callable, Iterator, Mapping, Optional, Tuple, TypeVar, Union +from typing_extensions import Final + +_D = TypeVar('_D') +_T = TypeVar('_T') + +class ParseError(Exception): +    # Private __init__. +    path: Final[str] +    lineno: Final[int] +    msg: Final[str] + +class SectionWrapper: +    # Private __init__. +    config: Final[IniConfig] +    name: Final[str] +    def __getitem__(self, key: str) -> str: ... +    def __iter__(self) -> Iterator[str]: ... +    def get(self, key: str, default: _D = ..., convert: Callable[[str], _T] = ...) -> Union[_T, _D]: ... +    def items(self) -> Iterator[Tuple[str, str]]: ... +    def lineof(self, name: str) -> Optional[int]: ... + +class IniConfig: +    path: Final[str] +    sections: Final[Mapping[str, Mapping[str, str]]] +    def __init__(self, path: str, data: Optional[str] = None): ... +    def __contains__(self, arg: str) -> bool: ... +    def __getitem__(self, name: str) -> SectionWrapper: ... +    def __iter__(self) -> Iterator[SectionWrapper]: ... +    def get(self, section: str, name: str, default: _D = ..., convert: Callable[[str], _T] = ...) -> Union[_T, _D]: ... +    def lineof(self, section: str, name: Optional[str] = ...) -> Optional[int]: ... diff --git a/contrib/python/py/py/error.pyi b/contrib/python/py/py/error.pyi index 13c2f8cf944..034eba609f1 100644 --- a/contrib/python/py/py/error.pyi +++ b/contrib/python/py/py/error.pyi @@ -1,129 +1,129 @@ -from typing import Any, Callable, TypeVar  -  -_T = TypeVar('_T')  -  -def checked_call(func: Callable[..., _T], *args: Any, **kwargs: Any) -> _T: ...  -class Error(EnvironmentError): ...  -class EPERM(Error): ...  -class ENOENT(Error): ...  -class ESRCH(Error): ...  -class EINTR(Error): ...  -class EIO(Error): ...  -class ENXIO(Error): ...  -class E2BIG(Error): ...  -class ENOEXEC(Error): ...  -class EBADF(Error): ...  -class ECHILD(Error): ...  -class EAGAIN(Error): ...  -class ENOMEM(Error): ...  -class EACCES(Error): ...  -class EFAULT(Error): ...  -class ENOTBLK(Error): ...  -class EBUSY(Error): ...  -class EEXIST(Error): ...  -class EXDEV(Error): ...  -class ENODEV(Error): ...  -class ENOTDIR(Error): ...  -class EISDIR(Error): ...  -class EINVAL(Error): ...  -class ENFILE(Error): ...  -class EMFILE(Error): ...  -class ENOTTY(Error): ...  -class ETXTBSY(Error): ...  -class EFBIG(Error): ...  -class ENOSPC(Error): ...  -class ESPIPE(Error): ...  -class EROFS(Error): ...  -class EMLINK(Error): ...  -class EPIPE(Error): ...  -class EDOM(Error): ...  -class ERANGE(Error): ...  -class EDEADLCK(Error): ...  -class ENAMETOOLONG(Error): ...  -class ENOLCK(Error): ...  -class ENOSYS(Error): ...  -class ENOTEMPTY(Error): ...  -class ELOOP(Error): ...  -class EWOULDBLOCK(Error): ...  -class ENOMSG(Error): ...  -class EIDRM(Error): ...  -class ECHRNG(Error): ...  -class EL2NSYNC(Error): ...  -class EL3HLT(Error): ...  -class EL3RST(Error): ...  -class ELNRNG(Error): ...  -class EUNATCH(Error): ...  -class ENOCSI(Error): ...  -class EL2HLT(Error): ...  -class EBADE(Error): ...  -class EBADR(Error): ...  -class EXFULL(Error): ...  -class ENOANO(Error): ...  -class EBADRQC(Error): ...  -class EBADSLT(Error): ...  -class EDEADLOCK(Error): ...  -class EBFONT(Error): ...  -class ENOSTR(Error): ...  -class ENODATA(Error): ...  -class ETIME(Error): ...  -class ENOSR(Error): ...  -class ENONET(Error): ...  -class ENOPKG(Error): ...  -class EREMOTE(Error): ...  -class ENOLINK(Error): ...  -class EADV(Error): ...  -class ESRMNT(Error): ...  -class ECOMM(Error): ...  -class EPROTO(Error): ...  -class EMULTIHOP(Error): ...  -class EDOTDOT(Error): ...  -class EBADMSG(Error): ...  -class EOVERFLOW(Error): ...  -class ENOTUNIQ(Error): ...  -class EBADFD(Error): ...  -class EREMCHG(Error): ...  -class ELIBACC(Error): ...  -class ELIBBAD(Error): ...  -class ELIBSCN(Error): ...  -class ELIBMAX(Error): ...  -class ELIBEXEC(Error): ...  -class EILSEQ(Error): ...  -class ERESTART(Error): ...  -class ESTRPIPE(Error): ...  -class EUSERS(Error): ...  -class ENOTSOCK(Error): ...  -class EDESTADDRREQ(Error): ...  -class EMSGSIZE(Error): ...  -class EPROTOTYPE(Error): ...  -class ENOPROTOOPT(Error): ...  -class EPROTONOSUPPORT(Error): ...  -class ESOCKTNOSUPPORT(Error): ...  -class ENOTSUP(Error): ...  -class EOPNOTSUPP(Error): ...  -class EPFNOSUPPORT(Error): ...  -class EAFNOSUPPORT(Error): ...  -class EADDRINUSE(Error): ...  -class EADDRNOTAVAIL(Error): ...  -class ENETDOWN(Error): ...  -class ENETUNREACH(Error): ...  -class ENETRESET(Error): ...  -class ECONNABORTED(Error): ...  -class ECONNRESET(Error): ...  -class ENOBUFS(Error): ...  -class EISCONN(Error): ...  -class ENOTCONN(Error): ...  -class ESHUTDOWN(Error): ...  -class ETOOMANYREFS(Error): ...  -class ETIMEDOUT(Error): ...  -class ECONNREFUSED(Error): ...  -class EHOSTDOWN(Error): ...  -class EHOSTUNREACH(Error): ...  -class EALREADY(Error): ...  -class EINPROGRESS(Error): ...  -class ESTALE(Error): ...  -class EUCLEAN(Error): ...  -class ENOTNAM(Error): ...  -class ENAVAIL(Error): ...  -class EISNAM(Error): ...  -class EREMOTEIO(Error): ...  -class EDQUOT(Error): ...  +from typing import Any, Callable, TypeVar + +_T = TypeVar('_T') + +def checked_call(func: Callable[..., _T], *args: Any, **kwargs: Any) -> _T: ... +class Error(EnvironmentError): ... +class EPERM(Error): ... +class ENOENT(Error): ... +class ESRCH(Error): ... +class EINTR(Error): ... +class EIO(Error): ... +class ENXIO(Error): ... +class E2BIG(Error): ... +class ENOEXEC(Error): ... +class EBADF(Error): ... +class ECHILD(Error): ... +class EAGAIN(Error): ... +class ENOMEM(Error): ... +class EACCES(Error): ... +class EFAULT(Error): ... +class ENOTBLK(Error): ... +class EBUSY(Error): ... +class EEXIST(Error): ... +class EXDEV(Error): ... +class ENODEV(Error): ... +class ENOTDIR(Error): ... +class EISDIR(Error): ... +class EINVAL(Error): ... +class ENFILE(Error): ... +class EMFILE(Error): ... +class ENOTTY(Error): ... +class ETXTBSY(Error): ... +class EFBIG(Error): ... +class ENOSPC(Error): ... +class ESPIPE(Error): ... +class EROFS(Error): ... +class EMLINK(Error): ... +class EPIPE(Error): ... +class EDOM(Error): ... +class ERANGE(Error): ... +class EDEADLCK(Error): ... +class ENAMETOOLONG(Error): ... +class ENOLCK(Error): ... +class ENOSYS(Error): ... +class ENOTEMPTY(Error): ... +class ELOOP(Error): ... +class EWOULDBLOCK(Error): ... +class ENOMSG(Error): ... +class EIDRM(Error): ... +class ECHRNG(Error): ... +class EL2NSYNC(Error): ... +class EL3HLT(Error): ... +class EL3RST(Error): ... +class ELNRNG(Error): ... +class EUNATCH(Error): ... +class ENOCSI(Error): ... +class EL2HLT(Error): ... +class EBADE(Error): ... +class EBADR(Error): ... +class EXFULL(Error): ... +class ENOANO(Error): ... +class EBADRQC(Error): ... +class EBADSLT(Error): ... +class EDEADLOCK(Error): ... +class EBFONT(Error): ... +class ENOSTR(Error): ... +class ENODATA(Error): ... +class ETIME(Error): ... +class ENOSR(Error): ... +class ENONET(Error): ... +class ENOPKG(Error): ... +class EREMOTE(Error): ... +class ENOLINK(Error): ... +class EADV(Error): ... +class ESRMNT(Error): ... +class ECOMM(Error): ... +class EPROTO(Error): ... +class EMULTIHOP(Error): ... +class EDOTDOT(Error): ... +class EBADMSG(Error): ... +class EOVERFLOW(Error): ... +class ENOTUNIQ(Error): ... +class EBADFD(Error): ... +class EREMCHG(Error): ... +class ELIBACC(Error): ... +class ELIBBAD(Error): ... +class ELIBSCN(Error): ... +class ELIBMAX(Error): ... +class ELIBEXEC(Error): ... +class EILSEQ(Error): ... +class ERESTART(Error): ... +class ESTRPIPE(Error): ... +class EUSERS(Error): ... +class ENOTSOCK(Error): ... +class EDESTADDRREQ(Error): ... +class EMSGSIZE(Error): ... +class EPROTOTYPE(Error): ... +class ENOPROTOOPT(Error): ... +class EPROTONOSUPPORT(Error): ... +class ESOCKTNOSUPPORT(Error): ... +class ENOTSUP(Error): ... +class EOPNOTSUPP(Error): ... +class EPFNOSUPPORT(Error): ... +class EAFNOSUPPORT(Error): ... +class EADDRINUSE(Error): ... +class EADDRNOTAVAIL(Error): ... +class ENETDOWN(Error): ... +class ENETUNREACH(Error): ... +class ENETRESET(Error): ... +class ECONNABORTED(Error): ... +class ECONNRESET(Error): ... +class ENOBUFS(Error): ... +class EISCONN(Error): ... +class ENOTCONN(Error): ... +class ESHUTDOWN(Error): ... +class ETOOMANYREFS(Error): ... +class ETIMEDOUT(Error): ... +class ECONNREFUSED(Error): ... +class EHOSTDOWN(Error): ... +class EHOSTUNREACH(Error): ... +class EALREADY(Error): ... +class EINPROGRESS(Error): ... +class ESTALE(Error): ... +class EUCLEAN(Error): ... +class ENOTNAM(Error): ... +class ENAVAIL(Error): ... +class EISNAM(Error): ... +class EREMOTEIO(Error): ... +class EDQUOT(Error): ... diff --git a/contrib/python/py/py/iniconfig.pyi b/contrib/python/py/py/iniconfig.pyi index 80396f65fe2..b6284bec3f6 100644 --- a/contrib/python/py/py/iniconfig.pyi +++ b/contrib/python/py/py/iniconfig.pyi @@ -1,31 +1,31 @@ -from typing import Callable, Iterator, Mapping, Optional, Tuple, TypeVar, Union  -from typing_extensions import Final  -  -_D = TypeVar('_D')  -_T = TypeVar('_T')  -  -class ParseError(Exception):  -    # Private __init__.  -    path: Final[str]  -    lineno: Final[int]  -    msg: Final[str]  -  -class SectionWrapper:  -    # Private __init__.  -    config: Final[IniConfig]  -    name: Final[str]  -    def __getitem__(self, key: str) -> str: ...  -    def __iter__(self) -> Iterator[str]: ...  -    def get(self, key: str, default: _D = ..., convert: Callable[[str], _T] = ...) -> Union[_T, _D]: ...  -    def items(self) -> Iterator[Tuple[str, str]]: ...  -    def lineof(self, name: str) -> Optional[int]: ...  -  -class IniConfig:  -    path: Final[str]  -    sections: Final[Mapping[str, Mapping[str, str]]]  -    def __init__(self, path: str, data: Optional[str] = None): ...  -    def __contains__(self, arg: str) -> bool: ...  -    def __getitem__(self, name: str) -> SectionWrapper: ...  -    def __iter__(self) -> Iterator[SectionWrapper]: ...  -    def get(self, section: str, name: str, default: _D = ..., convert: Callable[[str], _T] = ...) -> Union[_T, _D]: ...  -    def lineof(self, section: str, name: Optional[str] = ...) -> Optional[int]: ...  +from typing import Callable, Iterator, Mapping, Optional, Tuple, TypeVar, Union +from typing_extensions import Final + +_D = TypeVar('_D') +_T = TypeVar('_T') + +class ParseError(Exception): +    # Private __init__. +    path: Final[str] +    lineno: Final[int] +    msg: Final[str] + +class SectionWrapper: +    # Private __init__. +    config: Final[IniConfig] +    name: Final[str] +    def __getitem__(self, key: str) -> str: ... +    def __iter__(self) -> Iterator[str]: ... +    def get(self, key: str, default: _D = ..., convert: Callable[[str], _T] = ...) -> Union[_T, _D]: ... +    def items(self) -> Iterator[Tuple[str, str]]: ... +    def lineof(self, name: str) -> Optional[int]: ... + +class IniConfig: +    path: Final[str] +    sections: Final[Mapping[str, Mapping[str, str]]] +    def __init__(self, path: str, data: Optional[str] = None): ... +    def __contains__(self, arg: str) -> bool: ... +    def __getitem__(self, name: str) -> SectionWrapper: ... +    def __iter__(self) -> Iterator[SectionWrapper]: ... +    def get(self, section: str, name: str, default: _D = ..., convert: Callable[[str], _T] = ...) -> Union[_T, _D]: ... +    def lineof(self, section: str, name: Optional[str] = ...) -> Optional[int]: ... diff --git a/contrib/python/py/py/io.pyi b/contrib/python/py/py/io.pyi index 7ffdd1b8cd2..d377e2405d5 100644 --- a/contrib/python/py/py/io.pyi +++ b/contrib/python/py/py/io.pyi @@ -1,130 +1,130 @@ -from io import StringIO as TextIO  -from io import BytesIO as BytesIO  -from typing import Any, AnyStr, Callable, Generic, IO, List, Optional, Text, Tuple, TypeVar, Union, overload  -from typing_extensions import Final  -import sys  -  -_T = TypeVar("_T")  -  -class FDCapture(Generic[AnyStr]):  -    def __init__(self, targetfd: int, tmpfile: Optional[IO[AnyStr]] = ..., now: bool = ..., patchsys: bool = ...) -> None: ...  -    def start(self) -> None: ...  -    def done(self) -> IO[AnyStr]: ...  -    def writeorg(self, data: AnyStr) -> None: ...  -  -class StdCaptureFD:  -    def __init__(  -        self,  -        out: Union[bool, IO[str]] = ...,  -        err: Union[bool, IO[str]] = ...,  -        mixed: bool = ...,  -        in_: bool = ...,  -        patchsys: bool = ...,  -        now: bool = ...,  -    ) -> None: ...  -    @classmethod  -    def call(cls, func: Callable[..., _T], *args: Any, **kwargs: Any) -> Tuple[_T, str, str]: ...  -    def reset(self) -> Tuple[str, str]: ...  -    def suspend(self) -> Tuple[str, str]: ...  -    def startall(self) -> None: ...  -    def resume(self) -> None: ...  -    def done(self, save: bool = ...) -> Tuple[IO[str], IO[str]]: ...  -    def readouterr(self) -> Tuple[str, str]: ...  -  -class StdCapture:  -    def __init__(  -        self,  -        out: Union[bool, IO[str]] = ...,  -        err: Union[bool, IO[str]] = ...,  -        in_: bool = ...,  -        mixed: bool = ...,  -        now: bool = ...,  -    ) -> None: ...  -    @classmethod  -    def call(cls, func: Callable[..., _T], *args: Any, **kwargs: Any) -> Tuple[_T, str, str]: ...  -    def reset(self) -> Tuple[str, str]: ...  -    def suspend(self) -> Tuple[str, str]: ...  -    def startall(self) -> None: ...  -    def resume(self) -> None: ...  -    def done(self, save: bool = ...) -> Tuple[IO[str], IO[str]]: ...  -    def readouterr(self) -> Tuple[IO[str], IO[str]]: ...  -  -# XXX: The type here is not exactly right. If f is IO[bytes] and  -# encoding is not None, returns some weird hybrid, not exactly IO[bytes].  -def dupfile(  -    f: IO[AnyStr],  -    mode: Optional[str] = ...,  -    buffering: int = ...,  -    raising: bool = ...,  -    encoding: Optional[str] = ...,  -) -> IO[AnyStr]: ...  -def get_terminal_width() -> int: ...  -def ansi_print(  -    text: Union[str, Text],  -    esc: Union[Union[str, Text], Tuple[Union[str, Text], ...]],  -    file: Optional[IO[Any]] = ...,  -    newline: bool = ...,  -    flush: bool = ...,  -) -> None: ...  -def saferepr(obj, maxsize: int = ...) -> str: ...  -  -class TerminalWriter:  -    stringio: TextIO  -    encoding: Final[str]  -    hasmarkup: bool  -    def __init__(self, file: Optional[IO[str]] = ..., stringio: bool = ..., encoding: Optional[str] = ...) -> None: ...  -    @property  -    def fullwidth(self) -> int: ...  -    @fullwidth.setter  -    def fullwidth(self, value: int) -> None: ...  -    @property  -    def chars_on_current_line(self) -> int: ...  -    @property  -    def width_of_current_line(self) -> int: ...  -    def markup(  -        self,  -        text: str,  -        *,  -        black: int = ..., red: int = ..., green: int = ..., yellow: int = ..., blue: int = ..., purple: int = ...,  -        cyan: int = ..., white: int = ..., Black: int = ..., Red: int = ..., Green: int = ..., Yellow: int = ...,  -        Blue: int = ..., Purple: int = ..., Cyan: int = ..., White: int = ..., bold: int = ..., light: int = ...,  -        blink: int = ..., invert: int = ...,  -    ) -> str: ...  -    def sep(  -        self,  -        sepchar: str,  -        title: Optional[str] = ...,  -        fullwidth: Optional[int] = ...,  -        *,  -        black: int = ..., red: int = ..., green: int = ..., yellow: int = ..., blue: int = ..., purple: int = ...,  -        cyan: int = ..., white: int = ..., Black: int = ..., Red: int = ..., Green: int = ..., Yellow: int = ...,  -        Blue: int = ..., Purple: int = ..., Cyan: int = ..., White: int = ..., bold: int = ..., light: int = ...,  -        blink: int = ..., invert: int = ...,  -    ) -> None: ...  -    def write(  -        self,  -        msg: str,  -        *,  -        black: int = ..., red: int = ..., green: int = ..., yellow: int = ..., blue: int = ..., purple: int = ...,  -        cyan: int = ..., white: int = ..., Black: int = ..., Red: int = ..., Green: int = ..., Yellow: int = ...,  -        Blue: int = ..., Purple: int = ..., Cyan: int = ..., White: int = ..., bold: int = ..., light: int = ...,  -        blink: int = ..., invert: int = ...,  -    ) -> None: ...  -    def line(  -        self,  -        s: str = ...,  -        *,  -        black: int = ..., red: int = ..., green: int = ..., yellow: int = ..., blue: int = ..., purple: int = ...,  -        cyan: int = ..., white: int = ..., Black: int = ..., Red: int = ..., Green: int = ..., Yellow: int = ...,  -        Blue: int = ..., Purple: int = ..., Cyan: int = ..., White: int = ..., bold: int = ..., light: int = ...,  -        blink: int = ..., invert: int = ...,  -    ) -> None: ...  -    def reline(  -        self,  -        line: str,  -        *,  -        black: int = ..., red: int = ..., green: int = ..., yellow: int = ..., blue: int = ..., purple: int = ...,  -        cyan: int = ..., white: int = ..., Black: int = ..., Red: int = ..., Green: int = ..., Yellow: int = ...,  -        Blue: int = ..., Purple: int = ..., Cyan: int = ..., White: int = ..., bold: int = ..., light: int = ...,  -        blink: int = ..., invert: int = ...,  -    ) -> None: ...  +from io import StringIO as TextIO +from io import BytesIO as BytesIO +from typing import Any, AnyStr, Callable, Generic, IO, List, Optional, Text, Tuple, TypeVar, Union, overload +from typing_extensions import Final +import sys + +_T = TypeVar("_T") + +class FDCapture(Generic[AnyStr]): +    def __init__(self, targetfd: int, tmpfile: Optional[IO[AnyStr]] = ..., now: bool = ..., patchsys: bool = ...) -> None: ... +    def start(self) -> None: ... +    def done(self) -> IO[AnyStr]: ... +    def writeorg(self, data: AnyStr) -> None: ... + +class StdCaptureFD: +    def __init__( +        self, +        out: Union[bool, IO[str]] = ..., +        err: Union[bool, IO[str]] = ..., +        mixed: bool = ..., +        in_: bool = ..., +        patchsys: bool = ..., +        now: bool = ..., +    ) -> None: ... +    @classmethod +    def call(cls, func: Callable[..., _T], *args: Any, **kwargs: Any) -> Tuple[_T, str, str]: ... +    def reset(self) -> Tuple[str, str]: ... +    def suspend(self) -> Tuple[str, str]: ... +    def startall(self) -> None: ... +    def resume(self) -> None: ... +    def done(self, save: bool = ...) -> Tuple[IO[str], IO[str]]: ... +    def readouterr(self) -> Tuple[str, str]: ... + +class StdCapture: +    def __init__( +        self, +        out: Union[bool, IO[str]] = ..., +        err: Union[bool, IO[str]] = ..., +        in_: bool = ..., +        mixed: bool = ..., +        now: bool = ..., +    ) -> None: ... +    @classmethod +    def call(cls, func: Callable[..., _T], *args: Any, **kwargs: Any) -> Tuple[_T, str, str]: ... +    def reset(self) -> Tuple[str, str]: ... +    def suspend(self) -> Tuple[str, str]: ... +    def startall(self) -> None: ... +    def resume(self) -> None: ... +    def done(self, save: bool = ...) -> Tuple[IO[str], IO[str]]: ... +    def readouterr(self) -> Tuple[IO[str], IO[str]]: ... + +# XXX: The type here is not exactly right. If f is IO[bytes] and +# encoding is not None, returns some weird hybrid, not exactly IO[bytes]. +def dupfile( +    f: IO[AnyStr], +    mode: Optional[str] = ..., +    buffering: int = ..., +    raising: bool = ..., +    encoding: Optional[str] = ..., +) -> IO[AnyStr]: ... +def get_terminal_width() -> int: ... +def ansi_print( +    text: Union[str, Text], +    esc: Union[Union[str, Text], Tuple[Union[str, Text], ...]], +    file: Optional[IO[Any]] = ..., +    newline: bool = ..., +    flush: bool = ..., +) -> None: ... +def saferepr(obj, maxsize: int = ...) -> str: ... + +class TerminalWriter: +    stringio: TextIO +    encoding: Final[str] +    hasmarkup: bool +    def __init__(self, file: Optional[IO[str]] = ..., stringio: bool = ..., encoding: Optional[str] = ...) -> None: ... +    @property +    def fullwidth(self) -> int: ... +    @fullwidth.setter +    def fullwidth(self, value: int) -> None: ... +    @property +    def chars_on_current_line(self) -> int: ... +    @property +    def width_of_current_line(self) -> int: ... +    def markup( +        self, +        text: str, +        *, +        black: int = ..., red: int = ..., green: int = ..., yellow: int = ..., blue: int = ..., purple: int = ..., +        cyan: int = ..., white: int = ..., Black: int = ..., Red: int = ..., Green: int = ..., Yellow: int = ..., +        Blue: int = ..., Purple: int = ..., Cyan: int = ..., White: int = ..., bold: int = ..., light: int = ..., +        blink: int = ..., invert: int = ..., +    ) -> str: ... +    def sep( +        self, +        sepchar: str, +        title: Optional[str] = ..., +        fullwidth: Optional[int] = ..., +        *, +        black: int = ..., red: int = ..., green: int = ..., yellow: int = ..., blue: int = ..., purple: int = ..., +        cyan: int = ..., white: int = ..., Black: int = ..., Red: int = ..., Green: int = ..., Yellow: int = ..., +        Blue: int = ..., Purple: int = ..., Cyan: int = ..., White: int = ..., bold: int = ..., light: int = ..., +        blink: int = ..., invert: int = ..., +    ) -> None: ... +    def write( +        self, +        msg: str, +        *, +        black: int = ..., red: int = ..., green: int = ..., yellow: int = ..., blue: int = ..., purple: int = ..., +        cyan: int = ..., white: int = ..., Black: int = ..., Red: int = ..., Green: int = ..., Yellow: int = ..., +        Blue: int = ..., Purple: int = ..., Cyan: int = ..., White: int = ..., bold: int = ..., light: int = ..., +        blink: int = ..., invert: int = ..., +    ) -> None: ... +    def line( +        self, +        s: str = ..., +        *, +        black: int = ..., red: int = ..., green: int = ..., yellow: int = ..., blue: int = ..., purple: int = ..., +        cyan: int = ..., white: int = ..., Black: int = ..., Red: int = ..., Green: int = ..., Yellow: int = ..., +        Blue: int = ..., Purple: int = ..., Cyan: int = ..., White: int = ..., bold: int = ..., light: int = ..., +        blink: int = ..., invert: int = ..., +    ) -> None: ... +    def reline( +        self, +        line: str, +        *, +        black: int = ..., red: int = ..., green: int = ..., yellow: int = ..., blue: int = ..., purple: int = ..., +        cyan: int = ..., white: int = ..., Black: int = ..., Red: int = ..., Green: int = ..., Yellow: int = ..., +        Blue: int = ..., Purple: int = ..., Cyan: int = ..., White: int = ..., bold: int = ..., light: int = ..., +        blink: int = ..., invert: int = ..., +    ) -> None: ... diff --git a/contrib/python/py/py/path.pyi b/contrib/python/py/py/path.pyi index e0bbb326923..1ddab9601ea 100644 --- a/contrib/python/py/py/path.pyi +++ b/contrib/python/py/py/path.pyi @@ -1,197 +1,197 @@ -from typing import Any, AnyStr, Callable, ContextManager, Generic, IO, Iterable, Iterator, List, Optional, Text, Type, Union  -from typing_extensions import Final, Literal  -import os  -import sys  -  -class _FNMatcher(Generic[AnyStr]):  -    pattern: AnyStr = ...  -    def __init__(self, pattern: AnyStr) -> None: ...  -    def __call__(self, path: local) -> bool: ...  -  -class _Stat:  -    path: Final[local] = ...  -    mode: Final[int]  -    ino: Final[int]  -    dev: Final[int]  -    nlink: Final[int]  -    uid: Final[int]  -    gid: Final[int]  -    size: Final[int]  -    atime: Final[float]  -    mtime: Final[float]  -    ctime: Final[float]  -    atime_ns: Final[int]  -    mtime_ns: Final[int]  -    ctime_ns: Final[int]  -    if sys.version_info >= (3, 8) and sys.platform == "win32":  -        reparse_tag: Final[int]  -    blocks: Final[int]  -    blksize: Final[int]  -    rdev: Final[int]  -    flags: Final[int]  -    gen: Final[int]  -    birthtime: Final[int]  -    rsize: Final[int]  -    creator: Final[int]  -    type: Final[int]  -    if sys.platform != 'win32':  -        @property  -        def owner(self) -> str: ...  -        @property  -        def group(self) -> str: ...  -    def isdir(self) -> bool: ...  -    def isfile(self) -> bool: ...  -    def islink(self) -> bool: ...  -  -  -if sys.version_info >= (3, 6):  -    _PathLike = os.PathLike  -else:  -    class _PathLike(Generic[AnyStr]):  -        def __fspath__(self) -> AnyStr: ...  -_PathType = Union[bytes, Text, _PathLike[str], _PathLike[bytes], local]  -  -class local(_PathLike[str]):  -    class ImportMismatchError(ImportError): ...  -  -    sep: Final[str]  -    strpath: Final[str]  -  -    def __init__(self, path: _PathType = ..., expanduser: bool = ...) -> None: ...  -    def __hash__(self) -> int: ...  -    def __eq__(self, other: object) -> bool: ...  -    def __ne__(self, other: object) -> bool: ...  -    def __lt__(self, other: object) -> bool: ...  -    def __gt__(self, other: object) -> bool: ...  -    def __add__(self, other: object) -> local: ...  -    def __cmp__(self, other: object) -> int: ...  -    def __div__(self, other: _PathType) -> local: ...  -    def __truediv__(self, other: _PathType) -> local: ...  -    def __fspath__(self) -> str: ...  -  -    @classmethod  -    def get_temproot(cls) -> local: ...  -    @classmethod  -    def make_numbered_dir(  -        cls,  -        prefix: str = ...,  -        rootdir: Optional[local] = ...,  -        keep: Optional[int] = ...,  -        lock_timeout: int = ...,  -    ) -> local: ...  -    @classmethod  -    def mkdtemp(cls, rootdir: Optional[local] = ...) -> local: ...  -    @classmethod  -    def sysfind(  -        cls,  -        name: _PathType,  -        checker: Optional[Callable[[local], bool]] = ...,  -        paths: Optional[Iterable[_PathType]] = ...,  -    ) -> Optional[local]: ...  -  -    @property  -    def basename(self) -> str: ...  -    @property  -    def dirname(self) -> str: ...  -    @property  -    def purebasename(self) -> str: ...  -    @property  -    def ext(self) -> str: ...  -  -    def as_cwd(self) -> ContextManager[Optional[local]]: ...  -    def atime(self) -> float: ...  -    def bestrelpath(self, dest: local) -> str: ...  -    def chdir(self) -> local: ...  -    def check(  -        self,  -        *,  -        basename: int = ..., notbasename: int = ...,  -        basestarts: int = ..., notbasestarts: int = ...,  -        dir: int = ..., notdir: int = ...,  -        dotfile: int = ..., notdotfile: int = ...,  -        endswith: int = ..., notendswith: int = ...,  -        exists: int = ..., notexists: int = ...,  -        ext: int = ..., notext: int = ...,  -        file: int = ..., notfile: int = ...,  -        fnmatch: int = ..., notfnmatch: int = ...,  -        link: int = ..., notlink: int = ...,  -        relto: int = ..., notrelto: int = ...,  -     ) -> bool: ...  -    def chmod(self, mode: int, rec: Union[int, str, Text, Callable[[local], bool]] = ...) -> None: ...  -    if sys.platform != 'win32':  -        def chown(self, user: Union[int, str], group: Union[int, str], rec: int = ...) -> None: ...  -    def common(self, other: local) -> Optional[local]: ...  -    def computehash(self, hashtype: str = ..., chunksize: int = ...) -> str: ...  -    def copy(self, target: local, mode: bool = ..., stat: bool = ...) -> None: ...  -    def dirpath(self, *args: _PathType, abs: int = ...) -> local: ...  -    def dump(self, obj: Any, bin: Optional[int] = ...) -> None: ...  -    def ensure(self, *args: _PathType, dir: int = ...) -> local: ...  -    def ensure_dir(self, *args: _PathType) -> local: ...  -    def exists(self) -> bool: ...  -    def fnmatch(self, pattern: str): _FNMatcher  -    def isdir(self) -> bool: ...  -    def isfile(self) -> bool: ...  -    def islink(self) -> bool: ...  -    def join(self, *args: _PathType, abs: int = ...) -> local: ...  -    def listdir(  -        self,  -        fil: Optional[Union[str, Text, Callable[[local], bool]]] = ...,  -        sort: Optional[bool] = ...,  -    ) -> List[local]: ...  -    def load(self) -> Any: ...  -    def lstat(self) -> _Stat: ...  -    def mkdir(self, *args: _PathType) -> local: ...  -    if sys.platform != 'win32':  -        def mklinkto(self, oldname: Union[str, local]) -> None: ...  -        def mksymlinkto(self, value: local, absolute: int = ...) -> None: ...  -    def move(self, target: local) -> None: ...  -    def mtime(self) -> float: ...  -    def new(  -        self,  -        *,  -        drive: str = ...,  -        dirname: str = ...,  -        basename: str = ...,  -        purebasename: str = ...,  -        ext: str = ...,  -    ) -> local: ...  -    def open(self, mode: str = ..., ensure: bool = ..., encoding: Optional[str] = ...) -> IO[Any]: ...  -    def parts(self, reverse: bool = ...) -> List[local]: ...  -    def pyimport(  -        self,  -        modname: Optional[str] = ...,  -        ensuresyspath: Union[bool, Literal["append", "importlib"]] = ...,  -    ) -> Any: ...  -    def pypkgpath(self) -> Optional[local]: ...  -    def read(self, mode: str = ...) -> Union[Text, bytes]: ...  -    def read_binary(self) -> bytes: ...  -    def read_text(self, encoding: str) -> Text: ...  -    def readlines(self, cr: int = ...) -> List[str]: ...  -    if sys.platform != 'win32':  -        def readlink(self) -> str: ...  -    def realpath(self) -> local: ...  -    def relto(self, relpath: Union[str, local]) -> str: ...  -    def remove(self, rec: int = ..., ignore_errors: bool = ...) -> None: ...  -    def rename(self, target: _PathType) -> None: ...  -    def samefile(self, other: _PathType) -> bool: ...  -    def setmtime(self, mtime: Optional[float] = ...) -> None: ...  -    def size(self) -> int: ...  -    def stat(self, raising: bool = ...) -> _Stat: ...  -    def sysexec(self, *argv: Any, **popen_opts: Any) -> Text: ...  -    def visit(  -        self,  -        fil: Optional[Union[str, Text, Callable[[local], bool]]] = ...,  -        rec: Optional[Union[Literal[1, True], str, Text, Callable[[local], bool]]] = ...,  -        ignore: Type[Exception] = ...,  -        bf: bool = ...,  -        sort: bool = ...,  -    ) -> Iterator[local]: ...  -    def write(self, data: Any, mode: str = ..., ensure: bool = ...) -> None: ...  -    def write_binary(self, data: bytes, ensure: bool = ...) -> None: ...  -    def write_text(self, data: Union[str, Text], encoding: str, ensure: bool = ...) -> None: ...  -  -  -# Untyped types below here.  -svnwc: Any  -svnurl: Any  -SvnAuth: Any  +from typing import Any, AnyStr, Callable, ContextManager, Generic, IO, Iterable, Iterator, List, Optional, Text, Type, Union +from typing_extensions import Final, Literal +import os +import sys + +class _FNMatcher(Generic[AnyStr]): +    pattern: AnyStr = ... +    def __init__(self, pattern: AnyStr) -> None: ... +    def __call__(self, path: local) -> bool: ... + +class _Stat: +    path: Final[local] = ... +    mode: Final[int] +    ino: Final[int] +    dev: Final[int] +    nlink: Final[int] +    uid: Final[int] +    gid: Final[int] +    size: Final[int] +    atime: Final[float] +    mtime: Final[float] +    ctime: Final[float] +    atime_ns: Final[int] +    mtime_ns: Final[int] +    ctime_ns: Final[int] +    if sys.version_info >= (3, 8) and sys.platform == "win32": +        reparse_tag: Final[int] +    blocks: Final[int] +    blksize: Final[int] +    rdev: Final[int] +    flags: Final[int] +    gen: Final[int] +    birthtime: Final[int] +    rsize: Final[int] +    creator: Final[int] +    type: Final[int] +    if sys.platform != 'win32': +        @property +        def owner(self) -> str: ... +        @property +        def group(self) -> str: ... +    def isdir(self) -> bool: ... +    def isfile(self) -> bool: ... +    def islink(self) -> bool: ... + + +if sys.version_info >= (3, 6): +    _PathLike = os.PathLike +else: +    class _PathLike(Generic[AnyStr]): +        def __fspath__(self) -> AnyStr: ... +_PathType = Union[bytes, Text, _PathLike[str], _PathLike[bytes], local] + +class local(_PathLike[str]): +    class ImportMismatchError(ImportError): ... + +    sep: Final[str] +    strpath: Final[str] + +    def __init__(self, path: _PathType = ..., expanduser: bool = ...) -> None: ... +    def __hash__(self) -> int: ... +    def __eq__(self, other: object) -> bool: ... +    def __ne__(self, other: object) -> bool: ... +    def __lt__(self, other: object) -> bool: ... +    def __gt__(self, other: object) -> bool: ... +    def __add__(self, other: object) -> local: ... +    def __cmp__(self, other: object) -> int: ... +    def __div__(self, other: _PathType) -> local: ... +    def __truediv__(self, other: _PathType) -> local: ... +    def __fspath__(self) -> str: ... + +    @classmethod +    def get_temproot(cls) -> local: ... +    @classmethod +    def make_numbered_dir( +        cls, +        prefix: str = ..., +        rootdir: Optional[local] = ..., +        keep: Optional[int] = ..., +        lock_timeout: int = ..., +    ) -> local: ... +    @classmethod +    def mkdtemp(cls, rootdir: Optional[local] = ...) -> local: ... +    @classmethod +    def sysfind( +        cls, +        name: _PathType, +        checker: Optional[Callable[[local], bool]] = ..., +        paths: Optional[Iterable[_PathType]] = ..., +    ) -> Optional[local]: ... + +    @property +    def basename(self) -> str: ... +    @property +    def dirname(self) -> str: ... +    @property +    def purebasename(self) -> str: ... +    @property +    def ext(self) -> str: ... + +    def as_cwd(self) -> ContextManager[Optional[local]]: ... +    def atime(self) -> float: ... +    def bestrelpath(self, dest: local) -> str: ... +    def chdir(self) -> local: ... +    def check( +        self, +        *, +        basename: int = ..., notbasename: int = ..., +        basestarts: int = ..., notbasestarts: int = ..., +        dir: int = ..., notdir: int = ..., +        dotfile: int = ..., notdotfile: int = ..., +        endswith: int = ..., notendswith: int = ..., +        exists: int = ..., notexists: int = ..., +        ext: int = ..., notext: int = ..., +        file: int = ..., notfile: int = ..., +        fnmatch: int = ..., notfnmatch: int = ..., +        link: int = ..., notlink: int = ..., +        relto: int = ..., notrelto: int = ..., +     ) -> bool: ... +    def chmod(self, mode: int, rec: Union[int, str, Text, Callable[[local], bool]] = ...) -> None: ... +    if sys.platform != 'win32': +        def chown(self, user: Union[int, str], group: Union[int, str], rec: int = ...) -> None: ... +    def common(self, other: local) -> Optional[local]: ... +    def computehash(self, hashtype: str = ..., chunksize: int = ...) -> str: ... +    def copy(self, target: local, mode: bool = ..., stat: bool = ...) -> None: ... +    def dirpath(self, *args: _PathType, abs: int = ...) -> local: ... +    def dump(self, obj: Any, bin: Optional[int] = ...) -> None: ... +    def ensure(self, *args: _PathType, dir: int = ...) -> local: ... +    def ensure_dir(self, *args: _PathType) -> local: ... +    def exists(self) -> bool: ... +    def fnmatch(self, pattern: str): _FNMatcher +    def isdir(self) -> bool: ... +    def isfile(self) -> bool: ... +    def islink(self) -> bool: ... +    def join(self, *args: _PathType, abs: int = ...) -> local: ... +    def listdir( +        self, +        fil: Optional[Union[str, Text, Callable[[local], bool]]] = ..., +        sort: Optional[bool] = ..., +    ) -> List[local]: ... +    def load(self) -> Any: ... +    def lstat(self) -> _Stat: ... +    def mkdir(self, *args: _PathType) -> local: ... +    if sys.platform != 'win32': +        def mklinkto(self, oldname: Union[str, local]) -> None: ... +        def mksymlinkto(self, value: local, absolute: int = ...) -> None: ... +    def move(self, target: local) -> None: ... +    def mtime(self) -> float: ... +    def new( +        self, +        *, +        drive: str = ..., +        dirname: str = ..., +        basename: str = ..., +        purebasename: str = ..., +        ext: str = ..., +    ) -> local: ... +    def open(self, mode: str = ..., ensure: bool = ..., encoding: Optional[str] = ...) -> IO[Any]: ... +    def parts(self, reverse: bool = ...) -> List[local]: ... +    def pyimport( +        self, +        modname: Optional[str] = ..., +        ensuresyspath: Union[bool, Literal["append", "importlib"]] = ..., +    ) -> Any: ... +    def pypkgpath(self) -> Optional[local]: ... +    def read(self, mode: str = ...) -> Union[Text, bytes]: ... +    def read_binary(self) -> bytes: ... +    def read_text(self, encoding: str) -> Text: ... +    def readlines(self, cr: int = ...) -> List[str]: ... +    if sys.platform != 'win32': +        def readlink(self) -> str: ... +    def realpath(self) -> local: ... +    def relto(self, relpath: Union[str, local]) -> str: ... +    def remove(self, rec: int = ..., ignore_errors: bool = ...) -> None: ... +    def rename(self, target: _PathType) -> None: ... +    def samefile(self, other: _PathType) -> bool: ... +    def setmtime(self, mtime: Optional[float] = ...) -> None: ... +    def size(self) -> int: ... +    def stat(self, raising: bool = ...) -> _Stat: ... +    def sysexec(self, *argv: Any, **popen_opts: Any) -> Text: ... +    def visit( +        self, +        fil: Optional[Union[str, Text, Callable[[local], bool]]] = ..., +        rec: Optional[Union[Literal[1, True], str, Text, Callable[[local], bool]]] = ..., +        ignore: Type[Exception] = ..., +        bf: bool = ..., +        sort: bool = ..., +    ) -> Iterator[local]: ... +    def write(self, data: Any, mode: str = ..., ensure: bool = ...) -> None: ... +    def write_binary(self, data: bytes, ensure: bool = ...) -> None: ... +    def write_text(self, data: Union[str, Text], encoding: str, ensure: bool = ...) -> None: ... + + +# Untyped types below here. +svnwc: Any +svnurl: Any +SvnAuth: Any diff --git a/contrib/python/py/py/xml.pyi b/contrib/python/py/py/xml.pyi index 8526ddfae30..9c44480a5f3 100644 --- a/contrib/python/py/py/xml.pyi +++ b/contrib/python/py/py/xml.pyi @@ -1,25 +1,25 @@ -from typing import ClassVar, Generic, Iterable, Text, Type, Union  -from typing_extensions import Final  -  -class raw:  -    uniobj: Final[Text]  -    def __init__(self, uniobj: Text) -> None: ...  -  -class _NamespaceMetaclass(type):  -    def __getattr__(self, name: str) -> Type[Tag]: ...  -  -class Namespace(metaclass=_NamespaceMetaclass): ...  -  -class Tag(list):  -    class Attr:  -        def __getattr__(self, attr: str) -> Text: ...  -    attr: Final[Attr]  -    def __init__(self, *args: Union[Text, raw, Tag, Iterable[Tag]], **kwargs: Union[Text, raw]) -> None: ...  -    def unicode(self, indent: int = ...) -> Text: ...  -  -class html(Namespace):  -    class Style:  -        def __init__(self, **kw: Union[str, Text]) -> None: ...  -    style: ClassVar[Style]  -  -def escape(ustring: Union[str, Text]) -> Text: ...  +from typing import ClassVar, Generic, Iterable, Text, Type, Union +from typing_extensions import Final + +class raw: +    uniobj: Final[Text] +    def __init__(self, uniobj: Text) -> None: ... + +class _NamespaceMetaclass(type): +    def __getattr__(self, name: str) -> Type[Tag]: ... + +class Namespace(metaclass=_NamespaceMetaclass): ... + +class Tag(list): +    class Attr: +        def __getattr__(self, attr: str) -> Text: ... +    attr: Final[Attr] +    def __init__(self, *args: Union[Text, raw, Tag, Iterable[Tag]], **kwargs: Union[Text, raw]) -> None: ... +    def unicode(self, indent: int = ...) -> Text: ... + +class html(Namespace): +    class Style: +        def __init__(self, **kw: Union[str, Text]) -> None: ... +    style: ClassVar[Style] + +def escape(ustring: Union[str, Text]) -> Text: ... diff --git a/contrib/python/py/ya.make b/contrib/python/py/ya.make index 171da36c2c0..cc86cb7fa9b 100644 --- a/contrib/python/py/ya.make +++ b/contrib/python/py/ya.make @@ -1,15 +1,15 @@ -# Generated by devtools/yamaker (pypi).  -  +# Generated by devtools/yamaker (pypi). +  PY23_LIBRARY() -OWNER(g:python-contrib)  +OWNER(g:python-contrib)  VERSION(1.11.0) -LICENSE(MIT)  +LICENSE(MIT) + +NO_LINT() -NO_LINT()  -   NO_CHECK_IMPORTS(      py._code._assertionnew      py._code._assertionold @@ -17,57 +17,57 @@ NO_CHECK_IMPORTS(  PY_SRCS(      TOP_LEVEL -    py/__init__.py  -    py/__init__.pyi  -    py/__metainfo.py  +    py/__init__.py +    py/__init__.pyi +    py/__metainfo.py      py/_builtin.py -    py/_code/__init__.py  +    py/_code/__init__.py      py/_code/_assertionnew.py      py/_code/_assertionold.py -    py/_code/_py2traceback.py  +    py/_code/_py2traceback.py      py/_code/assertion.py      py/_code/code.py      py/_code/source.py      py/_error.py -    py/_io/__init__.py  +    py/_io/__init__.py      py/_io/capture.py      py/_io/saferepr.py      py/_io/terminalwriter.py      py/_log/__init__.py      py/_log/log.py      py/_log/warning.py -    py/_path/__init__.py  +    py/_path/__init__.py      py/_path/cacheutil.py      py/_path/common.py      py/_path/local.py      py/_path/svnurl.py      py/_path/svnwc.py -    py/_process/__init__.py  +    py/_process/__init__.py      py/_process/cmdexec.py      py/_process/forkedfunc.py      py/_process/killproc.py      py/_std.py      py/_vendored_packages/__init__.py -    py/_vendored_packages/apipkg/__init__.py  -    py/_vendored_packages/apipkg/version.py  -    py/_vendored_packages/iniconfig/__init__.py  -    py/_vendored_packages/iniconfig/__init__.pyi  +    py/_vendored_packages/apipkg/__init__.py +    py/_vendored_packages/apipkg/version.py +    py/_vendored_packages/iniconfig/__init__.py +    py/_vendored_packages/iniconfig/__init__.pyi      py/_version.py      py/_xmlgen.py -    py/error.pyi  -    py/iniconfig.pyi  -    py/io.pyi  -    py/path.pyi  -    py/test.py  -    py/xml.pyi  +    py/error.pyi +    py/iniconfig.pyi +    py/io.pyi +    py/path.pyi +    py/test.py +    py/xml.pyi +) + +RESOURCE_FILES( +    PREFIX contrib/python/py/ +    .dist-info/METADATA +    .dist-info/top_level.txt +    py/_vendored_packages/iniconfig/py.typed +    py/py.typed  ) -RESOURCE_FILES(  -    PREFIX contrib/python/py/  -    .dist-info/METADATA  -    .dist-info/top_level.txt  -    py/_vendored_packages/iniconfig/py.typed  -    py/py.typed  -)  -   END() | 
