<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/sqlalchemy.git/lib/sqlalchemy/ext/mypy, branch main</title>
<subtitle>github.com: zzzeek/sqlalchemy.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/'/>
<entry>
<title>establish column_property and query_expression as readonly from a dc perspective</title>
<updated>2023-04-12T19:11:03+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2023-04-10T16:56:47+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=9f43b10e9014e694cb89fe2899dc52f602bf2197'/>
<id>9f43b10e9014e694cb89fe2899dc52f602bf2197</id>
<content type='text'>
Fixed bug in ORM Declarative Dataclasses where the
:func:`_orm.queryable_attribute` and :func:`_orm.column_property`
constructs, which are documented as read-only constructs in the context of
a Declarative mapping, could not be used with a
:class:`_orm.MappedAsDataclass` class without adding ``init=False``, which
in the case of :func:`_orm.queryable_attribute` was not possible as no
``init`` parameter was included. These constructs have been modified from a
dataclass perspective to be assumed to be "read only", setting
``init=False`` by default and no longer including them in the pep-681
constructor. The dataclass parameters for :func:`_orm.column_property`
``init``, ``default``, ``default_factory``, ``kw_only`` are now deprecated;
these fields don't apply to :func:`_orm.column_property` as used in a
Declarative dataclasses configuration where the construct would be
read-only. Also added read-specific parameter
:paramref:`_orm.queryable_attribute.compare` to
:func:`_orm.queryable_attribute`; :paramref:`_orm.queryable_attribute.repr`
was already present.

Added missing :paramref:`_orm.mapped_column.active_history` parameter
to :func:`_orm.mapped_column` construct.

Fixes: #9628
Change-Id: I2ab44d6b763b20410bd1ebb5ac949a6d223f1ce2
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixed bug in ORM Declarative Dataclasses where the
:func:`_orm.queryable_attribute` and :func:`_orm.column_property`
constructs, which are documented as read-only constructs in the context of
a Declarative mapping, could not be used with a
:class:`_orm.MappedAsDataclass` class without adding ``init=False``, which
in the case of :func:`_orm.queryable_attribute` was not possible as no
``init`` parameter was included. These constructs have been modified from a
dataclass perspective to be assumed to be "read only", setting
``init=False`` by default and no longer including them in the pep-681
constructor. The dataclass parameters for :func:`_orm.column_property`
``init``, ``default``, ``default_factory``, ``kw_only`` are now deprecated;
these fields don't apply to :func:`_orm.column_property` as used in a
Declarative dataclasses configuration where the construct would be
read-only. Also added read-specific parameter
:paramref:`_orm.queryable_attribute.compare` to
:func:`_orm.queryable_attribute`; :paramref:`_orm.queryable_attribute.repr`
was already present.

Added missing :paramref:`_orm.mapped_column.active_history` parameter
to :func:`_orm.mapped_column` construct.

Fixes: #9628
Change-Id: I2ab44d6b763b20410bd1ebb5ac949a6d223f1ce2
</pre>
</div>
</content>
</entry>
<entry>
<title>mypy plugin fixes</title>
<updated>2023-01-18T13:56:17+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2023-01-17T01:17:50+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=0e2b3aa323f62f46a342a8a8bba35323e214d300'/>
<id>0e2b3aa323f62f46a342a8a8bba35323e214d300</id>
<content type='text'>
Adjustments made to the mypy plugin to accommodate for some potential
changes being made for issue #236 sqlalchemy2-stubs when using SQLAlchemy
1.4. These changes are being kept in sync within SQLAlchemy 2.0.
The changes are also backwards compatible with older versions of
sqlalchemy2-stubs.

Fixed crash in mypy plugin which could occur on both 1.4 and 2.0 versions
if a decorator for the :func:`_orm.registry.mapped` decorator were used
that was referenced in an expression with more than two components (e.g.
``@Backend.mapper_registry.mapped``). This scenario is now ignored; when
using the plugin, the decorator expression needs to be two components (i.e.
``@reg.mapped``).

References: https://github.com/sqlalchemy/sqlalchemy2-stubs/issues/236
Fixes: #9102
Change-Id: Ieb1bf7bf8184645bcd43253e57f1c267b2640537
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adjustments made to the mypy plugin to accommodate for some potential
changes being made for issue #236 sqlalchemy2-stubs when using SQLAlchemy
1.4. These changes are being kept in sync within SQLAlchemy 2.0.
The changes are also backwards compatible with older versions of
sqlalchemy2-stubs.

Fixed crash in mypy plugin which could occur on both 1.4 and 2.0 versions
if a decorator for the :func:`_orm.registry.mapped` decorator were used
that was referenced in an expression with more than two components (e.g.
``@Backend.mapper_registry.mapped``). This scenario is now ignored; when
using the plugin, the decorator expression needs to be two components (i.e.
``@reg.mapped``).

