diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2024-03-12 11:03:50 +0300 |
---|---|---|
committer | robot-piglet <robot-piglet@yandex-team.com> | 2024-03-12 11:13:55 +0300 |
commit | 79203d60c5457f5db27809045067968ba9e0be5a (patch) | |
tree | 2a082b81ca7c0d29717fe227f4648d342af73760 | |
parent | 6c311e6884dd132aa79664e7b305716d7d25477b (diff) | |
download | ydb-79203d60c5457f5db27809045067968ba9e0be5a.tar.gz |
Intermediate changes
24 files changed, 117 insertions, 79 deletions
diff --git a/contrib/python/cachetools/py3/.dist-info/METADATA b/contrib/python/cachetools/py3/.dist-info/METADATA index 9504a9426b..5846ebf167 100644 --- a/contrib/python/cachetools/py3/.dist-info/METADATA +++ b/contrib/python/cachetools/py3/.dist-info/METADATA @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: cachetools -Version: 5.3.2 +Version: 5.3.3 Summary: Extensible memoizing collections and decorators Home-page: https://github.com/tkem/cachetools/ Author: Thomas Kemmer @@ -116,15 +116,16 @@ Related Projects ------------------------------------------------------------------------ - asyncache_: Helpers to use cachetools with async functions +- cacheing_: Pure Python Cacheing Library - CacheToolsUtils_: Cachetools Utilities -- `kids.cache`_: Kids caching library +- kids.cache_: Kids caching library - shelved-cache_: Persistent cache for Python cachetools License ------------------------------------------------------------------------ -Copyright (c) 2014-2023 Thomas Kemmer. +Copyright (c) 2014-2024 Thomas Kemmer. Licensed under the `MIT License`_. @@ -143,6 +144,7 @@ Licensed under the `MIT License`_. .. _MIT License: https://raw.github.com/tkem/cachetools/master/LICENSE .. _asyncache: https://pypi.org/project/asyncache/ +.. _cacheing: https://github.com/breid48/cacheing .. _CacheToolsUtils: https://pypi.org/project/CacheToolsUtils/ .. _kids.cache: https://pypi.org/project/kids.cache/ .. _shelved-cache: https://pypi.org/project/shelved-cache/ diff --git a/contrib/python/cachetools/py3/LICENSE b/contrib/python/cachetools/py3/LICENSE index bd185ce7ac..67da58ecd7 100644 --- a/contrib/python/cachetools/py3/LICENSE +++ b/contrib/python/cachetools/py3/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2014-2022 Thomas Kemmer +Copyright (c) 2014-2024 Thomas Kemmer Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/contrib/python/cachetools/py3/README.rst b/contrib/python/cachetools/py3/README.rst index 42662c5a35..a5627cc114 100644 --- a/contrib/python/cachetools/py3/README.rst +++ b/contrib/python/cachetools/py3/README.rst @@ -91,15 +91,16 @@ Related Projects ------------------------------------------------------------------------ - asyncache_: Helpers to use cachetools with async functions +- cacheing_: Pure Python Cacheing Library - CacheToolsUtils_: Cachetools Utilities -- `kids.cache`_: Kids caching library +- kids.cache_: Kids caching library - shelved-cache_: Persistent cache for Python cachetools License ------------------------------------------------------------------------ -Copyright (c) 2014-2023 Thomas Kemmer. +Copyright (c) 2014-2024 Thomas Kemmer. Licensed under the `MIT License`_. @@ -118,6 +119,7 @@ Licensed under the `MIT License`_. .. _MIT License: https://raw.github.com/tkem/cachetools/master/LICENSE .. _asyncache: https://pypi.org/project/asyncache/ +.. _cacheing: https://github.com/breid48/cacheing .. _CacheToolsUtils: https://pypi.org/project/CacheToolsUtils/ .. _kids.cache: https://pypi.org/project/kids.cache/ .. _shelved-cache: https://pypi.org/project/shelved-cache/ diff --git a/contrib/python/cachetools/py3/cachetools/__init__.py b/contrib/python/cachetools/py3/cachetools/__init__.py index 61c12bef47..341c1c7ff0 100644 --- a/contrib/python/cachetools/py3/cachetools/__init__.py +++ b/contrib/python/cachetools/py3/cachetools/__init__.py @@ -13,7 +13,7 @@ __all__ = ( "cachedmethod", ) -__version__ = "5.3.2" +__version__ = "5.3.3" import collections import collections.abc diff --git a/contrib/python/cachetools/py3/ya.make b/contrib/python/cachetools/py3/ya.make index 25d5ac4cdf..71b6f19603 100644 --- a/contrib/python/cachetools/py3/ya.make +++ b/contrib/python/cachetools/py3/ya.make @@ -2,7 +2,7 @@ PY3_LIBRARY() -VERSION(5.3.2) +VERSION(5.3.3) LICENSE(MIT) diff --git a/contrib/python/future/py3/.dist-info/METADATA b/contrib/python/future/py3/.dist-info/METADATA index 124bf500d0..3d0e5512c6 100644 --- a/contrib/python/future/py3/.dist-info/METADATA +++ b/contrib/python/future/py3/.dist-info/METADATA @@ -1,13 +1,13 @@ Metadata-Version: 2.1 Name: future -Version: 0.18.3 +Version: 1.0.0 Summary: Clean single-source support for Python 3 and 2 Home-page: https://python-future.org Author: Ed Schofield Author-email: ed@pythoncharmers.com License: MIT +Project-URL: Source, https://github.com/PythonCharmers/python-future Keywords: future past python3 migration futurize backport six 2to3 modernize pasteurize 3to2 -Platform: UNKNOWN Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 2 Classifier: Programming Language :: Python :: 2.6 @@ -18,11 +18,17 @@ Classifier: Programming Language :: Python :: 3.4 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 :: 3.11 +Classifier: Programming Language :: Python :: 3.12 Classifier: License :: OSI Approved Classifier: License :: OSI Approved :: MIT License -Classifier: Development Status :: 4 - Beta +Classifier: Development Status :: 6 - Mature Classifier: Intended Audience :: Developers Requires-Python: >=2.6, !=3.0.*, !=3.1.*, !=3.2.* +License-File: LICENSE.txt future: Easy, safe support for Python 2/3 compatibility @@ -78,7 +84,7 @@ Automatic conversion -------------------- An included script called `futurize -<http://python-future.org/automatic_conversion.html>`_ aids in converting +<https://python-future.org/automatic_conversion.html>`_ aids in converting code (from either Python 2 or Python 3) to code compatible with both platforms. It is similar to ``python-modernize`` but goes further in providing Python 3 compatibility through the use of the backported types @@ -88,22 +94,19 @@ and builtin functions in ``future``. Documentation ------------- -See: http://python-future.org +See: https://python-future.org Credits ------- :Author: Ed Schofield, Jordan M. Adler, et al -:Sponsor: Python Charmers Pty Ltd, Australia, and Python Charmers Pte - Ltd, Singapore. http://pythoncharmers.com -:Others: See docs/credits.rst or http://python-future.org/credits.html +:Sponsor: Python Charmers: https://pythoncharmers.com +:Others: See docs/credits.rst or https://python-future.org/credits.html Licensing --------- -Copyright 2013-2019 Python Charmers Pty Ltd, Australia. +Copyright 2013-2024 Python Charmers, Australia. The software is distributed under an MIT licence. See LICENSE.txt. - - diff --git a/contrib/python/future/py3/.dist-info/entry_points.txt b/contrib/python/future/py3/.dist-info/entry_points.txt index 45d1a880fb..74aec276c8 100644 --- a/contrib/python/future/py3/.dist-info/entry_points.txt +++ b/contrib/python/future/py3/.dist-info/entry_points.txt @@ -1,4 +1,3 @@ [console_scripts] futurize = libfuturize.main:main pasteurize = libpasteurize.main:main - diff --git a/contrib/python/future/py3/LICENSE.txt b/contrib/python/future/py3/LICENSE.txt index 4c904dba8f..275cafd303 100644 --- a/contrib/python/future/py3/LICENSE.txt +++ b/contrib/python/future/py3/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright (c) 2013-2019 Python Charmers Pty Ltd, Australia +Copyright (c) 2013-2024 Python Charmers, Australia Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/contrib/python/future/py3/README.rst b/contrib/python/future/py3/README.rst index 1ab43e53d7..a3aceb7d4a 100644 --- a/contrib/python/future/py3/README.rst +++ b/contrib/python/future/py3/README.rst @@ -3,11 +3,8 @@ Overview: Easy, clean, reliable Python 2/3 compatibility ======================================================== -.. image:: https://travis-ci.org/PythonCharmers/python-future.svg?branch=master - :target: https://travis-ci.org/PythonCharmers/python-future - -.. image:: https://readthedocs.org/projects/python-future/badge/?version=latest - :target: https://python-future.readthedocs.io/en/latest/?badge=latest +.. image:: https://github.com/PythonCharmers/python-future/actions/workflows/ci.yml/badge.svg?branch=master + :target: https://github.com/PythonCharmers/python-future/actions/workflows/ci.yml?query=branch%3Amaster ``python-future`` is the missing compatibility layer between Python 2 and Python 3. It allows you to use a single, clean Python 3.x-compatible @@ -19,9 +16,21 @@ ports of features from Python 3 and 2. It also comes with ``futurize`` and either Py2 or Py3 code easily to support both Python 2 and 3 in a single clean Py3-style codebase, module by module. -Notable projects that use ``python-future`` for Python 2/3 compatibility -are `Mezzanine <http://mezzanine.jupo.org/>`_ and `ObsPy -<http://obspy.org>`_. +The ``python-future`` project has been downloaded over 1.7 billion times. + +.. _status + +Status +------ + +The ``python-future`` project was created in 2013 to attempt to save Python from +the schism of version incompatibility that was threatening to tear apart the +language (as Perl 6 contributed to the death of Perl). + +That time is now past. Thanks to a huge porting effort across the Python +community, Python 3 eventually thrived. Python 2 reached its end of life in +2020 and the ``python-future`` package should no longer be necessary. Use it to +help with porting legacy code to Python 3 but don't depend on it for new code. .. _features: @@ -223,11 +232,14 @@ into this code which runs on both Py2 and Py3: name = input() greet(name) +The first four lines have no effect under Python 3 and can be removed from +the codebase when Python 2 compatibility is no longer required. + See :ref:`forwards-conversion` and :ref:`backwards-conversion` for more details. Automatic translation ---------------------- +~~~~~~~~~~~~~~~~~~~~~ The ``past`` package can automatically translate some simple Python 2 modules to Python 3 upon import. The goal is to support the "long tail" of @@ -264,10 +276,9 @@ properly to a Python 2/3 compatible codebase using a tool like Note: the auto-translation feature is still in alpha; it needs more testing and development, and will likely never be perfect. -For more info, see :ref:`translation`. Pre-commit hooks ----------------- +~~~~~~~~~~~~~~~~ `Pre-commit <https://pre-commit.com/>`_ is a framework for managing and maintaining multi-language pre-commit hooks. @@ -304,23 +315,25 @@ Licensing :Author: Ed Schofield, Jordan M. Adler, et al -:Copyright: 2013-2019 Python Charmers Pty Ltd, Australia. +:Copyright: 2013-2024 Python Charmers, Australia. -:Sponsors: Python Charmers Pty Ltd, Australia, and Python Charmers Pte - Ltd, Singapore. http://pythoncharmers.com +:Sponsors: Python Charmers: https://pythoncharmers.com - Pinterest https://opensource.pinterest.com/ + Pinterest https://opensource.pinterest.com -:Licence: MIT. See ``LICENSE.txt`` or `here <http://python-future.org/credits.html>`_. +:Licence: MIT. See ``LICENSE.txt`` or `here <https://python-future.org/credits.html>`_. -:Other credits: See `here <http://python-future.org/credits.html>`_. +:Other credits: See `here <https://python-future.org/credits.html>`_. +Docs +---- +See the docs `here <https://python-future.org>`_. Next steps ---------- If you are new to Python-Future, check out the `Quickstart Guide -<http://python-future.org/quickstart.html>`_. +<https://python-future.org/quickstart.html>`_. For an update on changes in the latest version, see the `What's New -<http://python-future.org/whatsnew.html>`_ page. +<https://python-future.org/whatsnew.html>`_ page. diff --git a/contrib/python/future/py3/future/__init__.py b/contrib/python/future/py3/future/__init__.py index b609299a7a..b097fd81eb 100644 --- a/contrib/python/future/py3/future/__init__.py +++ b/contrib/python/future/py3/future/__init__.py @@ -52,7 +52,7 @@ Automatic conversion -------------------- An included script called `futurize -<http://python-future.org/automatic_conversion.html>`_ aids in converting +<https://python-future.org/automatic_conversion.html>`_ aids in converting code (from either Python 2 or Python 3) to code compatible with both platforms. It is similar to ``python-modernize`` but goes further in providing Python 3 compatibility through the use of the backported types @@ -62,21 +62,20 @@ and builtin functions in ``future``. Documentation ------------- -See: http://python-future.org +See: https://python-future.org Credits ------- :Author: Ed Schofield, Jordan M. Adler, et al -:Sponsor: Python Charmers Pty Ltd, Australia, and Python Charmers Pte - Ltd, Singapore. http://pythoncharmers.com -:Others: See docs/credits.rst or http://python-future.org/credits.html +:Sponsor: Python Charmers: https://pythoncharmers.com +:Others: See docs/credits.rst or https://python-future.org/credits.html Licensing --------- -Copyright 2013-2019 Python Charmers Pty Ltd, Australia. +Copyright 2013-2024 Python Charmers, Australia. The software is distributed under an MIT licence. See LICENSE.txt. """ @@ -84,10 +83,10 @@ The software is distributed under an MIT licence. See LICENSE.txt. __title__ = 'future' __author__ = 'Ed Schofield' __license__ = 'MIT' -__copyright__ = 'Copyright 2013-2019 Python Charmers Pty Ltd' -__ver_major__ = 0 -__ver_minor__ = 18 -__ver_patch__ = 3 +__copyright__ = 'Copyright 2013-2024 Python Charmers (https://pythoncharmers.com)' +__ver_major__ = 1 +__ver_minor__ = 0 +__ver_patch__ = 0 __ver_sub__ = '' __version__ = "%d.%d.%d%s" % (__ver_major__, __ver_minor__, __ver_patch__, __ver_sub__) diff --git a/contrib/python/future/py3/future/backports/datetime.py b/contrib/python/future/py3/future/backports/datetime.py index 3261014e05..8cd62ddfa5 100644 --- a/contrib/python/future/py3/future/backports/datetime.py +++ b/contrib/python/future/py3/future/backports/datetime.py @@ -689,7 +689,7 @@ class date(object): @classmethod def fromordinal(cls, n): - """Contruct a date from a proleptic Gregorian ordinal. + """Construct a date from a proleptic Gregorian ordinal. January 1 of year 1 is day 1. Only the year, month and day are non-zero in the result. diff --git a/contrib/python/future/py3/future/backports/email/_header_value_parser.py b/contrib/python/future/py3/future/backports/email/_header_value_parser.py index 43957edc12..59b1b318f3 100644 --- a/contrib/python/future/py3/future/backports/email/_header_value_parser.py +++ b/contrib/python/future/py3/future/backports/email/_header_value_parser.py @@ -2867,7 +2867,7 @@ def parse_content_type_header(value): _find_mime_parameters(ctype, value) return ctype ctype.append(token) - # XXX: If we really want to follow the formal grammer we should make + # XXX: If we really want to follow the formal grammar we should make # mantype and subtype specialized TokenLists here. Probably not worth it. if not value or value[0] != '/': ctype.defects.append(errors.InvalidHeaderDefect( diff --git a/contrib/python/future/py3/future/backports/email/parser.py b/contrib/python/future/py3/future/backports/email/parser.py index df1c6e2868..79f0e5a33e 100644 --- a/contrib/python/future/py3/future/backports/email/parser.py +++ b/contrib/python/future/py3/future/backports/email/parser.py @@ -26,7 +26,7 @@ class Parser(object): textual representation of the message. The string must be formatted as a block of RFC 2822 headers and header - continuation lines, optionally preceeded by a `Unix-from' header. The + continuation lines, optionally preceded by a `Unix-from' header. The header block is terminated either by the end of the string or by a blank line. @@ -92,7 +92,7 @@ class BytesParser(object): textual representation of the message. The input must be formatted as a block of RFC 2822 headers and header - continuation lines, optionally preceeded by a `Unix-from' header. The + continuation lines, optionally preceded by a `Unix-from' header. The header block is terminated either by the end of the input or by a blank line. diff --git a/contrib/python/future/py3/future/backports/http/cookiejar.py b/contrib/python/future/py3/future/backports/http/cookiejar.py index 0ad80a0258..a39242c082 100644 --- a/contrib/python/future/py3/future/backports/http/cookiejar.py +++ b/contrib/python/future/py3/future/backports/http/cookiejar.py @@ -1851,7 +1851,7 @@ def lwp_cookie_str(cookie): class LWPCookieJar(FileCookieJar): """ The LWPCookieJar saves a sequence of "Set-Cookie3" lines. - "Set-Cookie3" is the format used by the libwww-perl libary, not known + "Set-Cookie3" is the format used by the libwww-perl library, not known to be compatible with any browser, but which is easy to read and doesn't lose information about RFC 2965 cookies. diff --git a/contrib/python/future/py3/future/backports/xmlrpc/client.py b/contrib/python/future/py3/future/backports/xmlrpc/client.py index 3f0cae9b00..5c2cee0958 100644 --- a/contrib/python/future/py3/future/backports/xmlrpc/client.py +++ b/contrib/python/future/py3/future/backports/xmlrpc/client.py @@ -133,9 +133,9 @@ from __future__ import (absolute_import, division, print_function, unicode_literals) from future.builtins import bytes, dict, int, range, str -import sys import base64 -if sys.version_info[0] < 3: +import sys +if sys.version_info < (3, 9): # Py2.7 compatibility hack base64.encodebytes = base64.encodestring base64.decodebytes = base64.decodestring @@ -1255,7 +1255,7 @@ class Transport(object): # Send HTTP request. # # @param host Host descriptor (URL or (URL, x509 info) tuple). - # @param handler Targer RPC handler (a path relative to host) + # @param handler Target RPC handler (a path relative to host) # @param request_body The XML-RPC request body # @param debug Enable debugging if debug is true. # @return An HTTPConnection. diff --git a/contrib/python/future/py3/future/builtins/__init__.py b/contrib/python/future/py3/future/builtins/__init__.py index 8bc1649d2f..1734cd45fe 100644 --- a/contrib/python/future/py3/future/builtins/__init__.py +++ b/contrib/python/future/py3/future/builtins/__init__.py @@ -2,7 +2,7 @@ A module that brings in equivalents of the new and modified Python 3 builtins into Py2. Has no effect on Py3. -See the docs `here <http://python-future.org/what-else.html>`_ +See the docs `here <https://python-future.org/what-else.html>`_ (``docs/what-else.rst``) for more information. """ diff --git a/contrib/python/future/py3/future/moves/_dummy_thread.py b/contrib/python/future/py3/future/moves/_dummy_thread.py index e5dca348fb..6633f42e0c 100644 --- a/contrib/python/future/py3/future/moves/_dummy_thread.py +++ b/contrib/python/future/py3/future/moves/_dummy_thread.py @@ -1,11 +1,13 @@ from __future__ import absolute_import -from future.utils import PY3 +from future.utils import PY3, PY39_PLUS -if PY3: - try: + +if PY39_PLUS: + # _dummy_thread and dummy_threading modules were both deprecated in + # Python 3.7 and removed in Python 3.9 + from _thread import * +elif PY3: from _dummy_thread import * - except ImportError: - from _thread import * else: __future_module__ = True from dummy_thread import * diff --git a/contrib/python/future/py3/future/moves/multiprocessing.py b/contrib/python/future/py3/future/moves/multiprocessing.py new file mode 100644 index 0000000000..a871b676f4 --- /dev/null +++ b/contrib/python/future/py3/future/moves/multiprocessing.py @@ -0,0 +1,7 @@ +from __future__ import absolute_import +from future.utils import PY3 + +from multiprocessing import * +if not PY3: + __future_module__ = True + from multiprocessing.queues import SimpleQueue diff --git a/contrib/python/future/py3/future/standard_library/__init__.py b/contrib/python/future/py3/future/standard_library/__init__.py index cf870ad0ce..d467aaf492 100644 --- a/contrib/python/future/py3/future/standard_library/__init__.py +++ b/contrib/python/future/py3/future/standard_library/__init__.py @@ -17,7 +17,7 @@ And then these normal Py3 imports work on both Py3 and Py2:: import socketserver import winreg # on Windows only import test.support - import html, html.parser, html.entites + import html, html.parser, html.entities import http, http.client, http.server import http.cookies, http.cookiejar import urllib.parse, urllib.request, urllib.response, urllib.error, urllib.robotparser @@ -33,6 +33,7 @@ And then these normal Py3 imports work on both Py3 and Py2:: from collections import OrderedDict, Counter, ChainMap # even on Py2.6 from subprocess import getoutput, getstatusoutput from subprocess import check_output # even on Py2.6 + from multiprocessing import SimpleQueue (The renamed modules and functions are still available under their old names on Python 2.) @@ -62,9 +63,12 @@ from __future__ import absolute_import, division, print_function import sys import logging -import importlib +# imp was deprecated in python 3.6 +if sys.version_info >= (3, 6): + import importlib as imp +else: + import imp import contextlib -import types import copy import os @@ -108,6 +112,7 @@ RENAMES = { 'future.moves.socketserver': 'socketserver', 'ConfigParser': 'configparser', 'repr': 'reprlib', + 'multiprocessing.queues': 'multiprocessing', # 'FileDialog': 'tkinter.filedialog', # 'tkFileDialog': 'tkinter.filedialog', # 'SimpleDialog': 'tkinter.simpledialog', @@ -184,6 +189,7 @@ MOVES = [('collections', 'UserList', 'UserList', 'UserList'), ('itertools', 'filterfalse','itertools', 'ifilterfalse'), ('itertools', 'zip_longest','itertools', 'izip_longest'), ('sys', 'intern','__builtin__', 'intern'), + ('multiprocessing', 'SimpleQueue', 'multiprocessing.queues', 'SimpleQueue'), # The re module has no ASCII flag in Py2, but this is the default. # Set re.ASCII to a zero constant. stat.ST_MODE just happens to be one # (and it exists on Py2.6+). @@ -297,7 +303,8 @@ class RenameImport(object): flog.debug('What to do here?') name = bits[0] - return importlib.import_module(name, path) + module_info = imp.find_module(name, path) + return imp.load_module(name, *module_info) class hooks(object): diff --git a/contrib/python/future/py3/future/types/newint.py b/contrib/python/future/py3/future/types/newint.py index 04a411e933..ebc5715e2b 100644 --- a/contrib/python/future/py3/future/types/newint.py +++ b/contrib/python/future/py3/future/types/newint.py @@ -223,9 +223,11 @@ class newint(with_metaclass(BaseNewInt, long)): def __rpow__(self, other): value = super(newint, self).__rpow__(other) - if value is NotImplemented: + if isint(value): + return newint(value) + elif value is NotImplemented: return other ** long(self) - return newint(value) + return value def __lshift__(self, other): if not isint(other): @@ -318,7 +320,7 @@ class newint(with_metaclass(BaseNewInt, long)): bits = length * 8 num = (2**bits) + self if num <= 0: - raise OverflowError("int too smal to convert") + raise OverflowError("int too small to convert") else: if self < 0: raise OverflowError("can't convert negative int to unsigned") diff --git a/contrib/python/future/py3/future/types/newrange.py b/contrib/python/future/py3/future/types/newrange.py index 6d4ebe2f8f..dc5eb80222 100644 --- a/contrib/python/future/py3/future/types/newrange.py +++ b/contrib/python/future/py3/future/types/newrange.py @@ -105,7 +105,7 @@ class newrange(Sequence): raise ValueError('%r is not in range' % value) def count(self, value): - """Return the number of ocurrences of integer `value` + """Return the number of occurrences of integer `value` in the sequence this range represents.""" # a value can occur exactly zero or one times return int(value in self) diff --git a/contrib/python/future/py3/past/__init__.py b/contrib/python/future/py3/past/__init__.py index 1471303933..54619e0a60 100644 --- a/contrib/python/future/py3/past/__init__.py +++ b/contrib/python/future/py3/past/__init__.py @@ -75,12 +75,12 @@ Credits ------- :Author: Ed Schofield, Jordan M. Adler, et al -:Sponsor: Python Charmers Pty Ltd, Australia: http://pythoncharmers.com +:Sponsor: Python Charmers: https://pythoncharmers.com Licensing --------- -Copyright 2013-2019 Python Charmers Pty Ltd, Australia. +Copyright 2013-2024 Python Charmers, Australia. The software is distributed under an MIT licence. See LICENSE.txt. """ diff --git a/contrib/python/future/py3/past/builtins/misc.py b/contrib/python/future/py3/past/builtins/misc.py index 3600695c0a..0b8e6a986c 100644 --- a/contrib/python/future/py3/past/builtins/misc.py +++ b/contrib/python/future/py3/past/builtins/misc.py @@ -1,11 +1,13 @@ from __future__ import unicode_literals import inspect +import sys import math import numbers from future.utils import PY2, PY3, exec_ + if PY2: from collections import Mapping else: @@ -103,13 +105,12 @@ if PY3: return '0' + builtins.oct(number)[2:] raw_input = input - - try: + # imp was deprecated in python 3.6 + if sys.version_info >= (3, 6): from importlib import reload - except ImportError: + else: # for python2, python3 <= 3.4 from imp import reload - unicode = str unichr = chr xrange = range diff --git a/contrib/python/future/py3/ya.make b/contrib/python/future/py3/ya.make index de25d7e8d1..a219deb605 100644 --- a/contrib/python/future/py3/ya.make +++ b/contrib/python/future/py3/ya.make @@ -2,7 +2,7 @@ PY3_LIBRARY() -VERSION(0.18.3) +VERSION(1.0.0) LICENSE(MIT) @@ -100,6 +100,7 @@ PY_SRCS( future/moves/http/cookies.py future/moves/http/server.py future/moves/itertools.py + future/moves/multiprocessing.py future/moves/pickle.py future/moves/queue.py future/moves/reprlib.py |