diff --git a/bin/run-test.sh b/bin/run-test.sh index 8a35490..462698d 100755 --- a/bin/run-test.sh +++ b/bin/run-test.sh @@ -14,8 +14,7 @@ cd "${REPO_ROOT}" build() { ver=$1 - ver_wo_dot=`echo "${ver}" | sed -e "s/\.//g"` # "3.6" -> "36" - service="pye${ver_wo_dot}" + service="pye${ver}" docker-compose -f docker-compose-test.yml build ${service} } diff --git a/docker-compose-test.yml b/docker-compose-test.yml index 53df212..14793f5 100644 --- a/docker-compose-test.yml +++ b/docker-compose-test.yml @@ -1,26 +1,42 @@ version: '3.3' services: - pye36: + pye3.6: build: context: . dockerfile: ./docker/Dockerfile args: - PY_VER: 3.6 + PY_VER: "3.6" image: falldog/pyconcrete-tester:3.6 - pye37: + pye3.7: build: context: . dockerfile: ./docker/Dockerfile args: - PY_VER: 3.7 + PY_VER: "3.7" image: falldog/pyconcrete-tester:3.7 - pye38: + pye3.8: build: context: . dockerfile: ./docker/Dockerfile args: - PY_VER: 3.8 + PY_VER: "3.8" image: falldog/pyconcrete-tester:3.8 + + pye3.9: + build: + context: . + dockerfile: ./docker/Dockerfile + args: + PY_VER: "3.9" + image: falldog/pyconcrete-tester:3.9 + + pye3.10: + build: + context: . + dockerfile: ./docker/Dockerfile + args: + PY_VER: "3.10" + image: falldog/pyconcrete-tester:3.10 diff --git a/docker/Dockerfile b/docker/Dockerfile index d1439a0..3319f53 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,6 +1,7 @@ FROM ubuntu:18.04 LABEL maintainer=falldog +ARG DEBIAN_FRONTEND=noninteractive ARG PY_VER=3.6 RUN set -ex \ @@ -21,7 +22,9 @@ RUN set -ex \ RUN set -ex \ && apt-get update \ && apt-get install -y --no-install-recommends \ - python${PY_VER} python${PY_VER}-dev \ + python${PY_VER} \ + python${PY_VER}-dev \ + python${PY_VER}-distutils \ \ && rm -rf /var/lib/apt/lists/* \ \ @@ -33,6 +36,6 @@ RUN set -ex \ COPY test/requirements.txt /code RUN set -ex \ - && pip install --no-cache-dir -r /code/requirements.txt + && python${PY_VER} -m pip install --no-cache-dir -r /code/requirements.txt WORKDIR /code diff --git a/setup.py b/setup.py index 7da5e60..b48f8c8 100644 --- a/setup.py +++ b/setup.py @@ -425,6 +425,8 @@ def get_exe_link_args(): 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: Implementation :: CPython', 'License :: OSI Approved :: Apache Software License', ], diff --git a/src/pyconcrete_ext/pyconcrete.c b/src/pyconcrete_ext/pyconcrete.c index 0e52fd9..7651e1a 100644 --- a/src/pyconcrete_ext/pyconcrete.c +++ b/src/pyconcrete_ext/pyconcrete.c @@ -13,6 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +#define PY_SSIZE_T_CLEAN #include #include #include diff --git a/test/data/requests-2.12.4.zip b/test/data/requests-2.27.1.zip similarity index 68% rename from test/data/requests-2.12.4.zip rename to test/data/requests-2.27.1.zip index 41f2f81..d4b266c 100644 Binary files a/test/data/requests-2.12.4.zip and b/test/data/requests-2.27.1.zip differ diff --git a/test/requirements.txt b/test/requirements.txt index d6fd88c..03bd1fc 100644 --- a/test/requirements.txt +++ b/test/requirements.txt @@ -1 +1,8 @@ -# pandas==1.0.1 +# ===== for test requests ====== +charset_normalizer~=2.0.0; python_version >= "3" +chardet>=3.0.2,<5; python_version < "3" +idna>=2.5,<3; python_version < "3" +idna>=2.5,<4; python_version >= "3" +urllib3>=1.21.1,<1.27 +certifi>=2017.4.17 +# ===== diff --git a/test/test_pye_performance.py b/test/test_pye_performance.py index 2989a1a..e5cbfbe 100644 --- a/test/test_pye_performance.py +++ b/test/test_pye_performance.py @@ -28,7 +28,7 @@ CUR_DIR = abspath(dirname(__file__)) ROOT_DIR = abspath(join(CUR_DIR, '..')) DATA_DIR = join(CUR_DIR, 'data') -REQUEST_ZIP = join(DATA_DIR, 'requests-2.12.4.zip') +REQUEST_ZIP = join(DATA_DIR, 'requests-2.27.1.zip') # zip structure: first level must contain `requests` folder REQUEST_MAIN = join(DATA_DIR, 'main_requests.py') PYADMIN_PATH = join(ROOT_DIR, 'pyconcrete-admin.py') RUN_COUNT = int(os.environ.get('TEST_PYE_PERFORMANCE_COUNT', '5'))