langchain/libs/core/tests/unit_tests/utils
Christophe Bornet a47b332841
core: Put Python version as a project requirement so it is considered by ruff (#26608)
Ruff doesn't know about the python version in
`[tool.poetry.dependencies]`. It can get it from
`project.requires-python`.

Notes:
* poetry seems to have issues getting the python constraints from
`requires-python` and using `python` in per dependency constraints. So I
had to duplicate the info. I will open an issue on poetry.
* `inspect.isclass()` doesn't work correctly with `GenericAlias`
(`list[...]`, `dict[..., ...]`) on Python <3.11 so I added some `not
isinstance(type, GenericAlias)` checks:

Python 3.11
```pycon
>>> import inspect
>>> inspect.isclass(list)
True
>>> inspect.isclass(list[str])
False
```

Python 3.9
```pycon
>>> import inspect
>>> inspect.isclass(list)
True
>>> inspect.isclass(list[str])
True
```

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2024-09-18 14:37:57 +00:00
..
__init__.py Separate out langchain_core package (#13577) 2023-11-20 13:09:30 -08:00
test_aiter.py core: Put Python version as a project requirement so it is considered by ruff (#26608) 2024-09-18 14:37:57 +00:00
test_env.py core[minor]: Support multiple keys in get_from_dict_or_env (#23086) 2024-06-18 14:13:28 -04:00
test_function_calling.py core: Put Python version as a project requirement so it is considered by ruff (#26608) 2024-09-18 14:37:57 +00:00
test_html.py core[patch]: Enhance link extraction with query parameters (#20259) 2024-04-27 02:22:36 +00:00
test_imports.py core[minor]: Add factory for looking up secrets from the env (#25198) 2024-08-08 16:41:58 -04:00
test_iter.py core: Put Python version as a project requirement so it is considered by ruff (#26608) 2024-09-18 14:37:57 +00:00
test_json_schema.py core[patch]: Fix utils.json_schema.dereference_refs (#24335 KeyError: 400 in JSON schema processing) (#24337) 2024-07-19 13:31:00 -04:00
test_pydantic.py core: Put Python version as a project requirement so it is considered by ruff (#26608) 2024-09-18 14:37:57 +00:00
test_rm_titles.py core: update _rm_titles to account for title argument name bug (#19036) 2024-03-18 21:25:06 -07:00
test_utils.py core: Put Python version as a project requirement so it is considered by ruff (#26608) 2024-09-18 14:37:57 +00:00