Releases: edgedb/edgedb-python
v1.9.0
Fixes
-
Fix globals in nested modules (#474)
(by @msullivan in ff08d9d for #474) -
Support passing dicts and namedtuples for namedtuple arguments (#473)
(by @msullivan in 60da99a for #374) -
Expose the error details field. (#479)
(by @vpetrovykh in 113ed0d for #472)
v1.8.0
Fixes
-
Fix test that broke due to error message change (#465)
(by @msullivan in fed7b24 for #465) -
Don't fail if 'id' is missing from an object. (#464)
(by @msullivan in be2de71 for #464) -
docs: Fix typos is docs (#467)
(by @elliotwaite in b4d91b9 for #467) -
Fix for Pydantic 2.x (#468)
(by @fantix in c6581cb for #468)
v1.7.0
v1.6.0
Changes
-
Implement support for new type descriptor protocol
(by @elprans in 47eec19 for #427) -
Don't depend on exact syntax errors in tests
(by @msullivan in b3ce0c6 for #451) -
Fix an error in string representation of RelativeDuration.
(by @vpetrovykh in 667da72 for #453) -
Add multirange support.
(by @vpetrovykh in 15e280e for #452)
v1.5.0
Changes
-
Add --dir option to codegen for searching .edgeql files (#434)
(by @fantix in ec90e35 for #434) -
Implement support for vector type (#439 #440)
(by @msullivan in 0bee718 for #439, 50a25ef for #440) -
Lowercase org/instance name when computing Cloud instance DNS (#441)
(by @elprans in 0f30b26 for #441) -
Implement
database
config in project dir (#442)
(by @tailhook in bee7327 for #442)
v1.4.0
Changes
-
Update for rules of instance names (#423) (by @fantix in 5bc5699 for #420)
-
Allow enums in array codec (#431) (by @fantix in 2de7e3f for #408)
-
Prohibit concurrent operations on the same transaction object (#430) (by @fantix in f1fa612 for #130)
-
Fix state of transaction start (#424) (by @fantix in 297de72)
-
codegen: Handle non-identifier characters in enum values (#432) (by @fantix in e1ec16d for #428)
Docs
- docs: add Code Generation to table of contents (#421) (by @AndreasPB in ffe74a1 for #421)
v1.3.0
v1.2.0
Changes
-
Output pretty error if possible (#399)
(by @fantix in a2bec18 for #395) -
Codegen: allow providing a path after --file (#400)
(by @fantix in 6bce57e for #396)
Fixes
-
Handle ErrorResponse in ping (#393)
(by @fantix in 8b28947 for #393) -
Disallow None in elements of array argument (#401)
(by @fantix in 26fb6d8 for #376)
Docs
v1.1.0
v1.0.0
This is the v1.0 release for the edgedb-python
client library. It is accompanied by the introduction of a new module edgedb.codegen
which can be executed to generate code from .edgeql
files.
Breaking Changes
Query Result Type Changes
-
In edgedb-python 1.0, we dropped many custom data structure implementations, and replaced them with Python builtins:
Impl Dropped Replacement Breaking Changes edgedb.Tuple
tuple
weakref.ref()
will stop working on tuplesedgedb.Set
list
* Immutability is broken
*weakref.ref()
will stop working on sets
*hash()
will stop working on sets
*repr()
produces different resultsedgedb.Array
list
* Immutability is broken
*weakref.ref()
will stop working on lists
*hash()
will stop working on listsWhile the implementations are dropped, the reference name is still there, like
edgedb.Tuple
is simply an alias of the builtintuple
. -
edgedb.NamedTuple
is reimplemented.- [Breaking Change]
weakref.ref()
will stop working on named tuples. edgedb.NamedTuple
is now a subclass of Python builtintuple
.- Before named tuple instances are created, a transient heap type
DerivedNamedTuple
will be created first as a subclass ofedgedb.NamedTuple
, which is then used to create instances with naming data. DerivedNamedTuple
classes are usually cached in codecs, and garbage-collected when all its references are cleared.
- [Breaking Change]
-
edgedb.EnumValue
is reimplemented.- [Breaking Change] The result of
repr()
is slightly changed to have theedgedb.
prefix. edgedb.EnumValue
is now a subclass of Python builtinenum.Enum
.- Before enum values are created, a transient heap type
DerivedEnumValue
will be created first as a subclass ofedgedb.EnumValue
, which is then used to create instances with full enumeration. Enum member names are simply upper case strings of corresponding values. DerivedEnumValue
classes are usually cached in codecs, and garbage-collected when all its references are cleared.
- [Breaking Change] The result of
-
edgedb.Object
changes.- [Breaking Change] The custom implementation of
__hash__()
onedgedb.Object
is dropped, nowhash()
simply returns a hash on the memory address. - [Breaking Change] The custom implementation of rich comparion is dropped, that means
<
,>
,<=
,>=
will stop working onedgedb.Object
instances, and==
is now equivalent tois
foredgedb.Object
instances. edgedb.Object
instances will now yieldTrue
fordataclasses.is_dataclass()
check.edgedb.Object
instances can now be used indataclasses.as_dict()
to recursively generate a dict containing all properties and links (excluding link properties).
- [Breaking Change] The custom implementation of
-
The performance impact is minimal. We are still using the most efficient C-API and C/Cython implementations to offer query results,
No more Python 3.6
As Python 3.6 is no longer supported itself 10 months ago, edgedb-python is also dropping support for Python 3.6.
edgedb-python 1.0 now supprots only Pyhton 3.7 to Python 3.11.
New Features
Code generation
Now you can create one or more .edgeql
files in your EdgeDB project directory, and run:
$ python -m edgedb.codegen
or alternatively:
$ edgedb-py
This command will search through the EdgeDB project directory and generate typesafe query code for the .edgeql
files.
Access of link properties
edgedb.Link
and edgedb.LinkSet
types, as well as the way to access them, are deprecated in edgedb-python 1.0 and will be dropped in 2.0. For example, with a given schema:
type Person {
multi link friends -> Person {
property strength -> float32;
}
}
Expression like person["friends"]
will now emit a DeprecationWarning
. This deprecates the old way to access link properties like person["friends"][0].strength
. Instead, a new way is introduced: you should now use person.friends[0]["@strength"]
.
Detail Changelog
Changes
-
Implement dataclass for EdgeObject (#359) (by @fantix in dfb8c8b for #359)
-
Redo edgedb basic types to inherit from builtin types (#366) (by @fantix in b11b991 for #366)
-
Officially drop 3.6 support (#373) (by @msullivan in 7b76bc7 for #373)
-
Support Python 3.11 (#375) (by @msullivan in 04b0da2 for #375)
-
Codegen with the describe_query() API (#363) (by @fantix in 361221d for #363)
-
Add codegen docs (#380) (by @colinhacks in 23dd42e for #380)
-
Use typing_extension.Literal in codegen for Python 3.7 (by @fantix in 6d0d6ab)
Fixes
-
Tweak wording in query_single() error messages (#369) (by @msullivan in e24bb53 for #369)
-
Fix flake tests on python3.7 (#371) (by @msullivan in 583e1cb for #371)
-
Don't reject tuple arguments on the client side (#370) (by @msullivan in 09c950f for #370)
-
Correct edgedb.Client.close() timeout behavior (by @fantix in 33a912c)
-
Ping first if conn is idle for too long (#365) (by @fantix in 99cf78a for #365)
-
Use @-prefixed keys in object codec for link properties (#384) (by @fantix in 68480f9 for #377)