diff options
author | monster <monster@ydb.tech> | 2022-07-07 14:41:37 +0300 |
---|---|---|
committer | monster <monster@ydb.tech> | 2022-07-07 14:41:37 +0300 |
commit | 06e5c21a835c0e923506c4ff27929f34e00761c2 (patch) | |
tree | 75efcbc6854ef9bd476eb8bf00cc5c900da436a2 /contrib/python/pytest/py3/patches | |
parent | 03f024c4412e3aa613bb543cf1660176320ba8f4 (diff) | |
download | ydb-06e5c21a835c0e923506c4ff27929f34e00761c2.tar.gz |
fix ya.make
Diffstat (limited to 'contrib/python/pytest/py3/patches')
6 files changed, 0 insertions, 151 deletions
diff --git a/contrib/python/pytest/py3/patches/03-limit-id.patch b/contrib/python/pytest/py3/patches/03-limit-id.patch deleted file mode 100644 index e9dccc7e12..0000000000 --- a/contrib/python/pytest/py3/patches/03-limit-id.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- contrib/python/pytest/py3/_pytest/python.py (index) -+++ contrib/python/pytest/py3/_pytest/python.py (working tree) -@@ -963,7 +963,7 @@ class IdMaker: - The counter suffix is appended only in case a string wouldn't be unique - otherwise. - """ -- resolved_ids = list(self._resolve_ids()) -+ resolved_ids = list(self._limit_ids(self._resolve_ids(), limit=500)) - # All IDs must be unique! - if len(resolved_ids) != len(set(resolved_ids)): - # Record the number of occurrences of each ID. -@@ -977,6 +977,19 @@ class IdMaker: - id_suffixes[id] += 1 - return resolved_ids - -+ def _limit_ids(self, ids, limit=500): -+ prefix_count = {} -+ limit -= 6 -+ assert limit > 0 -+ -+ for idval in ids: -+ if len(idval) > limit: -+ prefix = idval[:limit] -+ idx = prefix_count.get(prefix, -1) + 1 -+ prefix_count[prefix] = idx -+ idval = "{}-{}".format(prefix, idx) -+ yield idval -+ - def _resolve_ids(self) -> Iterable[str]: - """Resolve IDs for all ParameterSets (may contain duplicates).""" - for idx, parameterset in enumerate(self.parametersets): diff --git a/contrib/python/pytest/py3/patches/04-support-cyrillic-id.patch b/contrib/python/pytest/py3/patches/04-support-cyrillic-id.patch deleted file mode 100644 index dccd656020..0000000000 --- a/contrib/python/pytest/py3/patches/04-support-cyrillic-id.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- contrib/python/pytest/py3/_pytest/compat.py (index) -+++ contrib/python/pytest/py3/_pytest/compat.py (working tree) -@@ -236,7 +236,7 @@ if _PY3: - if isinstance(val, bytes): - ret = _bytes_to_ascii(val) - else: -- ret = val.encode("unicode_escape").decode("ascii") -+ ret = val - return _translate_non_printable(ret) - - diff --git a/contrib/python/pytest/py3/patches/05-support-readline.patch b/contrib/python/pytest/py3/patches/05-support-readline.patch deleted file mode 100644 index 0f77979192..0000000000 --- a/contrib/python/pytest/py3/patches/05-support-readline.patch +++ /dev/null @@ -1,69 +0,0 @@ ---- contrib/python/pytest/py3/_pytest/debugging.py (index) -+++ contrib/python/pytest/py3/_pytest/debugging.py (working tree) -@@ -1,6 +1,7 @@ from __future__ import absolute_import - """Interactive debugging with PDB, the Python Debugger.""" - import argparse - import functools -+import os - import sys - import types - from typing import Any -@@ -29,6 +30,42 @@ from _pytest import outcomes - from _pytest.runner import CallInfo - - -+def import_readline(): -+ try: -+ import readline -+ except ImportError: -+ sys.path.append('/usr/lib/python2.7/lib-dynload') -+ -+ try: -+ import readline -+ except ImportError as e: -+ print('can not import readline:', e) -+ -+ import subprocess -+ try: -+ subprocess.check_call('stty icrnl'.split()) -+ except OSError as e: -+ print('can not restore Enter, use Control+J:', e) -+ -+ -+def tty(): -+ if os.isatty(1): -+ return -+ -+ fd = os.open('/dev/tty', os.O_RDWR) -+ os.dup2(fd, 0) -+ os.dup2(fd, 1) -+ os.dup2(fd, 2) -+ os.close(fd) -+ -+ old_sys_path = sys.path -+ sys.path = list(sys.path) -+ try: -+ import_readline() -+ finally: -+ sys.path = old_sys_path -+ -+ - def _validate_usepdb_cls(value: str) -> Tuple[str, str]: - """Validate syntax of --pdbcls option.""" - try: -@@ -277,6 +314,7 @@ class pytestPDB(object): - @classmethod - def set_trace(cls, *args, **kwargs) -> None: - """Invoke debugging via ``Pdb.set_trace``, dropping any IO capturing.""" -+ tty() - frame = sys._getframe().f_back - _pdb = cls._init_pdb("set_trace", *args, **kwargs) - _pdb.set_trace(frame) -@@ -292,6 +330,7 @@ class PdbInvoke(object): - out, err = capman.read_global_capture() - sys.stdout.write(out) - sys.stdout.write(err) -+ tty() - assert call.excinfo is not None - _enter_pdb(node, call.excinfo, report) - diff --git a/contrib/python/pytest/py3/patches/06-support-ya-markers.patch b/contrib/python/pytest/py3/patches/06-support-ya-markers.patch deleted file mode 100644 index c5ba0d7a90..0000000000 --- a/contrib/python/pytest/py3/patches/06-support-ya-markers.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- contrib/python/pytest/py3/_pytest/mark/structures.py (index) -+++ contrib/python/pytest/py3/_pytest/mark/structures.py (working tree) -@@ -501,7 +501,10 @@ class MarkGenerator(object): - # example lines: "skipif(condition): skip the given test if..." - # or "hypothesis: tests which use Hypothesis", so to get the - # marker name we split on both `:` and `(`. -- marker = line.split(":")[0].split("(")[0].strip() -+ if line == "ya:external": -+ marker = line -+ else: -+ marker = line.split(":")[0].split("(")[0].strip() - self._markers.add(marker) - - # If the name is not in the set of known marks after updating, diff --git a/contrib/python/pytest/py3/patches/07-disable-translate-non-printable.patch b/contrib/python/pytest/py3/patches/07-disable-translate-non-printable.patch deleted file mode 100644 index b6f78704f5..0000000000 --- a/contrib/python/pytest/py3/patches/07-disable-translate-non-printable.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- contrib/python/pytest/py3/_pytest/compat.py (index) -+++ contrib/python/pytest/py3/_pytest/compat.py (working tree) -@@ -237,7 +237,7 @@ if _PY3: - ret = _bytes_to_ascii(val) - else: - ret = val -- return _translate_non_printable(ret) -+ return ret - - - @attr.s diff --git a/contrib/python/pytest/py3/patches/08-fix-win-peerdir.patch b/contrib/python/pytest/py3/patches/08-fix-win-peerdir.patch deleted file mode 100644 index d1024bec66..0000000000 --- a/contrib/python/pytest/py3/patches/08-fix-win-peerdir.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- contrib/python/pytest/py3/ya.make (index) -+++ contrib/python/pytest/py3/ya.make (working tree) -@@ -17,6 +17,12 @@ PEERDIR( - contrib/python/tomli - ) - -+IF (OS_WINDOWS) -+ PEERDIR( -+ contrib/python/atomicwrites -+ ) -+ENDIF() -+ - NO_LINT() - - NO_CHECK_IMPORTS( |