]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/log
thirdparty/sqlalchemy/sqlalchemy.git
9 months agoupdate for mypy 1.14
Mike Bayer [Fri, 20 Dec 2024 23:02:37 +0000 (18:02 -0500)] 
update for mypy 1.14

Change-Id: I7315c06314ed25c2c00f56b2883f97f4489e433c
(cherry picked from commit b39afd5008bef95a8c2c30eada1e22ef6a286670)

9 months agofix SQLite on conflict tests
Mike Bayer [Thu, 19 Dec 2024 22:50:21 +0000 (17:50 -0500)] 
fix SQLite on conflict tests

in I4d66ec1473321616a1707da324a7dfe7a61ec94e we added new tests
in the sqlite suite but we forgot to extend from fixtures.TestBase,
so these tests did not get run at all.  repair tests

Change-Id: Iaec17a754e0ab1d4b43f063706b512ed335a7465
(cherry picked from commit 6a87d619d9dfe82a8135f0ab3268bf526ac42383)

9 months agotyping fix: allow stmt.excluded for set_
Mike Bayer [Wed, 18 Dec 2024 22:19:56 +0000 (17:19 -0500)] 
typing fix: allow stmt.excluded for set_

Change-Id: I6f0af23fba8f5868282505438e6ca0a5af7e1bbe
(cherry picked from commit 5c79e5ce2dd9db491e9177e7f5af0a83058ebe06)

9 months agoharden typing / coercion for on conflict/on duplicate key
Mike Bayer [Wed, 18 Dec 2024 16:24:58 +0000 (11:24 -0500)] 
harden typing / coercion for on conflict/on duplicate key

in 2.1 we want these structures to be cacheable, so start
by cleaning up types and adding coercions to enforce those types.
these will be more locked down in 2.1 as we will need to move
bound parameter coercion outside of compilation, but here
do some small starts and introduce in 2.0.

in one interest of cachability, a "literal_binds" that found
its way into SQLite's compiler is replaced with "literal_execute",
the difference being that the latter is cacheable.   This literal
is apparently necessary to suit SQLite's query planner for
the "index criteria" portion of the on conflict clause that otherwise
can't work with a real bound parameter.

Change-Id: I4d66ec1473321616a1707da324a7dfe7a61ec94e
(cherry picked from commit 219bcb3a77edd72ef8fc36c8ded921d6fb9a34a5)

9 months agoAdd missing `SmallInteger` column spec for `asyncpg`
FeeeeK [Sat, 14 Dec 2024 08:03:24 +0000 (03:03 -0500)] 
Add missing `SmallInteger` column spec for `asyncpg`

Adds missing column spec for `SmallInteger` in `asyncpg` driver

Fixes: #12170
Closes: #12171
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/12171
Pull-request-sha: 82886d8521cb4e78822d685a864a9af438f6ea6b

Change-Id: I2cb15f066de756d4e3f21bcac6af2cf03bd25a1c
(cherry picked from commit c5abd84a2c3c7a1f4e733dbee387aae939464f3e)

9 months agoMerge "SQLite strict tables" into rel_2_0
Michael Bayer [Mon, 16 Dec 2024 18:25:21 +0000 (18:25 +0000)] 
Merge "SQLite strict tables" into rel_2_0

9 months agoharden HSTORE registration
Mike Bayer [Mon, 16 Dec 2024 15:58:01 +0000 (10:58 -0500)] 
harden HSTORE registration

* use the driver_connection when we register on the connection
* assert targets passed to register_hstore assert as boolean true;
  psycopg docs say "if None, register globally" but looking in the
  source it's actually registering globally if any false-evaluating
  object is passed.

Change-Id: Ie1fd7c96714b7fe76ef964501691fa48352be259
(cherry picked from commit 29569ccfde7247a7e0ed2afe43db53494da62fb2)

9 months agoadd delete limit to mysql; ensure int for update/delete limits
Pablo Nicolas Estevez [Mon, 9 Dec 2024 19:44:44 +0000 (14:44 -0500)] 
add delete limit to mysql; ensure int for update/delete limits

