Skip to content

Commit

Permalink
Add support for Python 3.12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
subhashb committed Nov 17, 2023
1 parent 0cf1d19 commit 40438d6
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
name: Python ${{ matrix.python-version }} Tests

services:
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true'

- name: Tests
run: protean test -c WITH_COVERAGE
run: pytest --slow --sqlite --postgresql --elasticsearch --redis --cov=protean --cov-config .coveragerc tests
env:
TEST_CMD: pre-commit run --all-files
POSTGRES_PASSWORD: postgres
Expand Down
5 changes: 2 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ repos:
- id: black
language_version: python3.8

- repo: [email protected]:humitos/mirrors-autoflake.git
rev: v1.3
- repo: [email protected]:PyCQA/autoflake.git
rev: v2.2.1
hooks:
- id: autoflake
args:
[
"--in-place",
"--remove-all-unused-imports",
"--remove-unused-variable",
"--ignore-init-module-imports",
]

Expand Down
10 changes: 8 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ def read(*names, **kwargs):
).read()


elasticsearch_requires = ["elasticsearch>=7.13.1", "elasticsearch-dsl>=7.3.0"]
# Elasticsearch is tied to version 7.x because while 8.x supports sync and async workflows
# in the same client, it introduces breaking changes in the API.
elasticsearch_requires = ["elasticsearch~=7.17.9", "elasticsearch-dsl~=7.4.1"]

redis_requires = ["redis==3.5.2"]
sqlite_requires = ["sqlalchemy==1.4.47"]
postgresql_requires = ["psycopg2>=2.8.4", "sqlalchemy==1.4.47"]
Expand Down Expand Up @@ -54,7 +57,7 @@ def read(*names, **kwargs):
]

testing_requires = all_external_requires + [
"autoflake>=1.4",
"autoflake>=2.2.1",
"isort>=5.10.1",
"mock==4.0.2",
"pluggy==0.13.1",
Expand Down Expand Up @@ -120,8 +123,11 @@ def read(*names, **kwargs):
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"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 :: 3 :: Only",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Application Frameworks",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from .elements import Person


# @pytest.mark.postgresql
@pytest.mark.postgresql
class TestSchemaSwitch:
@pytest.fixture(autouse=True)
def register_elements(self, test_domain):
Expand Down
1 change: 1 addition & 0 deletions tests/repository/test_repository_registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ def special_method(self):
== "GenericUserRepository"
)

@pytest.mark.elasticsearch
def test_retrieving_the_database_specific_repository(self, test_domain):
test_domain.config["DATABASES"]["secondary"] = {
"PROVIDER": "protean.adapters.repository.elasticsearch.ESProvider",
Expand Down

0 comments on commit 40438d6

Please sign in to comment.