References: https://github.com/sqlalchemy/sqlalchemy2-stubs/issues/236
Fixes: #9102
Change-Id: Ieb1bf7bf8184645bcd43253e57f1c267b2640537
</pre>
</div>
</content>
</entry>
<entry>
<title>happy new year 2023</title>
<updated>2023-01-03T17:45:52+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2023-01-03T17:45:52+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=5147bf8e3cb321b8728b3af5bb0b2644995b3793'/>
<id>5147bf8e3cb321b8728b3af5bb0b2644995b3793</id>
<content type='text'>
Change-Id: I625af65b3fb1815b1af17dc2ef47dd697fdc3fb1
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I625af65b3fb1815b1af17dc2ef47dd697fdc3fb1
</pre>
</div>
</content>
</entry>
<entry>
<title>Try running pyupgrade on the code</title>
<updated>2022-11-16T22:03:04+00:00</updated>
<author>
<name>Federico Caselli</name>
<email>cfederico87@gmail.com</email>
</author>
<published>2022-11-03T19:52:21+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=4eb4ceca36c7ce931ea65ac06d6ed08bf459fc66'/>
<id>4eb4ceca36c7ce931ea65ac06d6ed08bf459fc66</id>
<content type='text'>
command run is "pyupgrade --py37-plus --keep-runtime-typing --keep-percent-format &lt;files...&gt;"
pyupgrade will change assert_ to assertTrue. That was reverted since assertTrue does not
exists in sqlalchemy fixtures

Change-Id: Ie1ed2675c7b11d893d78e028aad0d1576baebb55
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
command run is "pyupgrade --py37-plus --keep-runtime-typing --keep-percent-format &lt;files...&gt;"
pyupgrade will change assert_ to assertTrue. That was reverted since assertTrue does not
exists in sqlalchemy fixtures

Change-Id: Ie1ed2675c7b11d893d78e028aad0d1576baebb55
</pre>
</div>
</content>
</entry>
<entry>
<title>reorganize Mapped[] super outside of MapperProperty</title>
<updated>2022-10-06T00:35:57+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2022-09-29T16:56:23+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=566cccc8645be99a23811c39d43481d7248628b0'/>
<id>566cccc8645be99a23811c39d43481d7248628b0</id>
<content type='text'>
We made all the MapperProperty classes a subclass
of Mapped[] to allow declarative mappings to name
Mapped[] on the left side.  this was cheating a bit because
MapperProperty is not actually a descriptor, and the mapping
process replaces the object with InstrumentedAttribute at
mapping time, which is the actual Mapped[] descriptor.

But now in I6929f3da6e441cad92285e7309030a9bac4e429d we
are considering making the "cheating" a little more extensive
by putting DynamicMapped / WriteOnlyMapped in Relationship's
hierarchy, which need a flat out "type: ignore" to work.

Instead of pushing more cheats into the core classes, move
out the "Declarative"-facing versions of these classes to be
typing only: Relationship, Composite, Synonym, and MappedSQLExpression
added for ColumnProperty.  Keep the internals expressed on the
old names, RelationshipProperty, CompositeProperty, SynonymProperty,
ColumnProprerty, which will remain "pure" with fully correct typing.
then have the typing only endpoints be where the "cheating"
and "type: ignores" have to happen, so that these are more or less
slightly better forms of "Any".

Change-Id: Ied7cc11196c9204da6851f49593d1b1fd2ef8ad8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We made all the MapperProperty classes a subclass
of Mapped[] to allow declarative mappings to name
Mapped[] on the left side.  this was cheating a bit because
MapperProperty is not actually a descriptor, and the mapping
process replaces the object with InstrumentedAttribute at
mapping time, which is the actual Mapped[] descriptor.

But now in I6929f3da6e441cad92285e7309030a9bac4e429d we
are considering making the "cheating" a little more extensive
by putting DynamicMapped / WriteOnlyMapped in Relationship's
hierarchy, which need a flat out "type: ignore" to work.

Instead of pushing more cheats into the core classes, move
out the "Declarative"-facing versions of these classes to be
typing only: Relationship, Composite, Synonym, and MappedSQLExpression
added for ColumnProperty.  Keep the internals expressed on the
old names, RelationshipProperty, CompositeProperty, SynonymProperty,
ColumnProprerty, which will remain "pure" with fully correct typing.
then have the typing only endpoints be where the "cheating"
and "type: ignores" have to happen, so that these are more or less
slightly better forms of "Any".

