0
0
mirror of https://github.com/termux/termux-packages.git synced 2025-08-24 06:52:41 +00:00
Files
termux-packages/x11-packages/carbonyl-host-tools/patches/6007-catapult-update-fix.patch
2025-02-01 17:05:51 +08:00

171 lines
6.5 KiB
Diff

From 8cf7c46ad7ea03bf5d5588d0ed63be3df4baaf1f Mon Sep 17 00:00:00 2001
From: Ho Cheung <uioptt24@gmail.com>
Date: Wed, 6 Dec 2023 15:29:25 +0800
Subject: [PATCH] [six] Update vendored copy of six to 1.16.0.
Bug: chromium:1487454
Fixed: chromium:1497068
Change-Id: I270fd864504c714a178d4d42e6547c8e109edd7f
Reviewed-on: https://chromium-review.googlesource.com/c/catapult/+/5092950
Commit-Queue: John Chen <johnchen@chromium.org>
Auto-Submit: Ho Cheung <uioptt24@gmail.com>
Reviewed-by: John Chen <johnchen@chromium.org>
---
third_party/six/CHANGES | 10 ++++++++--
third_party/six/PKG-INFO | 2 +-
third_party/six/README | 17 ++++-------------
third_party/six/README.chromium | 4 ++--
third_party/six/six.egg-info/PKG-INFO | 2 +-
third_party/six/six.py | 18 +++++++++++++++++-
6 files changed, 33 insertions(+), 20 deletions(-)
diff --git a/third_party/catapult/third_party/six/CHANGES b/third_party/catapult/third_party/six/CHANGES
index ad4cbaa147e..f3bf6a4a7f9 100644
--- a/third_party/catapult/third_party/six/CHANGES
+++ b/third_party/catapult/third_party/six/CHANGES
@@ -3,6 +3,12 @@ Changelog for six
This file lists the changes in each six version.
+1.16.0
+------
+
+- Pull request #343, issue #341, pull request #349: Port _SixMetaPathImporter to
+ Python 3.10.
+
1.15.0
------
@@ -100,7 +106,7 @@ This file lists the changes in each six version.
- Issue #98: Fix `six.moves` race condition in multi-threaded code.
-- Pull request #51: Add `six.view(keys|values|itmes)`, which provide dictionary
+- Pull request #51: Add `six.view(keys|values|items)`, which provide dictionary
views on Python 2.7+.
- Issue #112: `six.moves.reload_module` now uses the importlib module on
@@ -227,7 +233,7 @@ This file lists the changes in each six version.
- Issue #40: Add import mapping for the Python 2 gdbm module.
- Issue #35: On Python versions less than 2.7, print_ now encodes unicode
- strings when outputing to standard streams. (Python 2.7 handles this
+ strings when outputting to standard streams. (Python 2.7 handles this
automatically.)
1.4.1
diff --git a/third_party/catapult/third_party/six/PKG-INFO b/third_party/catapult/third_party/six/PKG-INFO
index 75aba67d2fe..1e57620bb60 100644
--- a/third_party/catapult/third_party/six/PKG-INFO
+++ b/third_party/catapult/third_party/six/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.2
Name: six
-Version: 1.15.0
+Version: 1.16.0
Summary: Python 2 and 3 compatibility utilities
Home-page: https://github.com/benjaminp/six
Author: Benjamin Peterson
diff --git a/third_party/catapult/third_party/six/README b/third_party/catapult/third_party/six/README
index ee628a9db6b..560a773d9e1 100644
--- a/third_party/catapult/third_party/six/README
+++ b/third_party/catapult/third_party/six/README
@@ -1,16 +1,7 @@
-Six is a Python 2 and 3 compatibility library. It provides utility functions
-for smoothing over the differences between the Python versions with the goal of
-writing Python code that is compatible on both Python versions. See the
-documentation for more information on what is provided.
+Six is a Python 2 and 3 compatibility library. It provides utility functions for smoothing over the differences between the Python versions with the goal of writing Python code that is compatible on both Python versions. See the documentation for more information on what is provided.
-Six supports every Python version since 2.6. It is contained in only one Python
-file, so it can be easily copied into your project. (The copyright and license
-notice must be retained.)
+Six supports Python 2.7 and 3.3+. It is contained in only one Python file, so it can be easily copied into your project. (The copyright and license notice must be retained.)
-Online documentation is at https://pythonhosted.org/six/.
+Online documentation is at https://six.readthedocs.io/.
-Bugs can be reported to https://bitbucket.org/gutworth/six. The code can also
-be found there.
-
-For questions about six or porting in general, email the python-porting mailing
-list: https://mail.python.org/mailman/listinfo/python-porting
+Bugs can be reported to https://github.com/benjaminp/six. The code can also be found there.
\ No newline at end of file
diff --git a/third_party/catapult/third_party/six/README.chromium b/third_party/catapult/third_party/six/README.chromium
index 6f7a9cb533f..3021912dd2d 100644
--- a/third_party/catapult/third_party/six/README.chromium
+++ b/third_party/catapult/third_party/six/README.chromium
@@ -1,7 +1,7 @@
Name: six
URL: https://pypi.org/project/six/
-Version: 1.15.0
-Date: 2021-03-02
+Version: 1.16.0
+Date: 2021-05-05
License: MIT
License File: LICENSE
Security Critical: no
diff --git a/third_party/catapult/third_party/six/six.egg-info/PKG-INFO b/third_party/catapult/third_party/six/six.egg-info/PKG-INFO
index 75aba67d2fe..1e57620bb60 100644
--- a/third_party/catapult/third_party/six/six.egg-info/PKG-INFO
+++ b/third_party/catapult/third_party/six/six.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.2
Name: six
-Version: 1.15.0
+Version: 1.16.0
Summary: Python 2 and 3 compatibility utilities
Home-page: https://github.com/benjaminp/six
Author: Benjamin Peterson
diff --git a/third_party/catapult/third_party/six/six.py b/third_party/catapult/third_party/six/six.py
index 83f69783d1a..4e15675d8b5 100644
--- a/third_party/catapult/third_party/six/six.py
+++ b/third_party/catapult/third_party/six/six.py
@@ -29,7 +29,7 @@
import types
__author__ = "Benjamin Peterson <benjamin@python.org>"
-__version__ = "1.15.0"
+__version__ = "1.16.0"
# Useful for very coarse version differentiation.
@@ -71,6 +71,11 @@ def __len__(self):
MAXSIZE = int((1 << 63) - 1)
del X
+if PY34:
+ from importlib.util import spec_from_loader
+else:
+ spec_from_loader = None
+
def _add_doc(func, doc):
"""Add documentation to a function."""
@@ -186,6 +191,11 @@ def find_module(self, fullname, path=None):
return self
return None
+ def find_spec(self, fullname, path, target=None):
+ if fullname in self.known_modules:
+ return spec_from_loader(fullname, self)
+ return None
+
def __get_module(self, fullname):
try:
return self.known_modules[fullname]
@@ -223,6 +233,12 @@ def get_code(self, fullname):
return None
get_source = get_code # same as get_code
+ def create_module(self, spec):
+ return self.load_module(spec.name)
+
+ def exec_module(self, module):
+ pass
+
_importer = _SixMetaPathImporter(__name__)