diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index ba6a3b2..98de84d 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -10,6 +10,7 @@ jobs: lint: runs-on: ubuntu-latest + container: snakepacker/python:all strategy: matrix: @@ -19,17 +20,16 @@ jobs: - mypy steps: - - uses: actions/checkout@v2 - - name: tox ${{ matrix.linter }} - uses: docker://snakepacker/python:all + - uses: actions/checkout@v4 + - name: Run tox ${{ matrix.linter }} + run: tox env: TOXENV: ${{ matrix.linter }} - with: - args: tox build: needs: lint runs-on: ubuntu-latest + container: snakepacker/python:all services: postgres: @@ -46,20 +46,17 @@ jobs: matrix: toxenv: - - py38 - py39 - py310 - py311 + - py312 steps: - - uses: actions/checkout@v2 - - - name: tox ${{ matrix.toxenv }} - uses: docker://snakepacker/python:all + - uses: actions/checkout@v4 + - name: Run tox ${{ matrix.toxenv }} + run: tox env: FORCE_COLOR: 1 TOXENV: ${{ matrix.toxenv }} PG_DSN: postgres://test:test@postgres:5432/test COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} - with: - args: /bin/bash -c "wait-for-port postgres:5432 && tox" diff --git a/pylama.ini b/pylama.ini deleted file mode 100644 index 3558601..0000000 --- a/pylama.ini +++ /dev/null @@ -1,8 +0,0 @@ -[pylama] -linters = mccabe,pycodestyle,pyflakes -skip = venv/* - -[pylama:pycodestyle] -max_line_length = 80 -show-pep8 = True -show-source = True diff --git a/pytest.ini b/pytest.ini index 854c392..2cf510f 100644 --- a/pytest.ini +++ b/pytest.ini @@ -2,3 +2,4 @@ filterwarnings = ignore::DeprecationWarning python_classes = TestSuite* +asyncio_mode = auto diff --git a/ruff.toml b/ruff.toml new file mode 100644 index 0000000..1a85b6b --- /dev/null +++ b/ruff.toml @@ -0,0 +1,10 @@ +line-length = 80 +target-version = "py39" + +[lint] +select = [ + "E", # pycodestyle errors + "W", # pycodestyle warnings + "C90", # mccabe + "F", # pyflakes +] \ No newline at end of file diff --git a/setup.py b/setup.py index 1432bf3..ffdc794 100644 --- a/setup.py +++ b/setup.py @@ -27,10 +27,10 @@ "Operating System :: Microsoft", "Operating System :: POSIX", "Programming Language :: Python :: 3", - "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", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Programming Language :: Python", @@ -58,10 +58,12 @@ "async_timeout", "psycopg[pool]>=3.0,<4", "aiopg[sa]~=1.4.0", - "asyncpg~=0.29.0", - "pytest~=6.2.5", + "asyncpg~=0.30.0", + "pytest~=8.2.0", "pytest-cov~=3.0.0", - "aiomisc~=15.2.4", + "pytest-asyncio~=0.26.0", + "aiomisc~=17.7.7", + "aiomisc-pytest~=1.2.1", "mock~=4.0.1", "sqlalchemy[asyncio]~=1.4.27", ], @@ -69,15 +71,17 @@ "async_timeout", "psycopg[pool]>=3.0,<4", "aiopg[sa]~=1.4.0", - "asyncpg~=0.27.0", - "pytest~=6.2.5", + "asyncpg~=0.30.0", + "pytest~=8.2.0", "pytest-cov~=3.0.0", - "pylama~=7.7.1", - "aiomisc~=15.2.4", + "pytest-asyncio~=0.26.0", + "aiomisc~=17.7.7", + "aiomisc-pytest~=1.2.1", "mock~=4.0.3", "sqlalchemy[asyncio]~=1.4.27", "black~=21.9b0", "tox~=3.24", + "ruff~=0.11.9", "twine", "wheel", "types-psycopg2", diff --git a/tox.ini b/tox.ini index 9ee1f7a..c4c63bd 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = lint,mypy,py3{8,9,10,11}{,-uvloop} +envlist = lint,mypy,py3{9,10,11,12}{,-uvloop} [testenv] passenv = COVERALLS_*, FORCE_COLOR, PG_DSN @@ -17,13 +17,12 @@ commands= - coveralls [testenv:lint] -allowlist_externals = pylama +allowlist_externals = ruff deps = - pyflakes==2.4.0 - pylama + ruff commands= - pylama -o pylama.ini hasql tests + ruff check hasql tests [testenv:checkdoc] deps = @@ -40,6 +39,5 @@ usedevelop = true deps = mypy==1.17.1 - commands = mypy --install-types --non-interactive hasql tests