Skip to content

Commit b4d1c59

Browse files
committed
removed use of six package for unicode.py
1 parent 332afc8 commit b4d1c59

6 files changed

Lines changed: 24 additions & 6 deletions

File tree

.github/workflows/macos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
brew update
4141
brew install python@3.13 re2c coreutils libiconv googletest shivammathur/php/php@7.4
4242
brew link --overwrite --force shivammathur/php/php@7.4
43-
/opt/homebrew/opt/python@3.13/libexec/bin/python -m pip install --upgrade pip --user --break-system-packages && /opt/homebrew/opt/python@3.13/libexec/bin/pip install --break-system-packages jsonschema six cmake==3.31.6
43+
/opt/homebrew/opt/python@3.13/libexec/bin/python -m pip install --upgrade pip --user --break-system-packages && /opt/homebrew/opt/python@3.13/libexec/bin/pip install --break-system-packages jsonschema cmake==3.31.6
4444
4545
- name: Run cmake
4646
run: cmake -DCMAKE_CXX_COMPILER=${{matrix.compiler}} -DCMAKE_CXX_STANDARD=${{matrix.cpp}} -DDOWNLOAD_MISSING_LIBRARIES=On -S $GITHUB_WORKSPACE -B ${{runner.workspace}}/build

docs/kphp-internals/developing-and-extending-kphp/compiling-kphp-from-sources.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ wget -qO - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
4747
Install packages
4848
```bash
4949
apt-get update
50-
apt install git cmake-data=3.18* cmake=3.18* make patch re2c g++ gperf python3-minimal python3-jsonschema python3-six \
50+
apt install git cmake-data=3.18* cmake=3.18* make patch re2c g++ gperf python3-minimal python3-jsonschema \
5151
libfmt-dev libgtest-dev libgmock-dev \
5252
zlib1g-dev php7.4-dev libldap-dev libkrb5-dev \
5353
libpq5=14.* postgresql-14 postgresql-server-dev-14 libpq-dev=14.* composer
@@ -71,7 +71,7 @@ Install packages
7171
```bash
7272
apt-get update
7373
apt install git cmake make g++ gperf netcat patch re2c \
74-
python3.7 python3-pip python3.7-distutils python3.7-dev libpython3.7-dev python3-jsonschema python3-setuptools python3-six \
74+
python3.7 python3-pip python3.7-distutils python3.7-dev libpython3.7-dev python3-jsonschema python3-setuptools \
7575
libfmt-dev libgtest-dev libgmock-dev \
7676
zlib1g-dev php7.4-dev libldap-dev libkrb5-dev mysql-server libmysqlclient-dev \
7777
libpq5=14.* postgresql-14 postgresql-server-dev-14 libpq-dev=14.* composer
@@ -86,7 +86,7 @@ brew tap shivammathur/php
8686
brew update
8787
brew install python@3.13 re2c cmake coreutils libiconv googletest shivammathur/php/php@7.4
8888
brew link --overwrite shivammathur/php/php@7.4
89-
python3.13 -m pip install jsonschema six
89+
python3.13 -m pip install jsonschema
9090

9191
# Build kphp
9292
git clone https://github.com/VKCOM/kphp.git && cd kphp

tests/python/requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,3 @@ pytest-postgresql==4.1.1
1111
psycopg==3.1.9
1212
pytest-xdist==3.3.1
1313
zstandard==0.21.0
14-
six==1.17.0
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Should use Python's native function instead of the six package for unicode.py
2+
3+
---
4+
re2/unicode.py | 2 +-
5+
1 file changed, 1 insertion(+), 1 deletion(-)
6+
7+
diff --git a/re2/unicode.py b/re2/unicode.py
8+
index 727bea5f..e3293839 100644
9+
--- a/re2/unicode.py
10+
+++ b/re2/unicode.py
11+
@@ -10,7 +10,7 @@
12+
13+
import os
14+
import re
15+
-from six.moves import urllib
16+
+import urllib.request
17+
18+
# Directory or URL where Unicode tables reside.
19+
_UNICODE_DIR = "${UNICODE_AUTO_RAW_DATA_DIR}"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
kphp-unicode-data.patch
2+
kphp-remove-six-package.patch

third-party/re2-cmake/re2.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
check_python_package(six)
21
update_git_submodule(${THIRD_PARTY_DIR}/re2 "--recursive")
32
get_submodule_version(${THIRD_PARTY_DIR}/re2 RE2_VERSION)
43
get_submodule_remote_url(third-party/re2 RE2_SOURCE_URL)

0 commit comments

Comments
 (0)