Change-Id: Ied7cc11196c9204da6851f49593d1b1fd2ef8ad8
</pre>
</div>
</content>
</entry>
<entry>
<title>Update to flake8 5.</title>
<updated>2022-07-31T09:56:07+00:00</updated>
<author>
<name>Federico Caselli</name>
<email>cfederico87@gmail.com</email>
</author>
<published>2022-07-31T09:56:07+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=f8c4dba4e9f130c18ce00597c036bc26ae7abf90'/>
<id>f8c4dba4e9f130c18ce00597c036bc26ae7abf90</id>
<content type='text'>
Change-Id: I5a241a70efba68bcea9819ddce6aebc25703e68d
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I5a241a70efba68bcea9819ddce6aebc25703e68d
</pre>
</div>
</content>
</entry>
<entry>
<title>Support lambda expression in mypy plugin</title>
<updated>2022-07-02T10:33:58+00:00</updated>
<author>
<name>Cyril Chapellier</name>
<email>tchapi@users.noreply.github.com</email>
</author>
<published>2022-06-30T12:59:38+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=ccfec76b829e7eccd9e08d7f757da3590497f197'/>
<id>ccfec76b829e7eccd9e08d7f757da3590497f197</id>
<content type='text'>
Avoid `error: INTERNAL ERROR` when the default is a lambda

Fixes: #8196
Change-Id: I7346c693519b024c56156db6f4ffc9a45bb748d3
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Avoid `error: INTERNAL ERROR` when the default is a lambda

Fixes: #8196
Change-Id: I7346c693519b024c56156db6f4ffc9a45bb748d3
</pre>
</div>
</content>
</entry>
<entry>
<title>inline mypy config; files ignoring type errors for the moment</title>
<updated>2022-04-28T19:02:50+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2022-04-27T19:43:02+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=f2bd4f513628bb2a7a8e8b36383e3a4324eac803'/>
<id>f2bd4f513628bb2a7a8e8b36383e3a4324eac803</id>
<content type='text'>
to simplify pyproject.toml change the remaining files
that aren't going to be typed on this first pass
(unless of course someone wants to type some of these)
to include # mypy: ignore-errors.   for the moment, only a handful
of ORM modules are to have more type checking implemented.

It's important that ignore-errors is used and
not "# type: ignore", as in the latter case, mypy doesn't even
read the existing types in the file, which makes it impossible to
type any files that refer to those modules at all.

to simplify ongoing typing work use inline mypy config
for remaining files that are "done" for now, indicating the
level of type checking they currently have.

Change-Id: I98669c1a305c2f0adba85d10b5425541f3fe9533
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
to simplify pyproject.toml change the remaining files
that aren't going to be typed on this first pass
(unless of course someone wants to type some of these)
to include # mypy: ignore-errors.   for the moment, only a handful
of ORM modules are to have more type checking implemented.

It's important that ignore-errors is used and
not "# type: ignore", as in the latter case, mypy doesn't even
read the existing types in the file, which makes it impossible to
type any files that refer to those modules at all.

to simplify ongoing typing work use inline mypy config
for remaining files that are "done" for now, indicating the
level of type checking they currently have.

Change-Id: I98669c1a305c2f0adba85d10b5425541f3fe9533
</pre>
</div>
</content>
</entry>
<entry>
<title>pep484 - SQL internals</title>
<updated>2022-03-24T20:57:30+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2022-03-20T20:39:36+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=6f02d5edd88fe2475629438b0730181a2b00c5fe'/>
<id>6f02d5edd88fe2475629438b0730181a2b00c5fe</id>
<content type='text'>
non-strict checking for mostly internal or semi-internal
code

Change-Id: Ib91b47f1a8ccc15e666b94bad1ce78c4ab15b0ec
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
non-strict checking for mostly internal or semi-internal
code

Change-Id: Ib91b47f1a8ccc15e666b94bad1ce78c4ab15b0ec
</pre>
</div>
</content>
</entry>
<entry>
<title>pep-484 for pool</title>
<updated>2022-02-17T19:45:04+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2022-02-16T04:43:51+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=5157e0aa542f390242dd7a6d27a6ce1663230e46'/>
<id>5157e0aa542f390242dd7a6d27a6ce1663230e46</id>
<content type='text'>
also extends into some areas of utils, events and others
as needed.

Formalizes a public hierarchy for pool API,
with ManagesConnection -&gt; PoolProxiedConnection /
ConnectionPoolEntry for connectionfairy / connectionrecord,
which are now what's exposed in the event API and other
APIs.  all public API docs moved to the new objects.

Corrects the mypy plugin's check for sqlalchemy-stubs
not being insatlled, which has to be imported using the
dash in the name to be effective.

Change-Id: I16c2cb43b2e840d28e70a015f370a768e70f3581
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
also extends into some areas of utils, events and others
as needed.

Formalizes a public hierarchy for pool API,
with ManagesConnection -&gt; PoolProxiedConnection /
ConnectionPoolEntry for connectionfairy / connectionrecord,
which are now what's exposed in the event API and other
APIs.  all public API docs moved to the new objects.

Corrects the mypy plugin's check for sqlalchemy-stubs
not being insatlled, which has to be imported using the
dash in the name to be effective.

Change-Id: I16c2cb43b2e840d28e70a015f370a768e70f3581
</pre>
</div>
</content>
</entry>
</feed>
