Skip to content

Commit

Permalink
Import pytest types from pytest package, not private _pytest - requir…
Browse files Browse the repository at this point in the history
…e at least pytest 6.2 - closes #533
  • Loading branch information
fizyk committed Dec 22, 2021
1 parent 1031c10 commit 3233dea
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests-macos.yml
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
fail-fast: true
matrix:
python-version: [3.7, 3.8, 3.9, "3.10", pypy-3.7-v7.3.3]
python-version: [3.7, 3.8, 3.9, "3.10", pypy3.8-v7.3.7]
postgres-version: [12, 13, 14]
env:
OS: macos-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: true
matrix:
python-version: [3.7, 3.8, 3.9, "3.10", pypy-3.7-v7.3.3]
python-version: [3.7, 3.8, 3.9, "3.10", pypy3.8-v7.3.7]
postgres-version: [10, 11, 12, 13, 14]
env:
OS: ubuntu-latest
Expand Down
9 changes: 9 additions & 0 deletions CHANGES.rst
@@ -1,6 +1,15 @@
CHANGELOG
=========

unreleased
----------

Misc
++++

- Import FixtureRequest, TempdirFactory from pytest, not private _pytest.
Require at least pytest 6.2

4.0.0
----------

Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Expand Up @@ -35,7 +35,7 @@ packages = find:
package_dir =
=src
install_requires =
pytest>=3.0.0
pytest>=6.2.0
port-for
mirakuru>=2.3.0

Expand Down
2 changes: 1 addition & 1 deletion src/pytest_postgresql/config.py
@@ -1,4 +1,4 @@
from _pytest.fixtures import FixtureRequest
from pytest import FixtureRequest


def get_config(request: FixtureRequest) -> dict:
Expand Down
2 changes: 1 addition & 1 deletion src/pytest_postgresql/factories/client.py
Expand Up @@ -19,7 +19,7 @@
from typing import List, Optional, Callable, Union, Iterator

import pytest
from _pytest.fixtures import FixtureRequest
from pytest import FixtureRequest

from pytest_postgresql.compat import connection, check_for_psycopg, psycopg
from pytest_postgresql.executor import PostgreSQLExecutor
Expand Down
2 changes: 1 addition & 1 deletion src/pytest_postgresql/factories/noprocess.py
Expand Up @@ -20,7 +20,7 @@
from typing import Union, Callable, List, Iterator, Optional

import pytest
from _pytest.fixtures import FixtureRequest
from pytest import FixtureRequest

from pytest_postgresql.config import get_config
from pytest_postgresql.executor_noop import NoopExecutor
Expand Down
5 changes: 2 additions & 3 deletions src/pytest_postgresql/factories/process.py
Expand Up @@ -19,12 +19,11 @@
import os.path
import platform
import subprocess
from _warnings import warn
from typing import Union, Callable, List, Iterator, Optional, Tuple, Set
from warnings import warn

import pytest
from _pytest.fixtures import FixtureRequest
from _pytest.tmpdir import TempdirFactory
from pytest import FixtureRequest, TempdirFactory
from port_for import get_port

from pytest_postgresql.config import get_config
Expand Down
2 changes: 1 addition & 1 deletion tests/test_executor.py
Expand Up @@ -2,7 +2,7 @@
import sys
from typing import Any

from _pytest.fixtures import FixtureRequest
from pytest import FixtureRequest
from pkg_resources import parse_version

import pytest
Expand Down
2 changes: 1 addition & 1 deletion tests/test_postgres_options_plugin.py
@@ -1,6 +1,6 @@
"""Test behavior of postgres_options passed in different ways."""

from _pytest.pytester import Pytester
from pytest import Pytester


def test_postgres_options_config_in_cli(pytester: Pytester) -> None:
Expand Down

0 comments on commit 3233dea

Please sign in to comment.