Skip to content

Commit 47bbde9

Browse files
authored
Merge pull request #535 from ClearcodeHQ/issue-533
Import pytest types from pytest package, not private _pytest - requir…
2 parents 98bae08 + 4e19c3e commit 47bbde9

File tree

10 files changed

+19
-11
lines changed

10 files changed

+19
-11
lines changed

.github/workflows/tests-macos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
strategy:
2323
fail-fast: true
2424
matrix:
25-
python-version: [3.7, 3.8, 3.9, "3.10", pypy-3.7-v7.3.3]
25+
python-version: [3.7, 3.8, 3.9, "3.10", pypy-3.8-v7.3.7]
2626
postgres-version: [12, 13, 14]
2727
env:
2828
OS: macos-latest

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
fail-fast: true
1919
matrix:
20-
python-version: [3.7, 3.8, 3.9, "3.10", pypy-3.7-v7.3.3]
20+
python-version: [3.7, 3.8, 3.9, "3.10", pypy-3.8-v7.3.7]
2121
postgres-version: [10, 11, 12, 13, 14]
2222
env:
2323
OS: ubuntu-latest

CHANGES.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
CHANGELOG
22
=========
33

4+
unreleased
5+
----------
6+
7+
Misc
8+
++++
9+
10+
- Import FixtureRequest, TempdirFactory from pytest, not private _pytest.
11+
Require at least pytest 6.2
12+
413
4.0.0
514
----------
615

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ packages = find:
3535
package_dir =
3636
=src
3737
install_requires =
38-
pytest>=3.0.0
38+
pytest>=6.2.0
3939
port-for
4040
mirakuru>=2.3.0
4141

src/pytest_postgresql/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from _pytest.fixtures import FixtureRequest
1+
from pytest import FixtureRequest
22

33

44
def get_config(request: FixtureRequest) -> dict:

src/pytest_postgresql/factories/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from typing import List, Optional, Callable, Union, Iterator
2020

2121
import pytest
22-
from _pytest.fixtures import FixtureRequest
22+
from pytest import FixtureRequest
2323

2424
from pytest_postgresql.compat import connection, check_for_psycopg, psycopg
2525
from pytest_postgresql.executor import PostgreSQLExecutor

src/pytest_postgresql/factories/noprocess.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from typing import Union, Callable, List, Iterator, Optional
2121

2222
import pytest
23-
from _pytest.fixtures import FixtureRequest
23+
from pytest import FixtureRequest
2424

2525
from pytest_postgresql.config import get_config
2626
from pytest_postgresql.executor_noop import NoopExecutor

src/pytest_postgresql/factories/process.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,11 @@
1919
import os.path
2020
import platform
2121
import subprocess
22-
from _warnings import warn
2322
from typing import Union, Callable, List, Iterator, Optional, Tuple, Set
23+
from warnings import warn
2424

2525
import pytest
26-
from _pytest.fixtures import FixtureRequest
27-
from _pytest.tmpdir import TempdirFactory
26+
from pytest import FixtureRequest, TempdirFactory
2827
from port_for import get_port
2928

3029
from pytest_postgresql.config import get_config

tests/test_executor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import sys
33
from typing import Any
44

5-
from _pytest.fixtures import FixtureRequest
5+
from pytest import FixtureRequest
66
from pkg_resources import parse_version
77

88
import pytest

tests/test_postgres_options_plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Test behavior of postgres_options passed in different ways."""
22

3-
from _pytest.pytester import Pytester
3+
from pytest import Pytester
44

55

66
def test_postgres_options_config_in_cli(pytester: Pytester) -> None:

0 commit comments

Comments
 (0)