Skip to content

Commit

Permalink
Updated pdm, dev dependencies, and pre-commit pinned versions
Browse files Browse the repository at this point in the history
  • Loading branch information
francis-clairicia committed Jan 19, 2025
1 parent 80371ec commit 04a6f00
Show file tree
Hide file tree
Showing 12 changed files with 319 additions and 323 deletions.
2 changes: 1 addition & 1 deletion .github/actions/openbsd-vm/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ runs:
with:
envFile: ${{ github.action_path }}/python/${{ inputs.python-version }}.conf
- name: Install PDM
uses: pdm-project/setup-pdm@2f3a9be7ac56a6e5c1ea605f8e9d0f0500363705 # v4
uses: pdm-project/setup-pdm@v4.2
id: pdm
with:
version: ${{ env.PDM_VERSION }}
Expand Down
4 changes: 3 additions & 1 deletion .github/actions/pdm.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# This file is loaded in runner environment by:
# - setup-tox
# - freebsd-vm
# - openbsd-vm
# - netbsd-vm

PDM_VERSION=2.20.1
PDM_VERSION=2.22.2
PDM_CHECK_UPDATE=False
WORKFLOW_CACHE_KEY_FILE=.github/.workflow.cache.key
4 changes: 1 addition & 3 deletions .github/actions/setup-tox/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,8 @@ runs:
- name: Show cache key
run: cat ${{ env.WORKFLOW_CACHE_KEY_FILE }}
shell: bash
# Use a pinned commit to use the new feature added (and which is not currently added to v4)
# c.f. https://github.com/pdm-project/setup-pdm/pull/60
- name: Install PDM
uses: pdm-project/setup-pdm@2f3a9be7ac56a6e5c1ea605f8e9d0f0500363705 # v4
uses: pdm-project/setup-pdm@v4.2
id: pdm
with:
version: ${{ env.PDM_VERSION }}
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ci:

repos:
- repo: https://github.com/asottile/pyupgrade
rev: v3.19.0
rev: v3.19.1
hooks:
- id: pyupgrade
args: ['--py311-plus']
Expand All @@ -35,7 +35,7 @@ repos:
'git+https://github.com/francis-clairicia/[email protected]'
]
- repo: https://github.com/PyCQA/bandit
rev: '1.7.10'
rev: '1.8.2'
hooks:
- id: bandit
args: ['-c', '.bandit.yml']
Expand All @@ -46,7 +46,7 @@ repos:
types: [] # Overwrite with empty in order to fallback to types_or
types_or: [python, pyi]
- repo: https://github.com/pdm-project/pdm
rev: '2.20.1'
rev: '2.22.2'
hooks:
- id: pdm-lock-check
- id: pdm-export
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build:
python: "3.11"
jobs:
post_create_environment:
- pip install --no-cache-dir pdm==2.20.1
- pip install --no-cache-dir pdm==2.22.2
- pdm config check_update false
- pdm use -f $READTHEDOCS_VIRTUALENV_PATH
post_install:
Expand Down
2 changes: 1 addition & 1 deletion DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
### System Requirements

- CPython >= 3.11.0
- [PDM](https://pdm-project.org/latest/#installation) >= 2.20
- [PDM](https://pdm-project.org/latest/#installation) >= 2.22
- The [Rust Toolchain](https://rustup.rs/)

### Virtual environment
Expand Down
4 changes: 2 additions & 2 deletions benchmark_server/servers/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
# Please do not edit it manually.

asyncio-dgram==2.1.2
attrs==24.2.0
attrs==24.3.0
cffi==1.17.1
idna==3.10
outcome==1.3.0.post0
pycparser==2.22
sniffio==1.3.1
sortedcontainers==2.4.0
trio==0.27.0
trio==0.28.0
uvloop==0.21.0; os_name == "posix"
603 changes: 300 additions & 303 deletions pdm.lock

Large diffs are not rendered by default.

9 changes: 4 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,7 @@ trio = [
"outcome~=1.3",
]

############################ pdm configuration ############################

[tool.pdm.dev-dependencies]
[dependency-groups]
dev = [
"bump2version>=1.0.1,<2",
"hatch>=1.8,<2",
Expand Down Expand Up @@ -104,7 +102,7 @@ test = [
"pytest-xdist~=3.3",
"pytest-mock~=3.10",
"pytest-cov~=6.0",
"pytest-asyncio~=0.24.0",
"pytest-asyncio~=0.25.0",
"trove-classifiers>=2023.11.9",
# "pytest-retry~=1.6",
# Temporary use VCS to get the modifications added on main (c.f. https://github.com/str0zzapreti/pytest-retry/pull/39)
Expand Down Expand Up @@ -136,7 +134,8 @@ benchmark-servers = [
"plotly~=5.18",
]
benchmark-servers-deps = [
"easynetwork[uvloop, trio]",
{include-group = "uvloop"},
"easynetwork[trio]",
"asyncio-dgram==2.1.2",
]

Expand Down
2 changes: 1 addition & 1 deletion src/easynetwork/lowlevel/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def prepend_argument(
func: Callable[Concatenate[_T_Arg, _P], _T_Return] | None = None,
) -> Callable[[Callable[Concatenate[_T_Arg, _P], _T_Return]], Callable[_P, _T_Return]] | Callable[_P, _T_Return]:
def decorator(func: Callable[Concatenate[_T_Arg, _P], _T_Return], /) -> Callable[_P, _T_Return]:
return functools.partial(func, arg) # type: ignore[call-arg]
return functools.partial(func, arg)

if func is not None:
return decorator(func)
Expand Down
2 changes: 1 addition & 1 deletion src/easynetwork/lowlevel/api_async/backend/_trio/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ async def start(
if name is None:
name = TaskUtils.compute_task_name_from_func(coro_func)

return await nursery.start(self.__task_coroutine, coro_func, args, name=name)
return await nursery.start(self.__task_coroutine, coro_func, args, name=name) # type: ignore[return-value]

def __check_nursery_started(self) -> trio.Nursery:
if (n := self.__nursery) is None:
Expand Down
2 changes: 1 addition & 1 deletion src/easynetwork/lowlevel/futures.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def _setup_func(self, func: Callable[_P, _T]) -> Callable[_P, _T]:
if self.__handle_contexts:
ctx = contextvars.copy_context()
ctx.run(sniffio.current_async_library_cvar.set, None)
func = functools.partial(ctx.run, func) # type: ignore[call-arg]
func = functools.partial(ctx.run, func)
return func

@property
Expand Down

0 comments on commit 04a6f00

Please sign in to comment.