From f8fd0055e17876be978f64b69f53d96c381ff156 Mon Sep 17 00:00:00 2001 From: Chayim Date: Mon, 30 Oct 2023 04:16:20 +0200 Subject: [PATCH] Updating dependencies and docker builds (#461) * dependency update * fail fast false * pendulum bump --- .dockerignore | 7 +++++++ .github/workflows/test.yaml | 5 +++-- Dockerfile | 28 +++++++++++++--------------- README.md | 2 +- poetry.lock | 34 +++++----------------------------- pyproject.toml | 7 ++++--- 6 files changed, 33 insertions(+), 50 deletions(-) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..51a2276b --- /dev/null +++ b/.dockerignore @@ -0,0 +1,7 @@ +tests +scripts +CHANGELOG.md +Dockerfile +docs +pyoxidizer.template.bzl +redis-doc diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 01a9dfd8..94c8ae20 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -10,10 +10,11 @@ jobs: test: name: Pytest strategy: + fail-fast: false matrix: os: ["ubuntu-20.04"] - python: ["3.7", "3.8", "3.9", "3.10", "3.11.1"] - redis: [5, 6, 7] + python: ["3.7", "3.8", "3.9", "3.10", "3.11.1", "3.12.0"] + redis: [5, 6, 7, 7.2] runs-on: ${{ matrix.os }} services: diff --git a/Dockerfile b/Dockerfile index 99c04636..a0baf16f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,16 @@ -FROM python:3 +FROM redis/redis-stack-server:latest -WORKDIR /iredis -COPY README.md poetry.lock pyproject.toml ./ -COPY iredis ./iredis - -RUN apt-get update && apt-get install -y --allow-unauthenticated \ - redis-server && \ - rm -rf /var/lib/apt/lists/* +COPY . /iredis +RUN apt-get update --fix-missing +RUN apt-get install -yqq python3 python3-pip python-is-python3 +RUN python3 -m pip install poetry +WORKDIR /iredis +RUN poetry config virtualenvs.create false +RUN poetry build +RUN pip install dist/iredis*.tar.gz +WORKDIR / +RUN rm -rf .cache /var/cache/apt +RUN rm -rf /iredis -RUN python3 -m venv iredis_env && \ - . iredis_env/bin/activate && \ - pip install poetry && \ - poetry install --no-dev && \ - rm -rf ~/.cache - -CMD ["sh","-c","redis-server --daemonize yes && . iredis_env/bin/activate && iredis"] +CMD ["sh", "-c", "/opt/redis-stack/bin/redis-stack-server --daemonize yes && iredis"] diff --git a/README.md b/README.md index 329ca422..9153efac 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@

Github Action PyPI version -Python version +Python version Download stats

diff --git a/poetry.lock b/poetry.lock index c5d6960a..62fe89f7 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,10 +1,9 @@ -# This file is automatically @generated by Poetry and should not be changed by hand. +# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. [[package]] name = "async-timeout" version = "4.0.3" description = "Timeout context manager for asyncio programs" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -19,7 +18,6 @@ typing-extensions = {version = ">=3.6.5", markers = "python_version < \"3.8\""} name = "click" version = "8.1.7" description = "Composable command line interface toolkit" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -35,7 +33,6 @@ importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} name = "colorama" version = "0.4.6" description = "Cross-platform colored terminal text." -category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" files = [ @@ -47,7 +44,6 @@ files = [ name = "configobj" version = "5.0.8" description = "Config file reading, writing and validation." -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" files = [ @@ -62,7 +58,6 @@ six = "*" name = "exceptiongroup" version = "1.1.3" description = "Backport of PEP 654 (exception groups)" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -77,7 +72,6 @@ test = ["pytest (>=6)"] name = "importlib-metadata" version = "6.7.0" description = "Read metadata from Python packages" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -98,7 +92,6 @@ testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs name = "iniconfig" version = "2.0.0" description = "brain-dead simple config-ini parsing" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -110,7 +103,6 @@ files = [ name = "mistune" version = "3.0.2" description = "A sane and fast Markdown parser with useful plugins and renderers" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -122,7 +114,6 @@ files = [ name = "packaging" version = "23.2" description = "Core utilities for Python packages" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -134,7 +125,6 @@ files = [ name = "pendulum" version = "2.1.2" description = "Python datetimes made easy" -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" files = [ @@ -169,7 +159,6 @@ pytzdata = ">=2020.1" name = "pexpect" version = "4.8.0" description = "Pexpect allows easy control of interactive console applications." -category = "dev" optional = false python-versions = "*" files = [ @@ -184,7 +173,6 @@ ptyprocess = ">=0.5" name = "pluggy" version = "1.2.0" description = "plugin and hook calling mechanisms for python" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -203,7 +191,6 @@ testing = ["pytest", "pytest-benchmark"] name = "prompt-toolkit" version = "3.0.39" description = "Library for building powerful interactive command lines in Python" -category = "main" optional = false python-versions = ">=3.7.0" files = [ @@ -218,7 +205,6 @@ wcwidth = "*" name = "ptyprocess" version = "0.7.0" description = "Run a subprocess in a pseudo terminal" -category = "dev" optional = false python-versions = "*" files = [ @@ -230,7 +216,6 @@ files = [ name = "pygments" version = "2.16.1" description = "Pygments is a syntax highlighting package written in Python." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -245,7 +230,6 @@ plugins = ["importlib-metadata"] name = "pytest" version = "7.4.2" description = "pytest: simple powerful testing with Python" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -269,7 +253,6 @@ testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "no name = "python-dateutil" version = "2.8.2" description = "Extensions to the standard Python datetime module" -category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" files = [ @@ -284,7 +267,6 @@ six = ">=1.5" name = "pytzdata" version = "2020.1" description = "The Olson timezone database for Python." -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ @@ -294,14 +276,13 @@ files = [ [[package]] name = "redis" -version = "4.6.0" +version = "5.0.1" description = "Python client for Redis database and key-value store" -category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "redis-4.6.0-py3-none-any.whl", hash = "sha256:e2b03db868160ee4591de3cb90d40ebb50a90dd302138775937f6a42b7ed183c"}, - {file = "redis-4.6.0.tar.gz", hash = "sha256:585dc516b9eb042a619ef0a39c3d7d55fe81bdb4df09a52c9cdde0d07bf1aa7d"}, + {file = "redis-5.0.1-py3-none-any.whl", hash = "sha256:ed4802971884ae19d640775ba3b03aa2e7bd5e8fb8dfaed2decce4d0fc48391f"}, + {file = "redis-5.0.1.tar.gz", hash = "sha256:0dab495cd5753069d3bc650a0dde8a8f9edde16fc5691b689a566eda58100d0f"}, ] [package.dependencies] @@ -317,7 +298,6 @@ ocsp = ["cryptography (>=36.0.1)", "pyopenssl (==20.0.1)", "requests (>=2.26.0)" name = "six" version = "1.16.0" description = "Python 2 and 3 compatibility utilities" -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" files = [ @@ -329,7 +309,6 @@ files = [ name = "tomli" version = "2.0.1" description = "A lil' TOML parser" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -341,7 +320,6 @@ files = [ name = "typing-extensions" version = "4.7.1" description = "Backported and Experimental Type Hints for Python 3.7+" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -353,7 +331,6 @@ files = [ name = "wcwidth" version = "0.1.9" description = "Measures number of Terminal column cells of wide-character codes" -category = "main" optional = false python-versions = "*" files = [ @@ -365,7 +342,6 @@ files = [ name = "zipp" version = "3.15.0" description = "Backport of pathlib-compatible object wrapper for zip files" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -380,4 +356,4 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more [metadata] lock-version = "2.0" python-versions = "^3.7" -content-hash = "31e5d3a141abbdde84cdf29e2dbdf906915fedaadcc6ab063005b416c6fe6a4a" +content-hash = "9381f0310d4407c975c362ab643110c21845281a1143fb55ea8d54664546b1a0" diff --git a/pyproject.toml b/pyproject.toml index 0aa87ad6..e5139daf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,6 +19,8 @@ classifiers = [ "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Topic :: Database", "License :: OSI Approved :: MIT License", "Intended Audience :: Developers", @@ -26,7 +28,6 @@ classifiers = [ packages = [ { include = "iredis" }, - { include = "tests", format = "sdist" }, ] [tool.poetry.dependencies] @@ -36,11 +37,11 @@ Pygments = "^2" mistune = "^3.0" configobj = "^5.0" click = "^8.0" -pendulum = "^2.0" +pendulum = "^2.1.0" # wcwidth 0.2.x uses pkg_resources which is not supported by PyOxidizer wcwidth = "0.1.9" packaging = "^23.0" -redis = "^4.5.3" +redis = "^5.0.0" [tool.poetry.dev-dependencies] pytest = "^7.2"