langroid 0.59.0b1__py3-none-any.whl → 0.59.0b3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- langroid/pydantic_v1/__init__.py +40 -22
- langroid/pydantic_v1/main.py +2 -3
- {langroid-0.59.0b1.dist-info → langroid-0.59.0b3.dist-info}/METADATA +1 -1
- {langroid-0.59.0b1.dist-info → langroid-0.59.0b3.dist-info}/RECORD +6 -6
- {langroid-0.59.0b1.dist-info → langroid-0.59.0b3.dist-info}/WHEEL +0 -0
- {langroid-0.59.0b1.dist-info → langroid-0.59.0b3.dist-info}/licenses/LICENSE +0 -0
langroid/pydantic_v1/__init__.py
CHANGED
@@ -1,33 +1,51 @@
|
|
1
1
|
"""
|
2
|
-
Compatibility layer for Pydantic
|
2
|
+
Compatibility layer for Langroid's Pydantic migration.
|
3
3
|
|
4
|
-
|
5
|
-
has
|
4
|
+
IMPORTANT: You are importing from langroid.pydantic_v1 but getting Pydantic v2 classes!
|
5
|
+
Langroid has fully migrated to Pydantic v2, and this compatibility layer is deprecated.
|
6
6
|
"""
|
7
7
|
|
8
|
-
|
9
|
-
|
8
|
+
import warnings
|
9
|
+
import logging
|
10
10
|
|
11
|
-
|
12
|
-
from pydantic_settings import BaseSettings, SettingsConfigDict # noqa: F401
|
11
|
+
logger = logging.getLogger(__name__)
|
13
12
|
|
14
|
-
#
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
13
|
+
# Only show the visual warning, not the standard deprecation warning
|
14
|
+
# The standard warning is too noisy and shows the import line
|
15
|
+
logger.warning(
|
16
|
+
"""
|
17
|
+
╔════════════════════════════════════════════════════════════════════════╗
|
18
|
+
║ ⚠️ DEPRECATION WARNING ⚠️ ║
|
19
|
+
╠════════════════════════════════════════════════════════════════════════╣
|
20
|
+
║ ║
|
21
|
+
║ You are importing from langroid.pydantic_v1, but you're actually ║
|
22
|
+
║ getting Pydantic v2 classes. Langroid has fully migrated to v2. ║
|
23
|
+
║ ║
|
24
|
+
║ Please update your imports: ║
|
25
|
+
║ OLD: from langroid.pydantic_v1 import BaseModel, Field ║
|
26
|
+
║ NEW: from pydantic import BaseModel, Field ║
|
27
|
+
║ ║
|
28
|
+
║ Also ensure your code uses Pydantic v2 patterns: ║
|
29
|
+
║ • Use model_dump() instead of dict() ║
|
30
|
+
║ • Use model_dump_json() instead of json() ║
|
31
|
+
║ • Use ConfigDict instead of class Config ║
|
32
|
+
║ • Use model_validate() instead of parse_obj() ║
|
33
|
+
║ ║
|
34
|
+
║ This compatibility layer will be removed in a future version. ║
|
35
|
+
╚════════════════════════════════════════════════════════════════════════╝
|
36
|
+
"""
|
27
37
|
)
|
28
38
|
|
29
|
-
#
|
30
|
-
#
|
39
|
+
# Import from pydantic v2 directly (not from pydantic.v1)
|
40
|
+
# This allows existing code to continue working if it's already v2-compatible
|
41
|
+
from pydantic import * # noqa: F403, F401
|
42
|
+
|
43
|
+
# BaseSettings has moved in v2, import it explicitly
|
44
|
+
try:
|
45
|
+
from pydantic_settings import BaseSettings # noqa: F401
|
46
|
+
except ImportError:
|
47
|
+
# Fallback for older pydantic versions
|
48
|
+
from pydantic import BaseSettings # noqa: F401
|
31
49
|
|
32
50
|
# Explicitly export all items for mypy
|
33
51
|
__all__ = [
|
langroid/pydantic_v1/main.py
CHANGED
@@ -5,7 +5,6 @@ This module now imports directly from Pydantic v2 since all internal code
|
|
5
5
|
has been migrated to use Pydantic v2 patterns.
|
6
6
|
"""
|
7
7
|
|
8
|
-
#
|
8
|
+
# Import from pydantic.main but don't trigger the warning again
|
9
|
+
# The warning is already shown when importing from langroid.pydantic_v1
|
9
10
|
from pydantic.main import * # noqa: F403, F401
|
10
|
-
|
11
|
-
from langroid.pydantic_v1 import BaseModel # noqa: F401
|
@@ -135,9 +135,9 @@ langroid/prompts/__init__.py,sha256=RW11vK6jiLPuaUh4GpeFvstti73gkm8_rDMtrbo2YsU,
|
|
135
135
|
langroid/prompts/dialog.py,sha256=SpfiSyofSgy2pwD1YboHR_yHO3LEEMbv6j2sm874jKo,331
|
136
136
|
langroid/prompts/prompts_config.py,sha256=U4TxNld-ulVzWMK9joSVH852qfZtvF310eIG_mSGxmg,140
|
137
137
|
langroid/prompts/templates.py,sha256=VV84HVf_amOx6xdWQyIsN9i5dNfrbl8rsfFp6hyfOss,6371
|
138
|
-
langroid/pydantic_v1/__init__.py,sha256=
|
138
|
+
langroid/pydantic_v1/__init__.py,sha256=0XAvPYar-O0y4dF-mCSSAO4XQf2cDsmec165OZn9kMM,3180
|
139
139
|
langroid/pydantic_v1/__init__.py-e,sha256=rfgQ78ZCiaN5A9P2tvAKGuzspGJdDeGP8czONYsdz4U,1008
|
140
|
-
langroid/pydantic_v1/main.py,sha256=
|
140
|
+
langroid/pydantic_v1/main.py,sha256=OPsAisRqkzWd4hvlvJqPH-goMWIyModK2AQJOTxThQg,362
|
141
141
|
langroid/pydantic_v1/main.py-e,sha256=Qh6qp5aqAIZxPprdHI3ys2kk3jHPQKBMIcr-zKmTomo,326
|
142
142
|
langroid/utils/__init__.py,sha256=Sruos2tB4G7Tn0vlblvYlX9PEGR0plI2uE0PJ4d_EC4,353
|
143
143
|
langroid/utils/configuration.py,sha256=7j3LR4vPiOPuu4BD8-uy0T8Um2qpx--RD6PUlF-K60Q,4886
|
@@ -175,7 +175,7 @@ langroid/vector_store/pineconedb.py-e,sha256=LSC507hYKu6D3HZa3NnSQT-fmdGnUfRiz05
|
|
175
175
|
langroid/vector_store/postgres.py,sha256=TY_VshimwFZglYgKYm7Qn1F-dCSL8GsXRTgmh7VTe9c,16110
|
176
176
|
langroid/vector_store/qdrantdb.py,sha256=mqxMOrcLAQpl0opuL8vXhdIt6ppv2zYyAvddHZoEW0Y,19184
|
177
177
|
langroid/vector_store/weaviatedb.py,sha256=BS95bxVKNYfQc9VPb85a1HlcgnXfAkgMzjydnjCgRHc,11853
|
178
|
-
langroid-0.59.
|
179
|
-
langroid-0.59.
|
180
|
-
langroid-0.59.
|
181
|
-
langroid-0.59.
|
178
|
+
langroid-0.59.0b3.dist-info/METADATA,sha256=OE4G7EvotLp-7fy6SnENvMokMxZ0S6nO_yQGv5qFln0,66319
|
179
|
+
langroid-0.59.0b3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
180
|
+
langroid-0.59.0b3.dist-info/licenses/LICENSE,sha256=EgVbvA6VSYgUlvC3RvPKehSg7MFaxWDsFuzLOsPPfJg,1065
|
181
|
+
langroid-0.59.0b3.dist-info/RECORD,,
|
File without changes
|
File without changes
|