-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use different dev dependencies for different fedora versions #219
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,7 +90,7 @@ f39 = [ | |
"wcmatch == 8.4.1", | ||
"zstandard == 0.21.0", | ||
] | ||
dev = [ | ||
f38-dev = [ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pytest-cov f38 version is 4.0.0 |
||
# Needed by pre-commit to lint and test the project | ||
"pre-commit>=3.7.0", | ||
"anyio==3.5.0", | ||
|
@@ -116,6 +116,31 @@ dev = [ | |
"respx==0.20.1", | ||
] | ||
|
||
f39-dev = [ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Given the large number of missing dev deps in Fedora, and to keep the project somewhat normal for non-Fedora users, we should probably have a dev section with reasonably open ranges (the actual requirements), and then fX-dev sections will fully pinned versions of the packages that can be pinned to Fedora matched versions. |
||
# Needed by pre-commit to lint and test the project | ||
"pre-commit==3.7.0", | ||
"anyio==3.7.0", | ||
"pylint==3.0.4", | ||
"pytest-asyncio==0.23.5", | ||
"pytest-cov==4.0.0", | ||
"pytest-mock==3.11.1", | ||
"pytest-order", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I couldn't find this package in F38 or F39, this shouldn't be in sections named fX-dev. |
||
"pytest-timeout==2.1.0", | ||
"pytest-watch==4.2.0", | ||
"pytest==7.3.2", | ||
"mypy==1.8.0", | ||
# Types for things that don't seem to have them | ||
"types-botocore>=1.0.2", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I couldn't find python3-types-botocore in F38 or F39, this shouldn't be in sections named fX-dev. |
||
"types-PyYAML>=6.0.12.2", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The version of python3-types-pyyaml is 6.0.1, both for F38 and F39. |
||
"types-requests>=2.28.11.5", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The version of python3-types-requests is 2.26.1, both for F38 and F39. |
||
"types-tabulate>=0.9.0.0", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I couldn't find python3-types-tabulate in F38 or F39, this shouldn't be in sections named fX-dev. |
||
"types-ujson>=5.9.0.0", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I couldn't find python3-types-ujson in F38 or F39, but thankfully we're not using ujson at all, so this can be removed. |
||
"types-urllib3>=1.26.25.4", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I couldn't find python3-types-urllib3 in F38 or F39, this shouldn't be in sections named fX-dev. |
||
"coverage==7.2.7", | ||
"freezegun==1.2.2", | ||
"respx==0.20.2", | ||
] | ||
|
||
[project.urls] | ||
"Homepage" = "https://github.com/Aiven-Open/astacus" | ||
"Bug Tracker" = "https://github.com/Aiven-Open/astacus/issues" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
""" | ||
from astacus.common.utils import build_netloc | ||
from astacus.coordinator.plugins.zookeeper import KazooZooKeeperClient | ||
from collections.abc import AsyncIterator, Iterator, Mapping, Sequence | ||
from collections.abc import AsyncIterator, Mapping, Sequence | ||
from pathlib import Path | ||
from types import MappingProxyType | ||
|
||
|
@@ -21,16 +21,6 @@ | |
logger = logging.getLogger(__name__) | ||
|
||
|
||
@pytest.fixture(scope="module", name="event_loop") | ||
def fixture_event_loop() -> Iterator[asyncio.AbstractEventLoop]: | ||
# This is the same as the original `event_loop` fixture from `pytest_asyncio` | ||
# but with a module scope, re-declaring this fixture is their suggested way | ||
# of locally increasing the scope of this fixture. | ||
loop = asyncio.get_event_loop_policy().new_event_loop() | ||
yield loop | ||
loop.close() | ||
|
||
|
||
async def get_command_path(name: str) -> Path | None: | ||
process = await asyncio.create_subprocess_exec( | ||
"which", name, stderr=asyncio.subprocess.PIPE, stdout=asyncio.subprocess.PIPE | ||
|
@@ -147,7 +137,7 @@ def fixture_ports() -> Ports: | |
return Ports() | ||
|
||
|
||
@pytest.fixture(scope="module", name="zookeeper") | ||
@pytest.fixture(name="zookeeper") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We really can't drop all module scopes fixtures, the tests are already quite slow and it's not viable to move everything to function scope. (Don't look at the GHA test times, many tests don't run in that context.) Thankfully we already have a solution used in core, I've added a PR to do the same in astacus: #220 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh good, I'd far prefer to move away from |
||
async def fixture_zookeeper(ports: Ports) -> AsyncIterator[Service]: | ||
async with create_zookeeper(ports) as zookeeper: | ||
yield zookeeper | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh ! Thanks for noticing that.