aio-libs / aio-libs/yarl

tests/test_pydantic.py fails to collect

オープン
#1,872 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
1.5k
フォーク
215
平均マージ
1日 2分
マージ済み PR(30日)
13

説明

### Please confirm the following

- [ ] I agree to follow the [aio-libs Code of Conduct][CoC]

[CoC]: ../../.github/blob/master/CODE_OF_CONDUCT.md

- [X] I have checked the [current issues][issue search] for duplicates.

[issue search]: ../search?q=is%3Aissue&type=issues

- [X] I understand this is open source software provided for free and that I might not receive a timely response.
- [X] I am positive I am **NOT** reporting a (potential) security vulnerability, to the best of my knowledge. *(These must be shared by submitting [this report form][vulnerability report form] instead, if any hesitation exists.)*

[vulnerability report form]: ../security/advisories/new

- [ ] I am willing to submit a pull request with reporoducers as xfailing test cases or even entire fix. *(Assign this issue to me.)*

### Describe the bug

Not sure when it broke, but currently on FreeBSD, for either yarl 1.24.2 and 1.24.5, `tests/test_pydantic.py` fails to collect:

```
============================= test session starts ==============================
platform freebsd15 -- Python 3.12.14, pytest-9.1.1, pluggy-1.6.0 -- /usr/local/bin/python3.12
codspeed: 5.0.3 (disabled, mode: walltime, callgraph: not supported, timer_resolution: 280.0ns)
cachedir: .pytest_cache
hypothesis profile 'default'
rootdir: /work/usr/ports/www/py-yarl/work-py312/yarl-1.24.5
configfile: pytest.ini
testpaths: tests/
plugins: codspeed-5.0.3, hypothesis-6.165.10
collecting ... collected 1621 items / 1 error

==================================== ERRORS ====================================
___________________ ERROR collecting tests/test_pydantic.py ____________________
tests/test_pydantic.py:13: in
class TstModel(pydantic.BaseModel):
/usr/local/lib/python3.12/site-packages/pydantic/main.py:197: in __new__
fields[ann_name] = ModelField.infer(
/usr/local/lib/python3.12/site-packages/pydantic/fields.py:504: in infer
return cls(
/usr/local/lib/python3.12/site-packages/pydantic/fields.py:434: in __init__
self.prepare()
/usr/local/lib/python3.12/site-packages/pydantic/fields.py:555: in prepare
self.populate_validators()
/usr/local/lib/python3.12/site-packages/pydantic/fields.py:829: in populate_validators
*(get_validators() if get_validators else list(find_validators(self.type_, self.model_config))),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/usr/local/lib/python3.12/site-packages/pydantic/validators.py:768: in find_validators
raise RuntimeError(f'no validator found for {type_}, see `arbitrary_types_allowed` in Config')
E RuntimeError: no validator found for , see `arbitrary_types_allowed` in Config
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
=============================== 1 error in 1.38s ===============================
```

Pydanyic version is 1.10.20. Full build log (including all versions of dependencies) here: https://gist.github.com/AMDmi3/6eac3b8045f644ed96890aaa36281bbb

### To Reproduce

Run pytest

### Expected behavior

Test should pass

### Python Version

```console
3.12.14
```

### multidict Version

```console
6.7.1
```

### propcache Version

```console
0.4.1
```

### yarl Version

```console
1.24.5
```

### OS

FreeBSD 15.1

### Additional context

_No response_

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。