Christophe Bornet
f6d4fec4d5
core: Add ruff rules ANN (type annotations) ( #29271 )
...
See https://docs.astral.sh/ruff/rules/#flake8-annotations-ann
The interest compared to only mypy is that ruff is very fast at
detecting missing annotations.
ANN101 and ANN102 are deprecated so we ignore them
ANN401 (no Any type) ignored to be in sync with mypy config
---------
Co-authored-by: ccurme <chester.curme@gmail.com>
2025-02-22 17:46:28 -05:00
ccurme
92889edafd
core[patch]: release 0.3.37 ( #29895 )
2025-02-19 20:04:35 +00:00
Eugene Yurtsev
8e5074d82d
core: release 0.3.36 ( #29869 )
...
Release 0.3.36
2025-02-18 19:51:43 +00:00
Christophe Bornet
3dffee3d0b
all: Bump blockbuster version to 1.5.18 ( #29806 )
...
Has fixes for running on Windows and non-CPython runtimes.
2025-02-14 07:55:38 -08:00
ccurme
e61f463745
core[patch]: release 0.3.35 ( #29764 )
2025-02-12 18:13:10 +00:00
ccurme
a91e58bc10
core: release 0.3.34 ( #29644 )
2025-02-06 15:53:56 -05:00
ccurme
d172984c91
infra: migrate to uv ( #29566 )
2025-02-06 13:36:26 -05:00
Christophe Bornet
aab2e42169
core[patch]: Use Blockbuster to detect blocking calls in asyncio during tests ( #29043 )
...
This PR uses the [blockbuster](https://github.com/cbornet/blockbuster )
library in langchain-core to detect blocking calls made in the asyncio
event loop during unit tests.
Avoiding blocking calls is hard as these can be deeply buried in the
code or made in 3rd party libraries.
Blockbuster makes it easier to detect them by raising an exception when
a call is made to a known blocking function (eg: `time.sleep`).
Adding blockbuster allowed to find a blocking call in
`aconfig_with_context` (it ends up calling `get_function_nonlocals`
which loads function code).
**Dependencies:**
- blockbuster (test)
**Twitter handle:** cbornet_
2025-01-31 10:06:34 -05:00
Erick Friis
07e2e80fe7
core: release 0.3.33 ( #29483 )
2025-01-29 14:11:53 -08:00
Erick Friis
8bf9c71673
core: release 0.3.32 ( #29450 )
2025-01-28 07:20:04 +00:00
Christophe Bornet
dbb6b7b103
core: Add ruff rules TRY (tryceratops) ( #29388 )
...
TRY004 ("use TypeError rather than ValueError") existing errors are
marked as ignore to preserve backward compatibility.
LMK if you prefer to fix some of them.
Co-authored-by: Erick Friis <erick@langchain.dev>
2025-01-24 05:01:40 +00:00
Christophe Bornet
e4a78dfc2a
core: Bump ruff version to 0.9 ( #29201 )
...
Also run some preview autofix and formatting
---------
Co-authored-by: Erick Friis <erick@langchain.dev>
2025-01-22 00:20:09 +00:00
Bagatur
923e6fb321
core[patch]: 0.3.31 ( #29320 )
2025-01-21 01:17:31 +00:00
Christophe Bornet
989eec4b7b
core: Add ruff rule S101 (no assert) ( #29267 )
...
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2025-01-20 20:24:31 +00:00
Christophe Bornet
e5d62c6ce7
core: Add ruff rule W293 (whitespaces) ( #29272 )
2025-01-20 15:16:12 -05:00
ccurme
d5360b9bd6
core[patch]: release 0.3.30 ( #29256 )
2025-01-16 17:52:37 -05:00
ccurme
8e50e4288c
core[patch]: release 0.3.29 ( #29017 )
2025-01-03 14:58:39 -05:00
Bagatur
1c797ac68f
infra: speed up unit tests ( #28974 )
...
Co-authored-by: Erick Friis <erick@langchain.dev>
2025-01-02 04:13:08 +00:00
ccurme
f0e858b4e3
core[patch]: release 0.3.28 ( #28837 )
2024-12-19 17:52:32 -05:00
Bagatur
557f63c2e6
core[patch]: Release 0.3.27 ( #28799 )
2024-12-18 21:58:03 +00:00
Erick Friis
5cf965004c
core: release 0.3.26 ( #28793 )
2024-12-18 17:28:42 +00:00
Erick Friis
387284c259
core: release 0.3.25 ( #28718 )
2024-12-14 02:22:28 +00:00
Bagatur
1fbd86a155
core[patch]: Release 0.3.24 ( #28656 )
2024-12-10 20:19:21 +00:00
Bagatur
e6a62d8422
core,langchain,community[patch]: allow langsmith 0.2 ( #28598 )
2024-12-10 18:50:58 +00:00
Bagatur
24292c4a31
core[patch]: Release 0.3.23 ( #28648 )
2024-12-10 10:01:16 +00:00
Bagatur
dda9f90047
core[patch]: Release 0.3.22 ( #28582 )
2024-12-06 19:36:53 +00:00
ccurme
f5f1149257
core[patch]: release 0.3.21 ( #28314 )
2024-11-23 12:46:56 +00:00
ccurme
697dda5052
core[patch]: release 0.3.20 ( #28293 )
2024-11-22 14:04:29 -05:00
Erick Friis
6d2004ee7d
multiple: langchain-standard-tests -> langchain-tests ( #28139 )
2024-11-15 11:32:04 -08:00
Erick Friis
d3252b7417
core: release 0.3.19 ( #28137 )
2024-11-15 18:15:28 +00:00
ccurme
f1222739f8
core[patch]: support numpy 2 ( #27991 )
2024-11-14 13:08:57 -05:00
Erick Friis
76e0127539
core: release 0.3.18 ( #28070 )
2024-11-13 16:19:13 +00:00
ccurme
5460096086
core[patch]: release 0.3.17 ( #28060 )
2024-11-12 19:38:56 +00:00
Bagatur
9ebd7ebed8
core[patch]: Release 0.3.16 ( #28045 )
2024-11-12 14:57:15 +00:00
Bagatur
181bcd0577
core[patch]: Release 0.3.15 ( #27802 )
2024-10-31 10:35:02 -07:00
Bagatur
deb4320d29
core[patch]: Release 0.3.14 ( #27764 )
2024-10-30 21:47:33 +00:00
Erick Friis
fbfc6bdade
core: test runner improvements ( #27654 )
...
when running core tests locally this
- prevents langsmith tracing from being enabled by env vars
- prevents network calls
2024-10-25 15:06:59 -07:00
Erick Friis
600b7bdd61
all: test 3.13 ci ( #27197 )
...
Co-authored-by: Bagatur <baskaryan@gmail.com>
Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
2024-10-25 12:56:58 -07:00
Bagatur
06df15c9c0
core[patch]: Release 0.3.13 ( #27651 )
2024-10-25 19:22:44 +00:00
Erick Friis
265e0a164a
core: add flake8-bandit (S) ruff rules to core ( #27368 )
...
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2024-10-24 22:33:41 +00:00
Erick Friis
f9cc9bdcf3
core: release 0.3.12 ( #27410 )
2024-10-17 06:32:40 -07:00
Eugene Yurtsev
202d7f6c4a
core[patch]: 0.3.11 release ( #27403 )
...
Core bump to 0.3.11
2024-10-16 15:39:37 -04:00
Erick Friis
92ae61bcc8
multiple: rely on asyncio_mode auto in tests ( #27200 )
2024-10-15 16:26:38 +00:00
Diao Zihao
4553573acb
core[patch],langchain[patch],community[patch]: Bump version dependency of tenacity to >=8.1.0,!=8.4.0,<10 ( #27201 )
...
This should fixes the compatibility issue with graprag as in
- https://github.com/langchain-ai/langchain/discussions/25595
Here are the release notes for tenacity 9
(https://github.com/jd/tenacity/releases/tag/9.0.0 )
---------
Signed-off-by: Zihao Diao <hi@ericdiao.com>
Co-authored-by: Eugene Yurtsev <eugene@langchain.dev>
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2024-10-09 14:00:45 +00:00
Erick Friis
7264fb254c
core: release 0.3.10 ( #27209 )
2024-10-08 16:21:42 -07:00
Christophe Bornet
16f5fdb38b
core: Add various ruff rules ( #26836 )
...
Adds
- ASYNC
- COM
- DJ
- EXE
- FLY
- FURB
- ICN
- INT
- LOG
- NPY
- PD
- Q
- RSE
- SLOT
- T10
- TID
- YTT
Co-authored-by: Erick Friis <erick@langchain.dev>
2024-10-07 22:30:27 +00:00
Christophe Bornet
d31ec8810a
core: Add ruff rules for error messages (EM) ( #26965 )
...
All auto-fixes
Co-authored-by: Erick Friis <erick@langchain.dev>
2024-10-07 22:12:28 +00:00
Bagatur
11df1b2b8d
core[patch]: Release 0.3.9 ( #27117 )
2024-10-04 18:35:33 +00:00
Bagatur
546dc44da5
core[patch]: add UsageMetadata details ( #27072 )
2024-10-03 20:36:17 +00:00
Eugene Yurtsev
635c55c039
core[patch]: Release 0.3.8 ( #27046 )
...
0.3.8 release for core
2024-10-02 16:58:38 +00:00
Bagatur
34bd718fe1
core[patch]: Release 0.3.7 ( #27004 )
2024-09-30 18:52:42 +00:00
Christophe Bornet
db8845a62a
core: Add ruff rules for pycodestyle Warning (W) ( #26964 )
...
All auto-fixes.
2024-09-30 09:31:43 -04:00
Christophe Bornet
7809b31b95
core[patch]: Add ruff rules for flake8-simplify (SIM) ( #26848 )
...
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2024-09-27 20:13:23 +00:00
Christophe Bornet
f4e738bb40
core: Add ruff rules for PIE ( #26939 )
...
All auto-fixes.
2024-09-27 12:08:35 -04:00
Erick Friis
ef2ab26113
core: release 0.3.6 ( #26863 )
2024-09-25 11:05:53 -07:00
Christophe Bornet
3a1b9259a7
core: Add ruff rules for comprehensions (C4) ( #26829 )
2024-09-25 09:34:17 -04:00
Erick Friis
238a31bbd9
core: release 0.3.5 ( #26737 )
2024-09-21 00:26:39 +00:00
Erick Friis
4a2745064a
core: release 0.3.4 ( #26729 )
2024-09-20 14:47:15 -07:00
Erick Friis
465e43cd43
core: release 0.3.3 ( #26713 )
2024-09-20 13:54:19 -07:00
William FH
19ce95d3c9
Avoid copying runs ( #26689 )
...
Also, re-unify run trees. Use a single shared client.
2024-09-20 10:57:41 -07:00
Bagatur
c453b76579
core[patch]: Release 0.3.2 ( #26686 )
2024-09-19 14:58:45 -07:00
Christophe Bornet
fd21ffe293
core: Add N(naming) ruff rules ( #25362 )
...
Public classes/functions are not renamed and rule is ignored for them.
Co-authored-by: Erick Friis <erick@langchain.dev>
2024-09-19 05:09:39 +00:00
Erick Friis
9909354cd0
core: use ruff.target-version instead ( #26634 )
...
tested on one of the replacement cases and seems to work!

2024-09-18 21:06:14 +00:00
Erick Friis
84b831356c
core: remove [project] tag from pyproject ( #26633 )
...
makes core incompatible with uv installs
2024-09-18 20:39:49 +00:00
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
Christophe Bornet
3a99467ccb
core[patch]: Add ruff rule UP006(use PEP585 annotations) ( #26574 )
...
* Added rules `UPD006` now that Pydantic is v2+
---------
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2024-09-17 21:22:50 +00:00
Bagatur
145a49cca2
core[patch]: Release 0.3.1 ( #26581 )
2024-09-17 17:34:09 +00:00
Erick Friis
d46ab19954
core: release 0.3.0 ( #26453 )
2024-09-13 21:45:45 +00:00
Erick Friis
c2a3021bb0
multiple: pydantic 2 compatibility, v0.3 ( #26443 )
...
Signed-off-by: ChengZi <chen.zhang@zilliz.com>
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
Co-authored-by: Dan O'Donovan <dan.odonovan@gmail.com>
Co-authored-by: Tom Daniel Grande <tomdgrande@gmail.com>
Co-authored-by: Grande <Tom.Daniel.Grande@statsbygg.no>
Co-authored-by: Bagatur <baskaryan@gmail.com>
Co-authored-by: ccurme <chester.curme@gmail.com>
Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
Co-authored-by: Tomaz Bratanic <bratanic.tomaz@gmail.com>
Co-authored-by: ZhangShenao <15201440436@163.com>
Co-authored-by: Friso H. Kingma <fhkingma@gmail.com>
Co-authored-by: ChengZi <chen.zhang@zilliz.com>
Co-authored-by: Nuno Campos <nuno@langchain.dev>
Co-authored-by: Morgante Pell <morgantep@google.com>
2024-09-13 14:38:45 -07:00
Bagatur
0f2b32ffa9
core[patch]: Release 0.2.40 ( #26435 )
2024-09-13 09:57:09 -07:00
Bagatur
17659ca2cd
core[patch]: Release 0.2.39 ( #26279 )
2024-09-10 20:11:27 +00:00
William FH
262e19b15d
infra: Clear cache for env-var checks ( #26073 )
2024-09-06 21:29:29 +00:00
Bagatur
0c69c9fb3f
core[patch]: Release 0.2.38 ( #25974 )
2024-09-03 17:31:41 +00:00
Bagatur
fabe32c06d
core[patch]: Release 0.2.37 ( #25900 )
2024-08-30 22:29:12 +00:00
Erick Friis
d6c4803ab0
core: release 0.2.36 ( #25819 )
2024-08-28 18:04:51 +00:00
Christophe Bornet
ff0df5ea15
core[patch]: Add B(bugbear) ruff rules ( #25520 )
...
Co-authored-by: Bagatur <baskaryan@gmail.com>
2024-08-28 07:09:29 +00:00
Bagatur
30f1bf24ac
core[patch]: Release 0.2.35 ( #25729 )
2024-08-25 16:49:27 -07:00
Christophe Bornet
7f1e444efa
partners: Use simsimd types ( #25299 )
...
The simsimd package [now has
types](https://github.com/ashvardanian/SimSIMD/releases/tag/v5.0.0 )
2024-08-23 10:41:39 -04:00
Christophe Bornet
ee98da4f4e
core[patch]: Add UP(upgrade) ruff rules ( #25358 )
2024-08-22 16:29:22 -07:00
Bagatur
628574b9c2
core[patch]: Release 0.2.34 ( #25622 )
2024-08-21 16:26:51 +00:00
Bagatur
df98552b6f
core[patch]: Release 0.2.33 ( #25498 )
2024-08-16 11:18:54 -07:00
Bagatur
ec8ffc8f40
core[patch]: Release 0.2.32 ( #25420 )
2024-08-14 15:56:56 -07:00
Bagatur
a58d4ba340
core[patch]: Release 0.2.31 ( #25388 )
2024-08-14 11:26:49 -07:00
Erick Friis
252f0877d1
core: release 0.2.30 ( #25321 )
2024-08-12 22:01:24 +00:00
Bagatur
b4c12346cc
core[patch]: Release 0.2.29 ( #25126 )
2024-08-07 09:50:20 -07:00
Bagatur
70677202c7
core[patch]: Release 0.2.29rc1 ( #25115 )
2024-08-06 21:36:56 +00:00
Bagatur
4305f78e40
core[patch]: Release 0.2.28 ( #25000 )
2024-08-02 21:07:06 +00:00
Bagatur
245cb5a252
core[patch]: Release 0.2.27 ( #24952 )
2024-08-02 01:43:24 +00:00
Bagatur
7d1694040d
core[patch]: Release 0.2.26 ( #24898 )
2024-07-31 19:00:50 +00:00
Bagatur
8461934c2b
core[patch], integrations[patch]: convert TypedDict to tool schema support ( #24641 )
...
supports following UX
```python
class SubTool(TypedDict):
"""Subtool docstring"""
args: Annotated[Dict[str, Any], {}, "this does bar"]
class Tool(TypedDict):
"""Docstring
Args:
arg1: foo
"""
arg1: str
arg2: Union[int, str]
arg3: Optional[List[SubTool]]
arg4: Annotated[Literal["bar", "baz"], ..., "this does foo"]
arg5: Annotated[Optional[float], None]
```
- can parse google style docstring
- can use Annotated to specify default value (second arg)
- can use Annotated to specify arg description (third arg)
- can have nested complex types
2024-07-31 18:27:24 +00:00
Erick Friis
88418af3f5
core: release 0.2.25 ( #24833 )
2024-07-30 18:41:09 +00:00
Bagatur
8964f8a710
core: use mypy<1.11 ( #24749 )
...
Bug in mypy 1.11.0 blocking CI, see example:
https://github.com/langchain-ai/langchain/actions/runs/10127096903/job/28004492692?pr=24641
2024-07-27 16:37:02 -07:00
Bagatur
315223ce26
core[patch]: Release 0.2.24 ( #24722 )
2024-07-26 18:55:32 +00:00
Bagatur
918e1c8a93
core[patch]: Release 0.2.23 ( #24557 )
2024-07-23 09:01:18 -07:00
Erick Friis
3dce2e1d35
all: add release notes to pypi ( #24519 )
2024-07-22 13:59:13 -07:00
Erick Friis
ef049769f0
core[patch]: Release 0.2.22 ( #24423 )
...
Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
2024-07-19 09:09:24 -07:00
Bagatur
a4c101ae97
core[patch]: Release 0.2.21 ( #24372 )
2024-07-17 22:44:35 +00:00
Bagatur
80e7cd6cff
core[patch]: Release 0.2.20 ( #24322 )
2024-07-16 15:04:36 -07:00
Bagatur
620b118c70
core[patch]: Release 0.2.19 ( #24272 )
2024-07-15 07:51:30 -07:00
Bagatur
5c3e2612da
core[patch]: Release 0.2.18 ( #24230 )
2024-07-13 09:14:43 -07:00