summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge "add hooks/docs for automap w/ multiple schemas" into mainmike bayer2023-01-264-43/+518
|\
| * add hooks/docs for automap w/ multiple schemasMike Bayer2023-01-264-43/+518
| | | | | | | | | | | | | | | | | | | | | | Added new feature to :class:`.Automap` for autoload of classes across multiple schemas which may have overlapping names, by providing both a :paramref:`.Automap.prepare.modulename_for_class` parameter as well as a new collection :attr:`.AutomapBase.by_module`, which stores a dot-separated namespace of module names linked to classes. Fixes: #5145 Change-Id: I735fecaacdfc267f1f901d76c2b3880e48f5969d
* | Merge "2.0 prep" into mainmike bayer2023-01-268-9/+9
|\ \
| * | 2.0 prepMike Bayer2023-01-268-9/+9
| |/ | | | | | | | | | | still waiting on two more gerrits but this will set things up Change-Id: I966d4c683972c5b965b8db136509062cc8abfe91
* | add typing to legacy operatorsMike Bayer2023-01-264-23/+220
|/ | | | | | | | | Added typing to legacy operators such as ``isnot()``, ``notin_()``, etc. which previously were referencing the newer operators but were not themselves typed. Fixes: #9148 Change-Id: I3ad7d75d89ec13c9f45063033ecff69d610c72ca
* Merge "add Mapped to _ORMColCollectionElement" into mainmike bayer2023-01-263-1/+33
|\
| * add Mapped to _ORMColCollectionElementMike Bayer2023-01-263-1/+33
| | | | | | | | | | | | | | | | | | Fixed issue where using the :paramref:`_orm.relationship.remote_side` and similar parameters, passing an annotated declarative object typed as :class:`_orm.Mapped`, would not be accepted by the type checker. Fixes: #9150 Change-Id: I5770c17ee4ad8c54661354da9582ec3c4706ffcc
* | fix linkMike Bayer2023-01-261-1/+1
|/ | | | Change-Id: I422ef943ae603e046f309618ba4191a7ba849537
* Merge "add context for warnings emitted from configure_mappers(), ↵mike bayer2023-01-266-11/+185
|\ | | | | | | autoflush()" into main
| * add context for warnings emitted from configure_mappers(), autoflush()jonathan vanasco2023-01-246-11/+185
| | | | | | | | | | | | | | | | | | | | | | Improved the notification of warnings that are emitted within the configure mappers or flush process, which are often invoked as part of a different operation, to add additional context to the message that indicates one of these operations as the source of the warning within operations that may not be obviously related. Fixes: #7305 Change-Id: I79da7a6a5d4cf67d57615d0ffc2b8d8454011c84
* | Merge "fix incorrect use of testing.future()" into mainmike bayer2023-01-263-5/+4
|\ \
| * | fix incorrect use of testing.future()Mike Bayer2023-01-253-5/+4
| | | | | | | | | | | | | | | | | | | | | this has been emitting a warning probably for a long time Change-Id: I44a6766b5e92d14ce6bbb5a90ab52648f877afc2
* | | add set_shard_id() loader option for horizontal shardMike Bayer2023-01-2511-291/+877
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | Added new option to horizontal sharding API :class:`_horizontal.set_shard_id` which sets the effective shard identifier to query against, for both the primary query as well as for all secondary loaders including relationship eager loaders as well as relationship and column lazy loaders. Modernize sharding examples with new-style mappings, add new asyncio example. Fixes: #7226 Fixes: #7028 Change-Id: Ie69248060c305e8de04f75a529949777944ad511
* | Merge "disable new tox 4.4.0 feature" into mainmike bayer2023-01-251-1/+4
|\ \
| * | disable new tox 4.4.0 featureMike Bayer2023-01-251-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a new flag constrain_package_deps appears to interpret deps as constraints, and not requirements. turn it off. also remove the python setup command and use their default, try to stay compatible Change-Id: Ib400a7783c08c2c63ddb099944cd48b9631acd75
* | | Merge "Add public protocol for mapped class" into mainmike bayer2023-01-256-28/+94
|\ \ \ | |/ / |/| |
| * | Add public protocol for mapped classFederico Caselli2023-01-256-28/+94
| | | | | | | | | | | | | | | Fixes: #8624 Change-Id: Ia7a66ae9ba534ed7152f95dfd0f7d05b9d00165a
* | | Improve examples, make typing beta, remove beta from asyncioFederico Caselli2023-01-252-21/+17
| | | | | | | | | | | | Change-Id: Icbde11dcaae5fa6f5e83cd50b6a301081a3ab962
* | | add fwds ports to selected 1.4 issuesMike Bayer2023-01-253-0/+3
| | | | | | | | | | | | Change-Id: Ic9ffd1e1f15570e366c12bf08374e8313059f288
* | | Make comment support conditional on fn_listextendedproperty availabilityMike Bayer2023-01-254-2/+171
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | The newly added comment reflection and rendering capability of the MSSQL dialect, added in :ticket:`7844`, will now be disabled by default if it cannot be determined that an unsupported backend such as Azure Synapse may be in use; this backend does not support table and column comments and does not support the SQL Server routines in use to generate them as well as to reflect them. A new parameter ``supports_comments`` is added to the dialect which defaults to ``None``, indicating that comment support should be auto-detected. When set to ``True`` or ``False``, the comment support is either enabled or disabled unconditionally. Fixes: #9142 Change-Id: Ib5cac31806185e7353e15b3d83b580652d304b3b
* | Merge "Type annotations for sqlalchemy.orm.mapped_collection" into mainmike bayer2023-01-241-39/+97
|\ \
| * | Type annotations for sqlalchemy.orm.mapped_collectionMaksim Latysh2023-01-241-39/+97
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | <!-- Provide a general summary of your proposed changes in the Title field above --> ### Description <!-- Describe your changes in detail --> An attempt to annotate lib/sqlalchemy/orm/mapped_collection.py with type hints (issue https://github.com/sqlalchemy/sqlalchemy/issues/6810) ### 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 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. Closes: #9140 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/9140 Pull-request-sha: facb4717134943dd651905f7c72618eb66a9eca5 Change-Id: I0fb80e2ea7ed2247c494487fb6c8d72efb4e9802
* | Merge "fix stringify for CreateSchema" into mainmike bayer2023-01-244-0/+39
|\ \
| * | fix stringify for CreateSchemaMike Bayer2023-01-244-0/+39
| |/ | | | | | | | | | | | | | | Fixed stringify for a the :class:`.CreateSchema` DDL construct, which would fail with an ``AttributeError`` when stringified without a dialect. Fixes: #7664 Change-Id: Ifc1769604bc5219c060f5112f7bdea0f780f1a1c
* | reflect Oracle ROWIDMike Bayer2023-01-243-0/+20
|/ | | | | | | | Added :class:`_oracle.ROWID` to reflected types as this type may be used in a "CREATE TABLE" statement. Fixes: #5047 Change-Id: I818dcf68ed81419d0fd5df5e2d51d6fa0f1be7fc
* add typing issue templateFederico Caselli2023-01-232-4/+72
| | | | Change-Id: I429bf499274362e53ab3e7ea0f65c0ef5265a14d
* fix up random col name test and ensure no dupesMike Bayer2023-01-231-22/+31
| | | | | | | this is a bit of a goofy test which can occasionally fail, so add a set to prevent names from being duplicated. Change-Id: Ie7ac605f517ce31f2c5d092a692d93f733180716
* Merge "generate stubs for func known functions" into mainmike bayer2023-01-235-0/+437
|\
| * generate stubs for func known functionsMike Bayer2023-01-235-0/+437
| | | | | | | | | | | | | | | | | | | | Added typing for the built-in generic functions that are available from the :data:`_sql.func` namespace, which accept a particular set of arguments and return a particular type, such as for :class:`_sql.count`, :class:`_sql.current_timestamp`, etc. Fixes: #9129 Change-Id: I1a2e0dcca3048c77e84dc786843a7df05c457dfa
* | Merge "Result.__enter__ annotation" into mainmike bayer2023-01-233-2/+33
|\ \
| * | Result.__enter__ annotationMartin Baláž2023-01-233-2/+33
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed typing issue where the object type when using :class:`_engine.Result` as a context manager were not preserved, indicating :class:`_engine.Result` in all cases rather than the specific :class:`_engine.Result` sub-type. Pull request courtesy Martin Baláž. Fixes: #9136 Closes: #9135 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/9135 Pull-request-sha: 97a9829db59db359fbb400ec0d913bdf8954f00a Change-Id: I60a7f89ba39bf0f9fc5e6e7bf09f642167fe476f
* | Run bracket interpretation for reflectionShan2023-01-234-3/+87
|/ | | | | | | | | | | | | | | | | | | | | Fixed bug where a schema name given with brackets, but no dots inside the name, for parameters such as :paramref:`_schema.Table.schema` would not be interpreted within the context of the SQL Server dialect's documented behavior of interpreting explicit brackets as token delimiters, first added in 1.2 for #2626, when referring to the schema name in reflection operations. The original assumption for #2626's behavior was that the special interpretation of brackets was only significant if dots were present, however in practice, the brackets are not included as part of the identifier name for all SQL rendering operations since these are not valid characters within regular or delimited identifiers. Pull request courtesy Shan. Fixes: #9133 Closes: #9134 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/9134 Pull-request-sha: 5dac87c82cd3063dd8e50f0075c7c00330be6439 Change-Id: I7a507bc38d75a04ffcb7e920298775baae22c6d1
* clarify __table__, local_tableMike Bayer2023-01-202-11/+19
| | | | | | | | These are typed as FromClause, make sure this is stated up front indicating Table as a subset of possible object types. Change-Id: I15961a69d3655600249e3cfe6c4b3372f97d4485 References: #9130
* Merge "typing updates" into mainmike bayer2023-01-209-47/+178
|\
| * typing updatesMike Bayer2023-01-209-47/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The :meth:`_sql.ColumnOperators.in_` and :meth:`_sql.ColumnOperators.not_in_` are typed to include ``Iterable[Any]`` rather than ``Sequence[Any]`` for more flexibility in argument type. The :func:`_sql.or_` and :func:`_sql.and_` from a typing perspective require the first argument to be present, however these functions still accept zero arguments which will emit a deprecation warning at runtime. Typing is also added to support sending the fixed literal ``False`` for :func:`_sql.or_` and ``True`` for :func:`_sql.and_` as the first argument only, however the documentation now indicates sending the :func:`_sql.false` and :func:`_sql.true` constructs in these cases as a more explicit approach. Fixed typing issue where iterating over a :class:`_orm.Query` object was not correctly typed. Fixes: #9122 Fixes: #9123 Fixes: #9125 Change-Id: I500e3e1b826717b3dd49afa1e682c3c8279c9226
* | implement basic typing for lambda elementsMike Bayer2023-01-194-34/+163
|/ | | | | | | | | | | | | | | | | These weren't working at all, so fixed things up and added a test suite. Keeping things very basic with Any returns etc. as having more specific return types starts making it too cumbersome to write end-user code. Corrected the type passed for "lambda statements" so that a plain lambda is accepted by mypy, pyright, others without any errors about argument types. Additionally implemented typing for more of the public API for lambda statements and ensured :class:`.StatementLambdaElement` is part of the :class:`.Executable` hierarchy so it's typed as accepted by :meth:`_engine.Connection.execute`. Fixes: #9120 Change-Id: Ia7fa34e5b6e43fba02c8f94ccc256f3a68a1f445
* reword INSERT explanationMike Bayer2023-01-191-29/+65
| | | | Change-Id: I08460f0a77131c8c1406c3496e9d64a5a26bf6ff
* Version 2.0.0rc4 placeholderMike Bayer2023-01-182-1/+5
|
* - 2.0.0rc3rel_2_0_0rc3Mike Bayer2023-01-188-74/+80
|
* avoid confusion in rst commentFederico Caselli2023-01-181-1/+1
| | | | Change-Id: I6e971f7445ae19f73097516b58776ab05a5371f1
* Merge "refactor code generation tools , include --check command" into mainmike bayer2023-01-1810-163/+307
|\
| * refactor code generation tools , include --check commandMike Bayer2023-01-1810-163/+307
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in particular it looks like CI was not picking up on the "git diff" oriented commands, which were failing to run due to pathing issues. As we were setting cwd for black/zimports relative to sqlalchemy library, and tox installs it in the venv, black/zimports would fail to run from tox, and since these are subprocess.run we didn't pick up the failure. This overall locks down how zimports/black are run so that we are definitely from the source root, by using the location of tools/ to determine the root. Fixes: #8892 Change-Id: I7c54b747edd5a80e0c699b8456febf66d8b62375
* | fix typo, add missing command to unittest pg docker exampleFederico Caselli2023-01-182-2/+2
| | | | | | | | Change-Id: Ic640ccf7459c39cb4f6ab8dcfb3efed1a1dbb55f
* | Remove redundant 1.x reference (#9115)Sam Bull2023-01-181-4/+0
| |
* | Bump pypa/cibuildwheel from 2.11.2 to 2.12.0dependabot[bot]2023-01-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 2.11.2 to 2.12.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/pypa/cibuildwheel/releases">pypa/cibuildwheel's releases</a>.</em></p> <blockquote> <h2>v2.12.0</h2> <ul> <li>✨ Adds support for PyPy arm64 wheels. This means that you can build PyPy wheels for Apple Silicon machines. Cross-compilation is not supported for these wheels, so you'll have to build on an Apple Silicon machine. (<a href="https://github-redirect.dependabot.com/pypa/cibuildwheel/issues/1372">#1372</a>)</li> <li>🛠 Pinned version updates, including PyPy to v7.3.11 and setuptools to 66.0.0.</li> </ul> <h2>v2.11.4</h2> <ul> <li>🐛 Fix a bug that caused missing wheels on Windows when a test was skipped using CIBW_TEST_SKIP (<a href="https://github-redirect.dependabot.com/pypa/cibuildwheel/issues/1377">#1377</a>)</li> <li>🛠 Updates CPython 3.11 to 3.11.1 (<a href="https://github-redirect.dependabot.com/pypa/cibuildwheel/issues/1371">#1371</a>)</li> <li>🛠 Updates PyPy 3.7 to 3.7.10, except on macOS which remains on 7.3.9 due to a bug. (<a href="https://github-redirect.dependabot.com/pypa/cibuildwheel/issues/1371">#1371</a>)</li> <li>📚 Added a reference to abi3audit to the docs (<a href="https://github-redirect.dependabot.com/pypa/cibuildwheel/issues/1347">#1347</a>)</li> </ul> <h2>v2.11.3</h2> <ul> <li>✨ Improves the 'build options' log output that's printed at the start of each run (<a href="https://github-redirect.dependabot.com/pypa/cibuildwheel/issues/1352">#1352</a>)</li> <li>✨ Added a friendly error message to a common misconfiguration of the <code>CIBW_TEST_COMMAND</code> option - not specifying path using the <code>{project}</code> placeholder (<a href="https://github-redirect.dependabot.com/pypa/cibuildwheel/issues/1336">#1336</a>)</li> <li>🛠 The GitHub Action now uses Powershell on Windows to avoid occasional incompabilities with bash (<a href="https://github-redirect.dependabot.com/pypa/cibuildwheel/issues/1346">#1346</a>)</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md">pypa/cibuildwheel's changelog</a>.</em></p> <blockquote> <h3>v2.12.0</h3> <p><em>16 Jan 2023</em></p> <ul> <li>✨ Adds support for PyPy arm64 wheels. This means that you can build PyPy wheels for Apple Silicon machines. Cross-compilation is not supported for these wheels, so you'll have to build on an Apple Silicon machine. (<a href="https://github-redirect.dependabot.com/pypa/cibuildwheel/issues/1372">#1372</a>)</li> <li>🛠 Pinned version updates, including PyPy to v7.3.11 and setuptools to 66.0.0.</li> </ul> <h3>v2.11.4</h3> <p><em>24 Dec 2022</em></p> <ul> <li>🐛 Fix a bug that caused missing wheels on Windows when a test was skipped using CIBW_TEST_SKIP (<a href="https://github-redirect.dependabot.com/pypa/cibuildwheel/issues/1377">#1377</a>)</li> <li>🛠 Updates CPython 3.11 to 3.11.1 (<a href="https://github-redirect.dependabot.com/pypa/cibuildwheel/issues/1371">#1371</a>)</li> <li>🛠 Updates PyPy to 7.3.10, except on macOS which remains on 7.3.9 due to a bug on that platform. (<a href="https://github-redirect.dependabot.com/pypa/cibuildwheel/issues/1371">#1371</a>)</li> <li>📚 Added a reference to abi3audit to the docs (<a href="https://github-redirect.dependabot.com/pypa/cibuildwheel/issues/1347">#1347</a>)</li> </ul> <h3>v2.11.3</h3> <p><em>5 Dec 2022</em></p> <ul> <li>✨ Improves the 'build options' log output that's printed at the start of each run (<a href="https://github-redirect.dependabot.com/pypa/cibuildwheel/issues/1352">#1352</a>)</li> <li>✨ Added a friendly error message to a common misconfiguration of the <code>CIBW_TEST_COMMAND</code> option - not specifying path using the <code>{project}</code> placeholder (<a href="https://github-redirect.dependabot.com/pypa/cibuildwheel/issues/1336">#1336</a>)</li> <li>🛠 The GitHub Action now uses Powershell on Windows to avoid occasional incompabilities with bash (<a href="https://github-redirect.dependabot.com/pypa/cibuildwheel/issues/1346">#1346</a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/pypa/cibuildwheel/commit/a808017c3962f4d678fe685239668aad8c150932"><code>a808017</code></a> Bump version: v2.12.0</li> <li><a href="https://github.com/pypa/cibuildwheel/commit/4e1fcb8df69a5eef7d82b06b70253846342eb0a0"><code>4e1fcb8</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/pypa/cibuildwheel/issues/1394">#1394</a> from pypa/update-dependencies-pr</li> <li><a href="https://github.com/pypa/cibuildwheel/commit/4afa12ed06e8462c24040a41ee170c8983001172"><code>4afa12e</code></a> Update dependencies</li> <li><a href="https://github.com/pypa/cibuildwheel/commit/92cb1d8990e2418c0bd24c5e8d74406345216b58"><code>92cb1d8</code></a> feat: add PyPy macOS arm64 (<a href="https://github-redirect.dependabot.com/pypa/cibuildwheel/issues/1372">#1372</a>)</li> <li><a href="https://github.com/pypa/cibuildwheel/commit/06c4927798c6cc67792db86e6e133df4ac0a7139"><code>06c4927</code></a> [Bot] Update dependencies (<a href="https://github-redirect.dependabot.com/pypa/cibuildwheel/issues/1381">#1381</a>)</li> <li><a href="https://github.com/pypa/cibuildwheel/commit/9b0d63b2f43d06853cbc7eae711646d93983a4e4"><code>9b0d63b</code></a> ci: use normal AppVeyor macOS image (<a href="https://github-redirect.dependabot.com/pypa/cibuildwheel/issues/1388">#1388</a>)</li> <li><a href="https://github.com/pypa/cibuildwheel/commit/6df156807a9b029ed513c6b5c4f4fbe43f7a2c0c"><code>6df1568</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://github-redirect.dependabot.com/pypa/cibuildwheel/issues/1382">#1382</a>)</li> <li><a href="https://github.com/pypa/cibuildwheel/commit/27fc88e6385a995e61a87ee4b903bed263e6a6e2"><code>27fc88e</code></a> Bump version: v2.11.4</li> <li><a href="https://github.com/pypa/cibuildwheel/commit/a7e9ece1d420cd7a546d12c845f2847aa73f4c43"><code>a7e9ece</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/pypa/cibuildwheel/issues/1371">#1371</a> from pypa/update-dependencies-pr</li> <li><a href="https://github.com/pypa/cibuildwheel/commit/b9a3ed8c6a52c00ac16b94e6039d00e6263b30ca"><code>b9a3ed8</code></a> Update cibuildwheel/resources/build-platforms.toml</li> <li>Additional commits viewable in <a href="https://github.com/pypa/cibuildwheel/compare/v2.11.2...v2.12.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pypa/cibuildwheel&package-manager=github_actions&previous-version=2.11.2&new-version=2.12.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) Change-Id: I4d15e4d07d07908fd23bff46ceb6931dee02aa89 --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Closes: #9107 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/9107 Pull-request-sha: 5004ecc1d4df39017d97fef5ee91201e41b0cca5 Change-Id: I0a277582132287b71b2d018865934e84db8f8971
* | mypy plugin fixesMike Bayer2023-01-185-8/+78
|/ | | | | | | | | | | | | | | | | | | 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
* pass driver_connection to TypeInfo.fetch()Mike Bayer2023-01-172-2/+9
| | | | | | | | | Fixed regression where psycopg3 changed an API call as of version 3.1.8 to expect a specific object type that was previously not enforced, breaking connectivity for the psycopg3 dialect. Fixes: #9106 Change-Id: Ibb42f84b1086f30173aeb6e1f3256c56d129fe6e
* Merge "dont assume copy_with() on builtins list, dict, etc; improve error ↵mike bayer2023-01-176-3/+317
|\ | | | | | | msg." into main
| * dont assume copy_with() on builtins list, dict, etc; improve error msg.Mike Bayer2023-01-166-3/+317
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed issue where using an ``Annotated`` type in the ``type_annotation_map`` which itself contained a plain container type (e.g. ``list``, ``dict``) generic type as the target type would produce an internal error where the ORM were trying to interpret the ``Annotated`` instance. Added an error message when a :func:`_orm.relationship` is mapped against an abstract container type, such as ``Mapped[Sequence[B]]``, without providing the :paramref:`_orm.relationship.container_class` parameter which is necessary when the type is abstract. Previously the the abstract container would attempt to be instantiated and fail. Fixes: #9099 Fixes: #9100 Change-Id: I18aa6abd5451c5ac75a9caed8441ff0cd8f44589
* | fix doc warningsMike Bayer2023-01-162-9/+9
| | | | | | | | Change-Id: I38e465ef1902584c3242bb06ed5ed18a8c018285