Added support for the ``LIMIT`` clause with ``DELETE`` for the MySQL and
MariaDB dialects, to complement the already present option for
``UPDATE``. The :meth:`.delete.with_dialect_options` method of the
`:func:`.delete` construct accepts parameters for ``mysql_limit`` and
``mariadb_limit``, allowing users to specify a limit on the number of rows
deleted. Pull request courtesy of Pablo Nicolás Estevez.

Added logic to ensure that the ``mysql_limit`` and ``mariadb_limit``
parameters of :meth:`.update.with_dialect_options` and
:meth:`.delete.with_dialect_options` when compiled to string will only
compile if the parameter is passed as an integer; a ``ValueError`` is
raised otherwise.

corrected mysql documentation for update/delete options which
must be specified using the ``with_dialect_options()`` method.

Fixes: #11764
Closes: #12146
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/12146
Pull-request-sha: e34708374c67e016cda88919109fec5e6462eced

Change-Id: I8681ddabaa192b672c7a9b9981c4fe9e4bdc8d03
(cherry picked from commit 134ad3bbdc4bcbee13acc043be0a98cc314fcaec)

9 months agochore: update black
Federico Caselli [Thu, 12 Dec 2024 22:15:17 +0000 (23:15 +0100)] 
chore: update black

surprisingly no change was done to the code

Change-Id: I50af32fc2a172fa4aee52939fcec53d5b142ceed
(cherry picked from commit f1335227c0f5da63f9a4f9179bdb8ef6916bc758)

9 months agoAdded sqlalchemy-hsqldb to list of external dialects (#12175)
Jason Pebble [Thu, 12 Dec 2024 21:14:59 +0000 (21:14 +0000)] 
Added sqlalchemy-hsqldb to list of external dialects (#12175)

(cherry picked from commit 4ed7095154d3b457ef39208c716326dbc007906b)

9 months agoBump pypa/cibuildwheel from 2.21.3 to 2.22.0 (#12129)
dependabot[bot] [Thu, 12 Dec 2024 21:14:35 +0000 (22:14 +0100)] 
Bump pypa/cibuildwheel from 2.21.3 to 2.22.0 (#12129)

Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 2.21.3 to 2.22.0.
- [Release notes](https://github.com/pypa/cibuildwheel/releases)
- [Changelog](https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md)
- [Commits](https://github.com/pypa/cibuildwheel/compare/v2.21.3...v2.22.0)

---
updated-dependencies:
- dependency-name: pypa/cibuildwheel
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
(cherry picked from commit aaff39eede26fde1e297035021fb596cc6fa8df9)

9 months agoSQLite strict tables
Guilherme Martins Crocetti [Thu, 12 Dec 2024 20:11:27 +0000 (15:11 -0500)] 
SQLite strict tables

Added SQLite table option to enable ``STRICT`` tables.

Fixes #7398
Closes: #12124
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/12124
Pull-request-sha: e77273d0ba5c09d120c2582e94b96b781ebecb90

Change-Id: I0ffe9f6fc2c27627f53a1bc1808077e74617658a
(cherry picked from commit 5b0eeaca61972cc75b7d50b11fbc582753518e61)

9 months agomodernize PG domain reflection test and skip for pg17.2
Mike Bayer [Thu, 12 Dec 2024 15:57:46 +0000 (10:57 -0500)] 
modernize PG domain reflection test and skip for pg17.2

Fixes: #12174
Change-Id: If4b1c29d7ee62b2858f1ef9d75fe1c4c41217706
(cherry picked from commit 42fe1109c62008f2cd509ef402152704efb9ddb1)

9 months agofix test due to merge of 11370 with 5252
Mike Bayer [Wed, 11 Dec 2024 20:54:23 +0000 (15:54 -0500)] 
fix test due to merge of 11370 with 5252

Numeric and Float are split out in main so a type cant be both
at the same time.   Also there's no reason to do isinstance(Float)
and isintance(Numeric) even if they are in the same hierarchy.

Change-Id: I2263aaac264673a830b63689d39b6433b32c1d23
(cherry picked from commit b49fcb67afb302d2309efea71cde2a6584c1373c)

9 months agodont match partial types in type_annotation_map
Frazer McLean [Thu, 3 Oct 2024 22:21:12 +0000 (18:21 -0400)] 
dont match partial types in type_annotation_map

Fixed issue regarding ``Union`` types that would be present in the
:paramref:`_orm.registry.type_annotation_map` of a :class:`_orm.registry`
or declarative base class, where a ``Mapped[]`` element that included one
of the subtypes present in that ``Union`` would be matched to that entry,
potentially ignoring other entries that matched exactly.   The correct
behavior now takes place such that an entry should only match in
``type_annotation_map`` exactly, as a ``Union`` type is a self-contained
type. For example, an attribute with ``Mapped[float]`` would previously
match to a ``type_annotation_map`` entry ``Union[float, Decimal]``; this
will no longer match and will now only match to an entry that states
``float``. Pull request courtesy Frazer McLean.

Fixes #11370
Closes: #11942
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/11942
Pull-request-sha: 21a3d1971a04e117a557f6e6bac77bce9f6bb0a9

Change-Id: I3467be00f8fa8bd011dd4805a77a3b80ff74a215
(cherry picked from commit 40c30ec44616223216737327f97bac66a13eedee)

9 months agoMerge "Fixes: #11724 - PGDialect `get_multi_indexes` PGVecto.rs Bug" into rel_2_0
Federico Caselli [Mon, 9 Dec 2024 20:00:29 +0000 (20:00 +0000)] 
Merge "Fixes: #11724 - PGDialect `get_multi_indexes` PGVecto.rs Bug" into rel_2_0

9 months agoensure db_opts are honored
Mike Bayer [Mon, 9 Dec 2024 17:36:56 +0000 (12:36 -0500)] 
ensure db_opts are honored

for provision.py that adds db_opts these need to be used in all cases
for testing_engine() that is using that same database driver

References: #12159
Change-Id: I15c46a375ab05ef94c9a7d19000a3d8641de43bf
(cherry picked from commit 3226f99dce77bb75698a7c9366f6fd07ab4d29ee)

9 months agoFixes: #11724 - PGDialect `get_multi_indexes` PGVecto.rs Bug
Nick Wilkinson [Fri, 6 Dec 2024 06:59:22 +0000 (01:59 -0500)] 
Fixes: #11724 - PGDialect `get_multi_indexes` PGVecto.rs Bug
When attempting to generate an auto-revision using Alembic, the `get_multi_indexes` method fails with the error:
```python
    dialect_options["postgresql_with"] = dict(
ValueError: dictionary update sequence element #0 has length 4; 2 is required
```

### Description

The cause of this error is that when creating a vector index in PGVecto.rs, the index is:
```sql
CREATE INDEX vector_embedding_idx ON public.vector_embeddings USING vectors (embedding vector_cos_ops) WITH (options='
                    [indexing.hnsw]
                    m = 16
                    ef_construction = 64
                ')
```

However, in PostgreSQL the index seems to be generated as:
```sql
CREATE INDEX vector_embedding_idx ON public.vector_embeddings USING hnsw (embedding vector_cos_ops) WITH (m='16', ef_construction='64');
```

To fix this, we need to modify:
```diff
if row["reloptions"]:
-    dialect_options["postgresql_with"] = dict([option.split("=") for option in row["reloptions"]])
+    dialect_options["postgresql_with"] = dict([option.split("=", 1) for option in row["reloptions"]])
```

For more details on this error and a reproducible example, refer to #11724

### Testing

I couldn't really think of an easy way to add the potential test suggested in the issue thread [here](https://github.com/sqlalchemy/sqlalchemy/issues/11724#issuecomment-2518501318). However, this code is already tested in [`test_get_multi_view_indexes`](https://github.com/sqlalchemy/sqlalchemy/blob/5ded16fae8abfc31d43430cb25757fb434c37ba2/test/dialect/postgresql/test_reflection.py#L378), so assuming that test still passes and nothing breaks I believe we should be fine.

### Checklist
<!-- go over following points. check them with an `x` if they do apply, (they turn into clickable checkboxes once the PR is submitted, so no need to do everything at once)

-->

This pull request is:

- [ ] A documentation / typographical / small typing error fix
- Good to go, no issue or tests are needed
- [x] A short code fix
- please include the issue number, and create an issue if none exists, which
  must include a complete example of the issue.  one line code fixes without an
  issue and demonstration will not be accepted.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.   one line code fixes without tests will not be accepted.
- [ ] A new feature implementation
- please include the issue number, and create an issue if none exists, which must
  include a complete example of how the feature would look.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.

Closes: #12162
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/12162
Pull-request-sha: 7d996fd92dd24a7d79bccab090d22bd76564dc76

Change-Id: Id6ad86133f3221eefcf0aa799c7f79a754e9c1bf
(cherry picked from commit 9eacf3408d1deeb42fc1ecc6002437b898ecc397)

10 months agouse VARCHAR for CLOB outputtypehandler
Mike Bayer [Mon, 2 Dec 2024 23:59:19 +0000 (18:59 -0500)] 
use VARCHAR for CLOB outputtypehandler

Fixed issue in oracledb / cx_oracle dialects where output type handlers for
``CLOB`` were being routed to ``NVARCHAR`` rather than ``VARCHAR``, causing
a double conversion to take place.

Fixes: #12150
Change-Id: I9f55e9bc595997b873c831b0422f5af10dcc15ef
(cherry picked from commit 5ded16fae8abfc31d43430cb25757fb434c37ba2)

10 months agoMerge "enable py3.13 for greenlet" into rel_2_0
Michael Bayer [Sun, 1 Dec 2024 19:30:10 +0000 (19:30 +0000)] 
Merge "enable py3.13 for greenlet" into rel_2_0

10 months agoenable py3.13 for greenlet
Mike Bayer [Sun, 1 Dec 2024 18:35:36 +0000 (13:35 -0500)] 
enable py3.13 for greenlet

keep py3.14 disabled

Fixes: #12145
Change-Id: I16c9bdda082fb2749085897faf3f8bc3140576c3

10 months agoupdate the format_docs_code to also work on python files
Federico Caselli [Sat, 30 Nov 2024 18:50:38 +0000 (19:50 +0100)] 
update the format_docs_code to also work on python files

Change-Id: I0a6c9610b3fd85365ed4c2c199e3cad87ee64022
(cherry picked from commit d539bc3a0fecdc2deb5b952e410fbd4f382a1ff4)

10 months agoAdded INET4 and INET6 types for MariaDB
Adam Žurek [Fri, 15 Nov 2024 18:12:54 +0000 (13:12 -0500)] 
Added INET4 and INET6 types for MariaDB

Added sql types ``INET4`` and ``INET6`` in the MariaDB dialect.

Fixes: #10720
Closes: #12028
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/12028
Pull-request-sha: 25f939076eda0a763bc33fb0455d45ef00002110

Change-Id: I2efa53420aa5566f61a19f228cb421116b2e2720
(cherry picked from commit 0f81c14b7cd9ac821205d6c48cf2393447058394)

10 months agoMerge "Mention no_autoflush in warning" into rel_2_0
Michael Bayer [Tue, 19 Nov 2024 13:40:31 +0000 (13:40 +0000)] 
Merge "Mention no_autoflush in warning" into rel_2_0

10 months agoMerge "Update Oracle dialect doc, mostly to prefer python-oracledb" into rel_2_0
Federico Caselli [Mon, 18 Nov 2024 20:09:41 +0000 (20:09 +0000)] 
Merge "Update Oracle dialect doc, mostly to prefer python-oracledb" into rel_2_0

10 months agoMerge "Support table function in oracle" into rel_2_0
Michael Bayer [Mon, 18 Nov 2024 17:53:23 +0000 (17:53 +0000)] 
Merge "Support table function in oracle" into rel_2_0

10 months agoMerge "Add Range.__contains__" into rel_2_0
Michael Bayer [Mon, 18 Nov 2024 17:49:00 +0000 (17:49 +0000)] 
Merge "Add Range.__contains__" into rel_2_0

10 months agocorrect pep-593/pep-681 doc section
Mike Bayer [Sun, 17 Nov 2024 00:15:10 +0000 (19:15 -0500)] 
correct pep-593/pep-681 doc section

as of 73a273c90cda2369ec071435edd9c6dc5c1d31c4 and later
4c6429d068 we have decided that Annotated should not allow dataclass
arguments in mapped_column(), which emits a depreaction warning.

the docs in this section were never updated

Fixes: #12108
Change-Id: I6f301c4bac621d5ca1afb1b1dadf754ec929d179
(cherry picked from commit bc4174a15572f134bbdc5fc154078bd992573f10)

10 months agoAdd Range.__contains__
Frazer McLean [Fri, 15 Nov 2024 18:07:00 +0000 (13:07 -0500)] 
Add Range.__contains__

<!-- Provide a general summary of your proposed changes in the Title field above -->

### Description
Fixes #12093

### Checklist
<!-- go over following points. check them with an `x` if they do apply, (they turn into clickable checkboxes once the PR is submitted, so no need to do everything at once)

-->

This pull request is:

- [ ] A documentation / typographical / small typing error fix
- Good to go, no issue or tests are needed
- [x] A short code fix
- please include the issue number, and create an issue if none exists, which
  must include a complete example of the issue.  one line code fixes without an
  issue and demonstration will not be accepted.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.   one line code fixes without tests will not be accepted.
- [ ] A new feature implementation
- please include the issue number, and create an issue if none exists, which must
  include a complete example of how the feature would look.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.

**Have a nice day!**

Closes: #12094
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/12094
Pull-request-sha: 3f900e96b95c6dbd20ee6f5aa3f49dd6124ffba9

Change-Id: I4c3945eec6a931acd0a8c1682988c5f26e96a499
(cherry picked from commit 31975cfa38689dc0a45fe26d0563eb7b5b3bda6c)

10 months agoUpdate Oracle dialect doc, mostly to prefer python-oracledb
Christopher Jones [Tue, 12 Nov 2024 22:28:38 +0000 (17:28 -0500)] 
Update Oracle dialect doc, mostly to prefer python-oracledb

### Description

Small updates for Oracle Database dialect documentation.

- prefer python-oracledb over cx_Oracle
- Prefer the product name 'Oracle Database' over the company name 'Oracle'
- update links
- modernize

This is a refresh of existing content.

I decided the apparently now duplicated sections between cx_Oracle and python-oracledb were justified for clarity due to the inevitable differences.

This pull request is:

- [x] A documentation / typographical / small typing error fix
- Good to go, no issue or tests are needed

**Have a nice day!**

Closes: #12078
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/12078
Pull-request-sha: 7c4dcf94032af295a6836e9412a4367b716f2de5

Change-Id: I3678976f5524ee164dc31b3122b224ae37060b71
(cherry picked from commit 855d03cc15ac30d458d8d2e501df5f324238f43e)

10 months agoSupport table function in oracle
Federico Caselli [Thu, 14 Nov 2024 19:27:35 +0000 (20:27 +0100)] 
Support table function in oracle

Fixed compilation of ``TABLE`` function when used in a from clause
in Oracle Database dialect.

Fixes: #12100
Change-Id: I862e5be9685611dc74338c37b7537505fc2194e5
(cherry picked from commit 564de4661fce3274d71c32676a735a250821fc0f)

10 months agoImprove oracle max id length again
Federico Caselli [Thu, 14 Nov 2024 18:55:32 +0000 (19:55 +0100)] 
Improve oracle max id length again

Adjust 90bf575b81c5396b364908547551b6592a333bf7 to handle the none case
Fix missing return

Fixes: #12032
Change-Id: I166efbde1a0cc88673ad3cdfbda70c737dcafcc8
(cherry picked from commit 1a7c5772623546f8ba182adef48a8bb20f9c50c6)

10 months agoAdd YDB to external dialect list (#12088)
Oleg Ovcharuk [Thu, 14 Nov 2024 18:49:34 +0000 (21:49 +0300)] 
Add YDB to external dialect list (#12088)

(cherry picked from commit 2f559b2d5290827a75c59dc59bc3cdafaaa5ea23)

10 months agodont leak mutating bindparams list into AnalyzedFunction
Mike Bayer [Tue, 12 Nov 2024 19:50:50 +0000 (14:50 -0500)] 
dont leak mutating bindparams list into AnalyzedFunction

Fixed issue in "lambda SQL" feature where the tracking of bound parameters
could be corrupted if the same lambda were evaluated across multiple
compile phases, including when using the same lambda across multiple engine
instances or with statement caching disabled.

Fixes: #12084
Change-Id: I327aa93ce7feb2326a22113164bd834b96b6b889
(cherry picked from commit 5bbefc41b7b2695c95c9c93bcaabd8c4731e348e)

10 months agoMerge "Improve Oracle identifier length detection" into rel_2_0
Michael Bayer [Mon, 11 Nov 2024 13:57:43 +0000 (13:57 +0000)] 
Merge "Improve Oracle identifier length detection" into rel_2_0

10 months agoFix source comment/doc typos (#12072)
Yeongbae Jeon [Sat, 9 Nov 2024 16:49:20 +0000 (01:49 +0900)] 
Fix source comment/doc typos (#12072)

minor spelling corrections in comments and doc

(cherry picked from commit ef23611a6bf8358dd05e0fc13384f1eb1925e1ff)

10 months agoImprove Oracle identifier length detection
Federico Caselli [Sat, 26 Oct 2024 19:50:36 +0000 (21:50 +0200)] 
Improve Oracle identifier length detection

Use the connection attribute ``max_identifier_length`` available
in oracledb since version 2.5 when determining the identifier length
in the Oracle dialect.

Fixes: #12032
Change-Id: If16db93e0df25776295bc521706dbad1cc541f4a
(cherry picked from commit 90bf575b81c5396b364908547551b6592a333bf7)

11 months agoFixed: 12012: Add Support for `TABLESPACE` Specification in Table Definitions for...
Miguel Grillo [Thu, 24 Oct 2024 18:32:33 +0000 (14:32 -0400)] 
Fixed: 12012: Add Support for `TABLESPACE` Specification in Table Definitions for Oracle

Fixes: #12016
**Description**

This PR adds support for specifying the `TABLESPACE` in table definitions in SQLAlchemy, specifically for Oracle. This feature is particularly useful for Oracle users who need to specify the tablespace where the table data will be stored.

**Changes Made**
1. Updated `construct_arguments` in `OracleDialect`:
    - The `construct_arguments` list in the `OracleDialect` class has been updated to include the `tablespace` argument for the `Table` class.

```Python
construct_arguments = [
    (
        sa_schema.Table,
        # old
        {"resolve_synonyms": False, "on_commit": None, "compress": False},
        # new
        {"resolve_synonyms": False, "on_commit": None, "compress": False, "tablespace": None},
    ),
    (sa_schema.Index, {"bitmap": False, "compress": False}),
]
```
**Path**: `lib/sqlalchemy/dialects/oracle/base.py`

2. Modified OracleDDLCompiler to Include TABLESPACE in post_create_table:
    - The OracleDDLCompiler class has been modified to include the TABLESPACE clause at the end of the CREATE TABLE statement if the tablespace option is provided.

```Python
if opts["tablespace"]:
    tablespace_name = opts["tablespace"]
    table_opts.append(
        "\n TABLESPACE %s" % self.preparer.quote(tablespace_name)
    )
```
**Path**: `lib/sqlalchemy/dialects/oracle/base.py`

3. Added tablespace Argument to the Table Class:
    - A new tablespace argument has been added to the Table class to allow specifying the tablespace in the table definition.

4. Documentation Update:
    - The documentation has been updated to reflect the new feature and provide usage examples.

**Usage Example**

```Python
from sqlalchemy import create_engine, Table, Column, Integer, String, MetaData

engine = create_engine('oracle+cx_oracle://user:password@dsn')

metadata = MetaData()

users = Table('users', metadata,
    Column('id', Integer, primary_key=True),
    Column('name', String),
    Column('email', String, unique=True),
    oracle_tablespace='my_tablespace'  # New tablespace argument optional
)

metadata.create_all(engine)
```

<!-- Provide a general summary of your proposed changes in the Title field above -->

### Description
<!-- Describe your changes in detail -->

### Checklist
<!-- go over following points. check them with an `x` if they do apply, (they turn into clickable checkboxes once the PR is submitted, so no need to do everything at once)

-->

This pull request is:

- [ ] A documentation / typographical / small typing error fix
- Good to go, no issue or tests are needed
- [ ] A short code fix
- please include the issue number, and create an issue if none exists, which
  must include a complete example of the issue.  one line code fixes without an
  issue and demonstration will not be accepted.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.   one line code fixes without tests will not be accepted.
- [x] A new feature implementation
- please include the issue number, and create an issue if none exists, which must
  include a complete example of how the feature would look.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.

**Have a nice day!**

Closes: #12013
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/12013
Pull-request-sha: e542dea6ced269cb188b06cbd04cecf1c400e29a

Change-Id: I4733b466f9486289e13dd7503d18b3b5c866e836
(cherry picked from commit 44fa4a55bad2bc1bd20047275c366385ba3d4b1f)

11 months agoMention no_autoflush in warning
Federico Caselli [Thu, 31 Oct 2024 21:14:57 +0000 (22:14 +0100)] 
Mention no_autoflush in warning

References: #12049
Change-Id: I057140b2fe2f5fc60d5d27a79ddf19a6196fff7b
(cherry picked from commit b4fdfd489755848f4945c31f0686ad9eaf128b08)

11 months agoImprove mutable typing.
Federico Caselli [Wed, 30 Oct 2024 20:17:45 +0000 (21:17 +0100)] 
Improve mutable typing.

References: #12046
Change-Id: If950f7e2090a0f637c2c28cf21a40dc345acc89a
(cherry picked from commit 732698427e822b6ba81f1214864685903cdc13a4)

11 months agoUpdate declarative_styles.rst: add missing import from typing in the example (#12034)
Dennis Magnusson [Wed, 30 Oct 2024 17:33:40 +0000 (19:33 +0200)] 
Update declarative_styles.rst: add missing import from typing in the example (#12034)

* Update declarative_styles.rst: add missing import

* Update declarative_styles.rst: make import statement style consistent

(cherry picked from commit f418ac8d38a26936aa9a8ed9befe210c88b97f33)

11 months agoUpdate bigquery dialect link (#12048)
Gord Thompson [Wed, 30 Oct 2024 17:30:40 +0000 (11:30 -0600)] 
Update bigquery dialect link (#12048)

(cherry picked from commit 58822b9e2412dfefdced95164943fdb515e2f52c)

11 months agoAdd TiDB dialect (#12025)
JaySon [Wed, 23 Oct 2024 16:48:59 +0000 (00:48 +0800)] 
Add TiDB dialect (#12025)

* Add sqlalchemy-tidb to index.rst

* Update index.rst

(cherry picked from commit a9a85f8b2167d7a4313ea49b76e1b2a01a346d7f)

11 months agorefine in_() check to use proper duck-typing for __clause_element__
Mike Bayer [Mon, 21 Oct 2024 14:03:01 +0000 (10:03 -0400)] 
refine in_() check to use proper duck-typing for __clause_element__

Fixed regression caused by an internal code change in response to recent
Mypy releases that caused the very unusual case of a list of ORM-mapped
attribute expressions passed to :meth:`.ColumnOperators.in_` to no longer
be accepted.

in this commit we had to revisit d8dd28c42e where mypy typing
didn't accept ColumnOperartors.   the type here is the _HasClauseElement[_T]
protocol which means we need to use a duck type for a runtime check.

Fixes: #12019
Change-Id: Ib378e9cb8defb49d5ac4d726ec93d6bdc581b6a9
(cherry picked from commit aaddd7c8403e9ca2f77113467b5e2ae279a542c4)

11 months agopin older pip for tox under py37
Mike Bayer [Mon, 21 Oct 2024 17:10:54 +0000 (13:10 -0400)] 
pin older pip for tox under py37

this is suddenly failing due to a non-py37 syntax in
pip/_vendor/typing_extensions.py.  Not clear why the failure has just
started however as there is no new version of pip recently.

Change-Id: I783e2341424a1dad206a7ab668900475fd8d30c5

11 months agoVersion 2.0.37 placeholder
Mike Bayer [Tue, 15 Oct 2024 19:42:11 +0000 (15:42 -0400)] 
Version 2.0.37 placeholder

11 months ago- 2.0.36 rel_2_0_36
Mike Bayer [Tue, 15 Oct 2024 19:28:23 +0000 (15:28 -0400)] 
- 2.0.36

11 months agochangelog updates for 2.0.36
Mike Bayer [Tue, 15 Oct 2024 19:19:44 +0000 (15:19 -0400)] 
changelog updates for 2.0.36

Change-Id: Iffaa6c5556d7b41c8a7537333b7ea58d83ce4771
(cherry picked from commit 4ec37835a66192271171fbba3b6b178641902a18)

11 months agoMerge "add tests for pickling types inside an expression, some reduce methods" into...
Michael Bayer [Tue, 15 Oct 2024 19:06:55 +0000 (19:06 +0000)] 
Merge "add tests for pickling types inside an expression, some reduce methods" into rel_2_0

11 months agoMerge "match ORM mapped cols to PK in interpret_returning_rows" into rel_2_0
Michael Bayer [Tue, 15 Oct 2024 17:41:51 +0000 (17:41 +0000)] 
Merge "match ORM mapped cols to PK in interpret_returning_rows" into rel_2_0

11 months agoadd tests for pickling types inside an expression, some reduce methods
Mike Bayer [Tue, 15 Oct 2024 12:20:25 +0000 (08:20 -0400)] 
add tests for pickling types inside an expression, some reduce methods

Fixed regression from 1.4 where some datatypes such as those derived from
:class:`.TypeDecorator` could not be pickled when they were part of a
larger SQL expression composition due to internal supporting structures
themselves not being pickleable.

Fixes: #12002
Change-Id: I016e37b0c62071413f24c9aac35f6ecf475becaa
(cherry picked from commit fa568215788c274eb2d178b6eb180ab1f7955c01)

11 months agoMerge "Add hash to field-like methods" into rel_2_0
Michael Bayer [Tue, 15 Oct 2024 15:45:55 +0000 (15:45 +0000)] 
Merge "Add hash to field-like methods" into rel_2_0

11 months agomatch ORM mapped cols to PK in interpret_returning_rows
Mike Bayer [Mon, 14 Oct 2024 15:15:21 +0000 (11:15 -0400)] 
match ORM mapped cols to PK in interpret_returning_rows

Fixed bug in ORM "update with WHERE clause" feature where an explicit
``.returning()`` would interfere with the "fetch" synchronize strategy due
to an assumption that the ORM mapped class featured the primary key columns
in a specific position within the RETURNING.  This has been fixed to use
appropriate ORM column targeting.

the _interpret_returning_rows method looked to be mostly not used as far
as its joined inheritance features, which appear to have never been
used as joined inheritance mappers are skipped.

Fixes: #11997
Change-Id: I38fe3a84cdeb2eef38fe00d8b9a6a2b56f434bc6
(cherry picked from commit 553d02b30eba13f3db4595d7a15e51222f864e13)

11 months agoMerge "Render bind cast in json and jsonb in PG" into rel_2_0
Michael Bayer [Tue, 15 Oct 2024 13:36:20 +0000 (13:36 +0000)] 
Merge "Render bind cast in json and jsonb in PG" into rel_2_0

11 months agoMerge "update for mypy 1.12.0" into rel_2_0
Michael Bayer [Tue, 15 Oct 2024 13:34:17 +0000 (13:34 +0000)] 
Merge "update for mypy 1.12.0" into rel_2_0

11 months agoupdate for mypy 1.12.0
Mike Bayer [Tue, 15 Oct 2024 00:21:40 +0000 (20:21 -0400)] 
update for mypy 1.12.0

Change-Id: I8ab16e439a27b3072402beb2c09f715047362c94
(cherry picked from commit d8dd28c42eaffca1cd964a4ab8378c592332e41e)

11 months agoRender bind cast in json and jsonb in PG
Federico Caselli [Sun, 13 Oct 2024 16:32:46 +0000 (18:32 +0200)] 
Render bind cast in json and jsonb in PG

Render bind cast for ``JSON`` and ``JSONB`` datatype on every dialect.
Previously this was only enabled in a subset of dialects.
Fixes: #11994
Change-Id: Ib085deb3e84034dac9e4f4057d32f055d5533e52
(cherry picked from commit b2648e69f2375f7257cbe04b16f663d97795db19)

11 months agoconsult allow_partial_pks for NULL check in lazyload
Mike Bayer [Sun, 13 Oct 2024 14:04:23 +0000 (10:04 -0400)] 
consult allow_partial_pks for NULL check in lazyload

Refined the check which the ORM lazy loader uses to detect "this would be
loading by primary key and the primary key is NULL, skip loading" to take
into account the current setting for the
:paramref:`.orm.Mapper.allow_partial_pks` parameter. If this parameter is
False, then a composite PK value that has partial NULL elements should also
be skipped.   This can apply to some composite overlapping foreign key
configurations.

Fixes: #11995
Change-Id: Icf9a52b7405d7400d46bfa944edcbff1a89225a3
(cherry picked from commit 830debc30896203bfd21fea18d323c5d849068d1)

11 months agoOptimize MySQL foreign key reflection
Federico Caselli [Sat, 12 Oct 2024 12:58:26 +0000 (14:58 +0200)] 
Optimize MySQL foreign key reflection

Improved foreign keys reflection logic in MySQL 8+ to use a better
optimized query. The previous query could be quite slow in databases
with a large number of columns.

Fixes: #11975
Change-Id: Ie8bcd810d4b37abf7fd5e497596e0ade52c3f82e
(cherry picked from commit a98d31621d58d45e2a4d74351282cedddcfe85fa)

11 months agoAdd hash to field-like methods
Federico Caselli [Fri, 11 Oct 2024 19:20:15 +0000 (21:20 +0200)] 
Add hash to field-like methods

Added the dataclass field ``hash`` parameter to the orm field-like methods,
like :meth:`_orn.mapped_column`, :meth:`_orm.relationship`, etc.

Fixes: #11923
Change-Id: I80220f6dcd9c42f465d8a4c4ae2e4efa45279ecc
(cherry picked from commit c14111b5bb2c624dd0bcb677fc3c9d811b46a2e7)

11 months agoMerge "Improve error in dataclasses with table" into rel_2_0
Federico Caselli [Thu, 10 Oct 2024 21:55:38 +0000 (21:55 +0000)] 
Merge "Improve error in dataclasses with table" into rel_2_0

11 months agoremove fully tested in ci reference since it's confusing
Federico Caselli [Thu, 10 Oct 2024 20:25:39 +0000 (22:25 +0200)] 
remove fully tested in ci reference since it's confusing

Change-Id: I5d1c14b2c2b3bcbb55861e1c4a90ffafe8ee00fa
(cherry picked from commit 8684c8dda6cde2f470ad16827b09eb6d4bb1c6d8)

11 months agoMerge "Mention that extract.field is used as sql string" into rel_2_0
Federico Caselli [Thu, 10 Oct 2024 19:59:07 +0000 (19:59 +0000)] 
Merge "Mention that extract.field is used as sql string" into rel_2_0

11 months agoImprove error in dataclasses with table
Federico Caselli [Wed, 9 Oct 2024 18:35:16 +0000 (20:35 +0200)] 
Improve error in dataclasses with table

Added a better error when trying to map as dataclass a class while also
manually providing the ``__table__`` attribute.
This usage is currently not supported.

Fixes: #11973
Change-Id: I54c721b3f7447b2f062fa0cfb53b6a88c381df42
(cherry picked from commit 6ae7f2378971b16f024eb5ab851cc4533bc4e61a)

11 months agoMention that extract.field is used as sql string
Federico Caselli [Tue, 10 Sep 2024 16:42:58 +0000 (18:42 +0200)] 
Mention that extract.field is used as sql string

Change-Id: Ieb32e298e8a1df3a31bf3a6e26b1aca381ef7a4f
(cherry picked from commit e79517d571ab6ab8a2e4e1a9bbd026bbb682df29)

11 months ago_Binary as generic to LargeBinary
Mike Bayer [Thu, 10 Oct 2024 02:05:05 +0000 (22:05 -0400)] 
_Binary as generic to LargeBinary

Datatypes that are binary based such as :class:`.VARBINARY` will resolve to
:class:`.LargeBinary` when the :meth:`.TypeEngine.as_generic()` method is
called.

Fixes: #11978
Change-Id: I2e0586324fb0f1c367da61f0074b35c96fbe2fd0
(cherry picked from commit 858eba6156f210e24d39cc066069a3dac700e33a)

11 months agoMerge "re-apply right memo for nested ORMJoin when splicing" into rel_2_0
Michael Bayer [Thu, 10 Oct 2024 15:12:56 +0000 (15:12 +0000)] 
Merge "re-apply right memo for nested ORMJoin when splicing" into rel_2_0

11 months agoMerge "honor prefetch_cols and postfetch_cols in ORM update w/ WHERE criteria" into...
Michael Bayer [Thu, 10 Oct 2024 15:10:43 +0000 (15:10 +0000)] 
Merge "honor prefetch_cols and postfetch_cols in ORM update w/ WHERE criteria" into rel_2_0

11 months agoBump pypa/cibuildwheel from 2.21.2 to 2.21.3 (#11976)
dependabot[bot] [Wed, 9 Oct 2024 16:42:21 +0000 (18:42 +0200)] 
Bump pypa/cibuildwheel from 2.21.2 to 2.21.3 (#11976)

Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 2.21.2 to 2.21.3.
- [Release notes](https://github.com/pypa/cibuildwheel/releases)
- [Changelog](https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md)
- [Commits](https://github.com/pypa/cibuildwheel/compare/v2.21.2...v2.21.3)

---
updated-dependencies:
- dependency-name: pypa/cibuildwheel
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
(cherry picked from commit 2892aaa108c3fb9d703083579abea938a1ea75a3)

11 months agore-apply right memo for nested ORMJoin when splicing
Mike Bayer [Tue, 8 Oct 2024 14:29:34 +0000 (10:29 -0400)] 
re-apply right memo for nested ORMJoin when splicing

Fixed regression caused by fixes to joined eager loading in
:ticket:`11449`, where a particular joinedload case could not be asserted
correctly.   We now have an example of that case so the assertion has been
repaired to allow for it.

Fixes: #11965
Change-Id: I2e0a594981534f4aaeff361a2f8cf1a0fba8de8f
(cherry picked from commit 43b974a34957f22963e7faf44f0798c8179adcfc)

11 months agoMerge "correct mis-cherry-picked commit for #11449 in 2.0.31" into rel_2_0
Michael Bayer [Wed, 9 Oct 2024 13:15:31 +0000 (13:15 +0000)] 
Merge "correct mis-cherry-picked commit for #11449 in 2.0.31" into rel_2_0

11 months agohonor prefetch_cols and postfetch_cols in ORM update w/ WHERE criteria
Mike Bayer [Wed, 25 Sep 2024 18:19:02 +0000 (14:19 -0400)] 
honor prefetch_cols and postfetch_cols in ORM update w/ WHERE criteria

Continuing from :ticket:`11912`, columns marked with
:paramref:`.mapped_column.onupdate`,
:paramref:`.mapped_column.server_onupdate`, or :class:`.Computed` are now
refreshed in ORM instances when running an ORM enabled UPDATE with WHERE
criteria, even if the statement does not use RETURNING or
populate_existing.

this moves the test we added in #11912 to be in
test_update_delete_where, since this behavior is not related to bulk
statements.    For bulk statements, we're building onto the "many rows
fast" use case and we as yet intentionally don't do any "bookkeeping",
which means none of the expiration or any of that. would need to rethink
"bulk update" a bit to get onupdates to refresh.

Fixes: #11917
Change-Id: I9601be7afed523b356ce47a6daf98cc6584f4ad3
(cherry picked from commit bd1c17f11318d0b581f59c8c6521979246abc9b8)

11 months agofix typo in mapper doc string
Federico Caselli [Tue, 8 Oct 2024 21:22:20 +0000 (23:22 +0200)] 
fix typo in mapper doc string

Change-Id: I10fd7bdb0f0564a5beadfe3fa9fbb7e5ea88362c
(cherry picked from commit 74a8e2ced922183d6ad072eced904cb989113fa2)

11 months agoMerge "Fixed syntax error in mysql function defaults" into rel_2_0
Michael Bayer [Tue, 8 Oct 2024 18:37:43 +0000 (18:37 +0000)] 
Merge "Fixed syntax error in mysql function defaults" into rel_2_0

11 months agocorrect mis-cherry-picked commit for #11449 in 2.0.31
Mike Bayer [Tue, 8 Oct 2024 18:01:40 +0000 (14:01 -0400)] 
correct mis-cherry-picked commit for #11449 in 2.0.31

The main review for #11449 at Ie8f0e8d9bb7958baac33c7c2231e4afae15cf5b1
had three revisions but the cherry pick to 2.0 somehow missed the
second two cherry picks.  it's not clear if this was intentional.
however, as we need to continue on with correcting this behavior
it seems like we really should have the full "main" behavior in
the release.

Fixes: #11449
Change-Id: I1e79c4e0c4843268b2fce7fc2046900bd7b48f00

11 months agoApply fix to reflection of table comments
Gord Thompson [Mon, 7 Oct 2024 12:31:22 +0000 (06:31 -0600)] 
Apply fix to reflection of table comments

Fixes: #11961
Change-Id: Ia3e704973a17cdf5c45bb5b8127435ee562c7d15
(cherry picked from commit 5c48094cbde3cbfaaed0b137ced4887bef14dc29)

11 months agoAdd classifier declaring support for Python 3.13 (#11960)
Hugo van Kemenade [Mon, 7 Oct 2024 16:26:18 +0000 (19:26 +0300)] 
Add classifier declaring support for Python 3.13 (#11960)

(cherry picked from commit afe08a915556f2b1beb5e15aaec770c330ea84a2)

Change-Id: I7c2b6b0ea8a830b63de9dd893bad957fcaf60b17

12 months agoAdd type hints to `sqlalchemy.ext.compiler`
Kevin Kirsche [Wed, 2 Oct 2024 17:06:59 +0000 (13:06 -0400)] 
Add type hints to `sqlalchemy.ext.compiler`

References: #6810
Closes: #11902
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/11902
Pull-request-sha: 3a7719ff96c754af2575c5385c8d4fa4d5492113

Change-Id: I29c92ade40d36d186eb37534dc0318f9b2b25840
(cherry picked from commit 0883ee5bf8779edb2ab0ba78f4668ebeb5164781)

12 months agoBump pypa/cibuildwheel from 2.21.1 to 2.21.2 (#11947)
dependabot[bot] [Sat, 5 Oct 2024 07:43:30 +0000 (09:43 +0200)] 
Bump pypa/cibuildwheel from 2.21.1 to 2.21.2 (#11947)

Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 2.21.1 to 2.21.2.
- [Release notes](https://github.com/pypa/cibuildwheel/releases)
- [Changelog](https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md)
- [Commits](https://github.com/pypa/cibuildwheel/compare/v2.21.1...v2.21.2)

---
updated-dependencies:
- dependency-name: pypa/cibuildwheel
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
(cherry picked from commit a22545381d72bdebcd506476d07c84913ed37f2c)

12 months agoFixed syntax error in mysql function defaults
huuyafwww [Sat, 5 Oct 2024 06:04:13 +0000 (02:04 -0400)] 
Fixed syntax error in mysql function defaults

Fixed a bug that caused a syntax error when a function was specified
to server_default when creating a column in MySQL or MariaDB.

Fixes #11317
Closes: #11953
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/11953
Pull-request-sha: d93ac419a9201134e9c4845dd2e4dc48db4b6f78

Change-Id: I67fc83867df2b7dcf591c8f53b7a97afb90ebba9
(cherry picked from commit 40e990aab3f92051f3c693a81de938ab3b4eb5e4)

12 months agoblock mariadb 1.1.10
Mike Bayer [Tue, 24 Sep 2024 13:35:48 +0000 (09:35 -0400)] 
block mariadb 1.1.10

does not build for any python version

see https://jira.mariadb.org/browse/CONPY-293

Change-Id: I1bf53d79eda7ded017b233f1639aae4bf9578ae6
(cherry picked from commit 833775adc225a358e194092a3cd50be2f52ca8c9)

12 months agoLink scalar result method in scalar_one / scalar_one_or_none
Federico Caselli [Mon, 23 Sep 2024 21:11:06 +0000 (23:11 +0200)] 
Link scalar result method in scalar_one / scalar_one_or_none

References: #11919

Change-Id: Iccbcd3fc3a6143be902683837b36260e5dd31c60
(cherry picked from commit 74e8e777f9aab33830d0625ef03d4a349cab24f4)

12 months agoAdd type annotations to CreateSchema & DropSchema (#11914)
sh-at-cs [Mon, 23 Sep 2024 17:21:40 +0000 (19:21 +0200)] 
Add type annotations to CreateSchema & DropSchema (#11914)

(cherry picked from commit 40ccf772d377ec5f0b07691d3505292ddbbd2435)

12 months agopropagate populate_existing for ORM bulk update
Mike Bayer [Sun, 22 Sep 2024 15:34:48 +0000 (11:34 -0400)] 
propagate populate_existing for ORM bulk update

Similar to #9742

Fixed bug in ORM bulk update/delete where using RETURNING with bulk
update/delete in combination with populate existing would fail to
accommodate the populate_existing option.

Fixes: #11912
Change-Id: Ib9ef659512a1d1ae438eab67332a691941c06f43
(cherry picked from commit 64c1299180c2d944142d54bea741355d474bcbde)

12 months agoadd python 3.13 to pipeline
Federico Caselli [Mon, 5 Aug 2024 21:26:13 +0000 (23:26 +0200)] 
add python 3.13 to pipeline

Change-Id: Id223cfa08b187c2225ea7a6c29817d79474acfc1
(cherry picked from commit 19f145d7f614372b740e7de8dd3ac54e279eb061)
(cherry picked from commit 767e5bf1570684e76e58f5d1b30c9ce158faf88b)

12 months agoUpdated link for the Kinetica dialect (#11895)
am-kinetica [Thu, 19 Sep 2024 20:46:11 +0000 (02:16 +0530)] 
Updated link for the Kinetica dialect (#11895)

(cherry picked from commit a32b917a8836fe0670385c2d11aff58589aefd9c)

12 months agoRemove test warning in python 3.13
Federico Caselli [Tue, 17 Sep 2024 18:22:11 +0000 (20:22 +0200)] 
Remove test warning in python 3.13

Change-Id: Ib098754ef6d157e8dd1eac32b3cb114a9ca66e4a
(cherry picked from commit 0cca754f2101cf0e63f0c67b0220e7a4eb3a0f9c)

12 months agoMAINT: pytest doesn't have any more python 3.12 deprecations
Brigitta Sipőcz [Fri, 13 Sep 2024 20:01:04 +0000 (16:01 -0400)] 
MAINT: pytest doesn't have any more python 3.12 deprecations

<!-- Provide a general summary of your proposed changes in the Title field above -->

### Description
<!-- Describe your changes in detail -->
I believe this workaround is not needed any more, pytest doesn't have any more python deprecations. (Arguably neither 3.13)

### Checklist
<!-- go over following points. check them with an `x` if they do apply, (they turn into clickable checkboxes once the PR is submitted, so no need to do everything at once)

-->

This pull request is:

- [x] Tweek to the (testing) infrastructure
        - New category as I didn't think this PR fit in any of the 3 options offered.

- [ ] A documentation / typographical / small typing error fix
- Good to go, no issue or tests are needed
- [ ] A short code fix
- please include the issue number, and create an issue if none exists, which
  must include a complete example of the issue.  one line code fixes without an
  issue and demonstration will not be accepted.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.   one line code fixes without tests will not be accepted.
- [ ] A new feature implementation
- please include the issue number, and create an issue if none exists, which must
  include a complete example of how the feature would look.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.

**Have a nice day!**

Closes: #11838
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/11838
Pull-request-sha: 7d500de8707cb6d89ba59922d0671afc4062de82

Change-Id: I5fef8ee799fa2dbed1d00f5a779d6b25ce3e5ae8
(cherry picked from commit ffb470cf54c7593e02569102665642be4b85bec2)

12 months agoupdate MonetDB dialect information (#11884)
Yunus Koning [Tue, 17 Sep 2024 18:05:09 +0000 (20:05 +0200)] 
update MonetDB dialect information (#11884)

(cherry picked from commit 8da20140fe2d57584211d85de589cbce7172a2da)

12 months agoBump pypa/cibuildwheel from 2.20.0 to 2.21.1 (#11885)
dependabot[bot] [Tue, 17 Sep 2024 18:02:26 +0000 (20:02 +0200)] 
Bump pypa/cibuildwheel from 2.20.0 to 2.21.1 (#11885)

Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 2.20.0 to 2.21.1.
- [Release notes](https://github.com/pypa/cibuildwheel/releases)
- [Changelog](https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md)
- [Commits](https://github.com/pypa/cibuildwheel/compare/v2.20.0...v2.21.1)

---
updated-dependencies:
- dependency-name: pypa/cibuildwheel
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
(cherry picked from commit ea4dcdd3e7a42b16ddeabc78b4f455e37ecdbe7c)

12 months agoVersion 2.0.36 placeholder
Mike Bayer [Mon, 16 Sep 2024 20:30:25 +0000 (16:30 -0400)] 
Version 2.0.36 placeholder

12 months ago- 2.0.35 rel_2_0_35
Mike Bayer [Mon, 16 Sep 2024 20:01:26 +0000 (16:01 -0400)] 
- 2.0.35

12 months agorequire insert_returning for new EagerLoadTest DML suite
Mike Bayer [Mon, 16 Sep 2024 17:43:30 +0000 (13:43 -0400)] 
require insert_returning for new EagerLoadTest DML suite

Change-Id: I354e3ba68ba6efaab6618e514d11355d72652bb5
(cherry picked from commit 52385c44d2bcdc9986d4ec8691cf72342b170dcd)

12 months agoMerge url query args to opts in mariadbconnector like mysqldb
Tobias Petersen [Fri, 13 Sep 2024 18:34:33 +0000 (14:34 -0400)] 
Merge url query args to opts in mariadbconnector like mysqldb

Fixed issue in mariadbconnector dialect where query string arguments that
weren't checked integer or boolean arguments would be ignored, such as
string arguments like ``unix_socket``, etc.  As part of this change, the
argument parsing for particular elements such as ``client_flags``,
``compress``, ``local_infile`` has been made more consistent across all
MySQL / MariaDB dialect which accept each argument. Pull request courtesy
Tobias Alex-Petersen.

Fixes: #11870
Closes: #11869
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/11869
Pull-request-sha: 8fdcabc83b548e3fc19aa1625035d43ebc0e1875

Change-Id: I3a11a0e65e118c94928027478409488b0d5e94f8
(cherry picked from commit 5e16d25cc7c32e6cfaea44ceec5a2730d766952c)

12 months agoUpdate index.rst (#11799)
Vitalii Fuglaev [Fri, 13 Sep 2024 20:03:04 +0000 (23:03 +0300)] 
Update index.rst (#11799)

08/28/2024 была обновлена версия sqlalchemy-greenplum в PyPI и сейчас она поддерживает SQLAlchemy 2.0 и выше

(cherry picked from commit 3fbef3b6755503a8369670e4d9439379a52eba8e)

12 months agoFix subquery typos in documentation and changelog (#11807)
Studnikov Dmitry [Fri, 13 Sep 2024 20:01:26 +0000 (23:01 +0300)] 
Fix subquery typos in documentation and changelog (#11807)

* fix: subquery typo

* fix: subquery typo in changelog

---------

Co-authored-by: Dmitry Studnikov <dmitrii.studnikov@mysky.com>
(cherry picked from commit 08c916df4ec21b6929d90b90eb3cfe50343f2260)

12 months agoFix wrong ticket reference in changelog for #11820 (#11867)
Frazer McLean [Fri, 13 Sep 2024 19:57:47 +0000 (21:57 +0200)] 
Fix wrong ticket reference in changelog for #11820 (#11867)

(cherry picked from commit 5959648abc0ff71e38cc12da0261833ea565c154)

12 months agoMerge "fix most broken links" into rel_2_0
Michael Bayer [Fri, 13 Sep 2024 17:20:22 +0000 (17:20 +0000)] 
Merge "fix most broken links" into rel_2_0

12 months agoMerge "MAINT: cleanup the lasts of datetime.utcnow()" into rel_2_0
Michael Bayer [Fri, 13 Sep 2024 17:19:52 +0000 (17:19 +0000)] 
Merge "MAINT: cleanup the lasts of datetime.utcnow()" into rel_2_0

12 months agoFix use of typing.Literal on Python 3.8 and 3.9
Frazer McLean [Thu, 5 Sep 2024 11:29:47 +0000 (07:29 -0400)] 
Fix use of typing.Literal on Python 3.8 and 3.9

Fixed issue where it was not possible to use ``typing.Literal`` with
``Mapped[]`` on Python 3.8 and 3.9.  Pull request courtesy Frazer McLean.

Closes: #11825
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/11825
Pull-request-sha: e1e50a97d2a6e0e9ef7ba8dc1a5f07d252e79fa4

Change-Id: Idf04326abcba45813ad555127e81d581a0353587
(cherry picked from commit 509c6d58501679a5844631faf9d7cb751218d7a0)