aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2024-05-19 11:35:22 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2024-05-19 11:44:32 +0300
commitbb9c10437b76836b45b5a31a3dbcb2c3b206d18f (patch)
treeffb379598491b836aed6be405815b3bb536e4c02
parentd7ee09f3b10a1132e4abb80d5a279387d124d785 (diff)
downloadydb-bb9c10437b76836b45b5a31a3dbcb2c3b206d18f.tar.gz
Intermediate changes
-rw-r--r--contrib/python/Flask-Cors/py3/.dist-info/METADATA31
-rw-r--r--contrib/python/Flask-Cors/py3/README.rst26
-rw-r--r--contrib/python/Flask-Cors/py3/flask_cors/extension.py10
-rw-r--r--contrib/python/Flask-Cors/py3/flask_cors/version.py2
-rw-r--r--contrib/python/Flask-Cors/py3/ya.make2
-rw-r--r--contrib/python/hypothesis/py3/.dist-info/METADATA2
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/internal/coverage.py3
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/internal/reflection.py19
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/strategies/_internal/core.py21
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/version.py2
-rw-r--r--contrib/python/hypothesis/py3/ya.make2
11 files changed, 75 insertions, 45 deletions
diff --git a/contrib/python/Flask-Cors/py3/.dist-info/METADATA b/contrib/python/Flask-Cors/py3/.dist-info/METADATA
index bd0c55a2b8..32d8407be9 100644
--- a/contrib/python/Flask-Cors/py3/.dist-info/METADATA
+++ b/contrib/python/Flask-Cors/py3/.dist-info/METADATA
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: Flask-Cors
-Version: 4.0.0
+Version: 4.0.1
Summary: A Flask extension adding a decorator for CORS support
Home-page: https://github.com/corydolphin/flask-cors
Author: Cory Dolphin
@@ -16,12 +16,13 @@ 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: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Software Development :: Libraries :: Python Modules
License-File: LICENSE
-Requires-Dist: Flask (>=0.9)
+Requires-Dist: Flask >=0.9
Flask-CORS
==========
@@ -31,10 +32,10 @@ Flask-CORS
A Flask extension for handling Cross Origin Resource Sharing (CORS), making cross-origin AJAX possible.
-This package has a simple philosophy: when you want to enable CORS, you wish to enable it for all use cases on a domain.
-This means no mucking around with different allowed headers, methods, etc.
+This package has a simple philosophy: when you want to enable CORS, you wish to enable it for all use cases on a domain.
+This means no mucking around with different allowed headers, methods, etc.
-By default, submission of cookies across domains is disabled due to the security implications.
+By default, submission of cookies across domains is disabled due to the security implications.
Please see the documentation for how to enable credential'ed requests, and please make sure you add some sort of `CSRF <http://en.wikipedia.org/wiki/Cross-site_request_forgery>`__ protection before doing so!
Installation
@@ -49,14 +50,14 @@ Install the extension with using pip, or easy\_install.
Usage
-----
-This package exposes a Flask extension which by default enables CORS support on all routes, for all origins and methods.
-It allows parameterization of all CORS headers on a per-resource level.
+This package exposes a Flask extension which by default enables CORS support on all routes, for all origins and methods.
+It allows parameterization of all CORS headers on a per-resource level.
The package also contains a decorator, for those who prefer this approach.
Simple Usage
~~~~~~~~~~~~
-In the simplest case, initialize the Flask-Cors extension with default arguments in order to allow CORS for all domains on all routes.
+In the simplest case, initialize the Flask-Cors extension with default arguments in order to allow CORS for all domains on all routes.
See the full list of options in the `documentation <https://flask-cors.corydolphin.com/en/latest/api.html#extension>`__.
.. code:: python
@@ -75,7 +76,7 @@ See the full list of options in the `documentation <https://flask-cors.corydolph
Resource specific CORS
^^^^^^^^^^^^^^^^^^^^^^
-Alternatively, you can specify CORS options on a resource and origin level of granularity by passing a dictionary as the `resources` option, mapping paths to a set of options.
+Alternatively, you can specify CORS options on a resource and origin level of granularity by passing a dictionary as the `resources` option, mapping paths to a set of options.
See the full list of options in the `documentation <https://flask-cors.corydolphin.com/en/latest/api.html#extension>`__.
.. code:: python
@@ -90,8 +91,8 @@ See the full list of options in the `documentation <https://flask-cors.corydolph
Route specific CORS via decorator
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-This extension also exposes a simple decorator to decorate flask routes with.
-Simply add ``@cross_origin()`` below a call to Flask's ``@app.route(..)`` to allow CORS on a given route.
+This extension also exposes a simple decorator to decorate flask routes with.
+Simply add ``@cross_origin()`` below a call to Flask's ``@app.route(..)`` to allow CORS on a given route.
See the full list of options in the `decorator documentation <https://flask-cors.corydolphin.com/en/latest/api.html#decorator>`__.
.. code:: python
@@ -119,7 +120,7 @@ If things aren't working as you expect, enable logging to help understand what i
Tests
-----
-A simple set of tests is included in ``test/``.
+A simple set of tests is included in ``test/``.
To run, install nose, and simply invoke ``nosetests`` or ``python setup.py test`` to exercise the tests.
If nosetests does not work for you, due to it no longer working with newer python versions.
@@ -128,8 +129,8 @@ You can use pytest to run the tests instead.
Contributing
------------
-Questions, comments or improvements?
-Please create an issue on `Github <https://github.com/corydolphin/flask-cors>`__, tweet at `@corydolphin <https://twitter.com/corydolphin>`__ or send me an email.
+Questions, comments or improvements?
+Please create an issue on `Github <https://github.com/corydolphin/flask-cors>`__, tweet at `@corydolphin <https://twitter.com/corydolphin>`__ or send me an email.
I do my best to include every contribution proposed in any way that I can.
Credits
@@ -137,7 +138,7 @@ Credits
This Flask extension is based upon the `Decorator for the HTTP Access Control <https://web.archive.org/web/20190128010149/http://flask.pocoo.org/snippets/56/>`__ written by Armin Ronacher.
-.. |Build Status| image:: https://api.travis-ci.org/corydolphin/flask-cors.svg?branch=master
+.. |Build Status| image:: https://github.com/corydolphin/flask-cors/actions/workflows/unittests.yaml/badge.svg
:target: https://travis-ci.org/corydolphin/flask-cors
.. |Latest Version| image:: https://img.shields.io/pypi/v/Flask-Cors.svg
:target: https://pypi.python.org/pypi/Flask-Cors/
diff --git a/contrib/python/Flask-Cors/py3/README.rst b/contrib/python/Flask-Cors/py3/README.rst
index f90ac6ca48..091ef4cf61 100644
--- a/contrib/python/Flask-Cors/py3/README.rst
+++ b/contrib/python/Flask-Cors/py3/README.rst
@@ -6,10 +6,10 @@ Flask-CORS
A Flask extension for handling Cross Origin Resource Sharing (CORS), making cross-origin AJAX possible.
-This package has a simple philosophy: when you want to enable CORS, you wish to enable it for all use cases on a domain.
-This means no mucking around with different allowed headers, methods, etc.
+This package has a simple philosophy: when you want to enable CORS, you wish to enable it for all use cases on a domain.
+This means no mucking around with different allowed headers, methods, etc.
-By default, submission of cookies across domains is disabled due to the security implications.
+By default, submission of cookies across domains is disabled due to the security implications.
Please see the documentation for how to enable credential'ed requests, and please make sure you add some sort of `CSRF <http://en.wikipedia.org/wiki/Cross-site_request_forgery>`__ protection before doing so!
Installation
@@ -24,14 +24,14 @@ Install the extension with using pip, or easy\_install.
Usage
-----
-This package exposes a Flask extension which by default enables CORS support on all routes, for all origins and methods.
-It allows parameterization of all CORS headers on a per-resource level.
+This package exposes a Flask extension which by default enables CORS support on all routes, for all origins and methods.
+It allows parameterization of all CORS headers on a per-resource level.
The package also contains a decorator, for those who prefer this approach.
Simple Usage
~~~~~~~~~~~~
-In the simplest case, initialize the Flask-Cors extension with default arguments in order to allow CORS for all domains on all routes.
+In the simplest case, initialize the Flask-Cors extension with default arguments in order to allow CORS for all domains on all routes.
See the full list of options in the `documentation <https://flask-cors.corydolphin.com/en/latest/api.html#extension>`__.
.. code:: python
@@ -50,7 +50,7 @@ See the full list of options in the `documentation <https://flask-cors.corydolph
Resource specific CORS
^^^^^^^^^^^^^^^^^^^^^^
-Alternatively, you can specify CORS options on a resource and origin level of granularity by passing a dictionary as the `resources` option, mapping paths to a set of options.
+Alternatively, you can specify CORS options on a resource and origin level of granularity by passing a dictionary as the `resources` option, mapping paths to a set of options.
See the full list of options in the `documentation <https://flask-cors.corydolphin.com/en/latest/api.html#extension>`__.
.. code:: python
@@ -65,8 +65,8 @@ See the full list of options in the `documentation <https://flask-cors.corydolph
Route specific CORS via decorator
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-This extension also exposes a simple decorator to decorate flask routes with.
-Simply add ``@cross_origin()`` below a call to Flask's ``@app.route(..)`` to allow CORS on a given route.
+This extension also exposes a simple decorator to decorate flask routes with.
+Simply add ``@cross_origin()`` below a call to Flask's ``@app.route(..)`` to allow CORS on a given route.
See the full list of options in the `decorator documentation <https://flask-cors.corydolphin.com/en/latest/api.html#decorator>`__.
.. code:: python
@@ -94,7 +94,7 @@ If things aren't working as you expect, enable logging to help understand what i
Tests
-----
-A simple set of tests is included in ``test/``.
+A simple set of tests is included in ``test/``.
To run, install nose, and simply invoke ``nosetests`` or ``python setup.py test`` to exercise the tests.
If nosetests does not work for you, due to it no longer working with newer python versions.
@@ -103,8 +103,8 @@ You can use pytest to run the tests instead.
Contributing
------------
-Questions, comments or improvements?
-Please create an issue on `Github <https://github.com/corydolphin/flask-cors>`__, tweet at `@corydolphin <https://twitter.com/corydolphin>`__ or send me an email.
+Questions, comments or improvements?
+Please create an issue on `Github <https://github.com/corydolphin/flask-cors>`__, tweet at `@corydolphin <https://twitter.com/corydolphin>`__ or send me an email.
I do my best to include every contribution proposed in any way that I can.
Credits
@@ -112,7 +112,7 @@ Credits
This Flask extension is based upon the `Decorator for the HTTP Access Control <https://web.archive.org/web/20190128010149/http://flask.pocoo.org/snippets/56/>`__ written by Armin Ronacher.
-.. |Build Status| image:: https://api.travis-ci.org/corydolphin/flask-cors.svg?branch=master
+.. |Build Status| image:: https://github.com/corydolphin/flask-cors/actions/workflows/unittests.yaml/badge.svg
:target: https://travis-ci.org/corydolphin/flask-cors
.. |Latest Version| image:: https://img.shields.io/pypi/v/Flask-Cors.svg
:target: https://pypi.python.org/pypi/Flask-Cors/
diff --git a/contrib/python/Flask-Cors/py3/flask_cors/extension.py b/contrib/python/Flask-Cors/py3/flask_cors/extension.py
index c00cbfff9a..6361dccfd9 100644
--- a/contrib/python/Flask-Cors/py3/flask_cors/extension.py
+++ b/contrib/python/Flask-Cors/py3/flask_cors/extension.py
@@ -70,9 +70,11 @@ class CORS(object):
The origin(s) may be regular expressions, case-sensitive strings,
or else an asterisk.
- :note: origins must include the schema and the port (if not port 80),
- e.g.,
- `CORS(app, origins=["http://localhost:8000", "https://example.com"])`.
+ .. note::
+
+ origins must include the schema and the port (if not port 80),
+ e.g.,
+ `CORS(app, origins=["http://localhost:8000", "https://example.com"])`.
Default : '*'
:type origins: list, string or regex
@@ -191,7 +193,7 @@ def make_after_request_function(resources):
normalized_path = unquote_plus(request.path)
for res_regex, res_options in resources:
if try_match(normalized_path, res_regex):
- LOG.debug("Request to '%s' matches CORS resource '%s'. Using options: %s",
+ LOG.debug("Request to '%r' matches CORS resource '%s'. Using options: %s",
request.path, get_regexp_pattern(res_regex), res_options)
set_cors_headers(resp, res_options)
break
diff --git a/contrib/python/Flask-Cors/py3/flask_cors/version.py b/contrib/python/Flask-Cors/py3/flask_cors/version.py
index d6497a814c..1a3bef5327 100644
--- a/contrib/python/Flask-Cors/py3/flask_cors/version.py
+++ b/contrib/python/Flask-Cors/py3/flask_cors/version.py
@@ -1 +1 @@
-__version__ = '4.0.0'
+__version__ = '4.0.1'
diff --git a/contrib/python/Flask-Cors/py3/ya.make b/contrib/python/Flask-Cors/py3/ya.make
index c179084ec3..36ff4238c9 100644
--- a/contrib/python/Flask-Cors/py3/ya.make
+++ b/contrib/python/Flask-Cors/py3/ya.make
@@ -2,7 +2,7 @@
PY3_LIBRARY()
-VERSION(4.0.0)
+VERSION(4.0.1)
LICENSE(MIT)
diff --git a/contrib/python/hypothesis/py3/.dist-info/METADATA b/contrib/python/hypothesis/py3/.dist-info/METADATA
index 79347abbf0..784ab51a97 100644
--- a/contrib/python/hypothesis/py3/.dist-info/METADATA
+++ b/contrib/python/hypothesis/py3/.dist-info/METADATA
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: hypothesis
-Version: 6.100.2
+Version: 6.100.4
Summary: A library for property-based testing
Home-page: https://hypothesis.works
Author: David R. MacIver and Zac Hatfield-Dodds
diff --git a/contrib/python/hypothesis/py3/hypothesis/internal/coverage.py b/contrib/python/hypothesis/py3/hypothesis/internal/coverage.py
index c71ce28642..57b9f8ed04 100644
--- a/contrib/python/hypothesis/py3/hypothesis/internal/coverage.py
+++ b/contrib/python/hypothesis/py3/hypothesis/internal/coverage.py
@@ -48,6 +48,7 @@ def pretty_file_name(f):
IN_COVERAGE_TESTS = os.getenv("HYPOTHESIS_INTERNAL_COVERAGE") == "true"
+description_stack = []
if IN_COVERAGE_TESTS:
@@ -64,8 +65,6 @@ if IN_COVERAGE_TESTS:
with open(f"branch-check-{os.getpid()}", mode="a", encoding="utf-8") as log:
log.write(json.dumps({"name": name, "value": value}) + "\n")
- description_stack = []
-
@contextmanager
def check_block(name, depth):
# We add an extra two callers to the stack: One for the contextmanager
diff --git a/contrib/python/hypothesis/py3/hypothesis/internal/reflection.py b/contrib/python/hypothesis/py3/hypothesis/internal/reflection.py
index c9ffa6eb2d..b3bb52c67e 100644
--- a/contrib/python/hypothesis/py3/hypothesis/internal/reflection.py
+++ b/contrib/python/hypothesis/py3/hypothesis/internal/reflection.py
@@ -27,8 +27,9 @@ from keyword import iskeyword
from random import _inst as global_random_instance
from tokenize import COMMENT, detect_encoding, generate_tokens, untokenize
from types import ModuleType
-from typing import TYPE_CHECKING, Any, Callable
+from typing import TYPE_CHECKING, Any, Callable, MutableMapping
from unittest.mock import _patch as PatchType
+from weakref import WeakKeyDictionary
from hypothesis.errors import HypothesisWarning
from hypothesis.internal.compat import PYPY, is_typed_named_tuple
@@ -39,6 +40,7 @@ if TYPE_CHECKING:
from hypothesis.strategies._internal.strategies import T
READTHEDOCS = os.environ.get("READTHEDOCS", None) == "True"
+LAMBDA_SOURCE_CACHE: MutableMapping[Callable, str] = WeakKeyDictionary()
def is_mock(obj):
@@ -303,7 +305,7 @@ SPACE_FOLLOWS_OPEN_BRACKET = re.compile(r"\( ")
SPACE_PRECEDES_CLOSE_BRACKET = re.compile(r" \)")
-def extract_lambda_source(f):
+def _extract_lambda_source(f):
"""Extracts a single lambda expression from the string source. Returns a
string indicating an unknown body if it gets confused in any way.
@@ -439,6 +441,17 @@ def extract_lambda_source(f):
return source.strip()
+def extract_lambda_source(f):
+ try:
+ return LAMBDA_SOURCE_CACHE[f]
+ except KeyError:
+ pass
+
+ source = _extract_lambda_source(f)
+ LAMBDA_SOURCE_CACHE[f] = source
+ return source
+
+
def get_pretty_function_description(f):
if isinstance(f, partial):
return pretty(f)
@@ -492,7 +505,7 @@ def repr_call(f, args, kwargs, *, reorder=True):
if repr_len > 30000:
warnings.warn(
"Generating overly large repr. This is an expensive operation, and with "
- f"a length of {repr_len//1000} kB is is unlikely to be useful. Use -Wignore "
+ f"a length of {repr_len//1000} kB is unlikely to be useful. Use -Wignore "
"to ignore the warning, or -Werror to get a traceback.",
HypothesisWarning,
stacklevel=2,
diff --git a/contrib/python/hypothesis/py3/hypothesis/strategies/_internal/core.py b/contrib/python/hypothesis/py3/hypothesis/strategies/_internal/core.py
index 83edacbfef..300a45e59b 100644
--- a/contrib/python/hypothesis/py3/hypothesis/strategies/_internal/core.py
+++ b/contrib/python/hypothesis/py3/hypothesis/strategies/_internal/core.py
@@ -83,6 +83,7 @@ from hypothesis.internal.compat import (
is_typed_named_tuple,
)
from hypothesis.internal.conjecture.utils import calc_label_from_cls, check_sample
+from hypothesis.internal.coverage import IN_COVERAGE_TESTS, description_stack
from hypothesis.internal.entropy import get_seeder_and_restorer
from hypothesis.internal.floats import float_of
from hypothesis.internal.observability import TESTCASE_CALLBACKS
@@ -1757,8 +1758,22 @@ class CompositeStrategy(SearchStrategy):
self.args = args
self.kwargs = kwargs
- def do_draw(self, data):
- return self.definition(data.draw, *self.args, **self.kwargs)
+ if IN_COVERAGE_TESTS:
+ # We do a bit of a dance here to ensure that whatever 'outer' description
+ # stack we might have, doesn't affect the validation code internal to the
+ # strategy we're drawing from. Otherwise, we'd get flaky fails like #3968.
+ def do_draw(self, data):
+ prev = description_stack[:]
+ try:
+ description_stack.clear()
+ return self.definition(data.draw, *self.args, **self.kwargs)
+ finally:
+ description_stack[:] = prev
+
+ else: # pragma: no cover
+
+ def do_draw(self, data):
+ return self.definition(data.draw, *self.args, **self.kwargs)
def calc_label(self):
return calc_label_from_cls(self.definition)
@@ -1810,7 +1825,7 @@ def _composite(f):
)
if params[0].default is not sig.empty:
raise InvalidArgument("A default value for initial argument will never be used")
- if not is_first_param_referenced_in_function(f):
+ if not (f is typing._overload_dummy or is_first_param_referenced_in_function(f)):
note_deprecation(
"There is no reason to use @st.composite on a function which "
"does not call the provided draw() function internally.",
diff --git a/contrib/python/hypothesis/py3/hypothesis/version.py b/contrib/python/hypothesis/py3/hypothesis/version.py
index 7d9f42de8e..05ca2c83b3 100644
--- a/contrib/python/hypothesis/py3/hypothesis/version.py
+++ b/contrib/python/hypothesis/py3/hypothesis/version.py
@@ -8,5 +8,5 @@
# v. 2.0. If a copy of the MPL was not distributed with this file, You can
# obtain one at https://mozilla.org/MPL/2.0/.
-__version_info__ = (6, 100, 2)
+__version_info__ = (6, 100, 4)
__version__ = ".".join(map(str, __version_info__))
diff --git a/contrib/python/hypothesis/py3/ya.make b/contrib/python/hypothesis/py3/ya.make
index 4e4a82e03a..420b273733 100644
--- a/contrib/python/hypothesis/py3/ya.make
+++ b/contrib/python/hypothesis/py3/ya.make
@@ -2,7 +2,7 @@
PY3_LIBRARY()
-VERSION(6.100.2)
+VERSION(6.100.4)
LICENSE(MPL-2.0)