Skip to content

Commit c63d2ce

Browse files
Bump mypy from 1.14.1 to 1.15.0 (#354)
Bumps [mypy](https://github.com/python/mypy) from 1.14.1 to 1.15.0. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/python/mypy/blob/master/CHANGELOG.md">mypy's changelog</a>.</em></p> <blockquote> <h1>Mypy Release Notes</h1> <h2>Next Release</h2> <p>...</p> <h2>Mypy 1.15</h2> <p>We’ve just uploaded mypy 1.15 to the Python Package Index (<a href="https://pypi.org/project/mypy/">PyPI</a>). Mypy is a static type checker for Python. This release includes new features, performance improvements and bug fixes. You can install it as follows:</p> <pre><code>python3 -m pip install -U mypy </code></pre> <p>You can read the full documentation for this release on <a href="http://mypy.readthedocs.io">Read the Docs</a>.</p> <h3>Performance Improvements</h3> <p>Mypy is up to 40% faster in some use cases. This improvement comes largely from tuning the performance of the garbage collector. Additionally, the release includes several micro-optimizations that may be impactful for large projects.</p> <p>Contributed by Jukka Lehtosalo</p> <ul> <li>PR <a href="https://redirect.github.com/python/mypy/pull/18306">18306</a></li> <li>PR <a href="https://redirect.github.com/python/mypy/pull/18302">18302</a></li> <li>PR <a href="https://redirect.github.com/python/mypy/pull/18298">18298</a></li> <li>PR <a href="https://redirect.github.com/python/mypy/pull/18299">18299</a></li> </ul> <h3>Mypyc Accelerated Mypy Wheels for ARM Linux</h3> <p>For best performance, mypy can be compiled to C extension modules using mypyc. This makes mypy 3-5x faster than when interpreted with pure Python. We now build and upload mypyc accelerated mypy wheels for <code>manylinux_aarch64</code> to PyPI, making it easy for Linux users on ARM platforms to realise this speedup -- just <code>pip install</code> the latest mypy.</p> <p>Contributed by Christian Bundy and Marc Mueller (PR <a href="https://redirect.github.com/mypyc/mypy_mypyc-wheels/pull/76">mypy_mypyc-wheels#76</a>, PR <a href="https://redirect.github.com/mypyc/mypy_mypyc-wheels/pull/89">mypy_mypyc-wheels#89</a>).</p> <h3><code>--strict-bytes</code></h3> <p>By default, mypy treats <code>bytearray</code> and <code>memoryview</code> values as assignable to the <code>bytes</code> type, for historical reasons. Use the <code>--strict-bytes</code> flag to disable this behavior. <a href="https://peps.python.org/pep-0688">PEP 688</a> specified the removal of this special case. The flag will be enabled by default in <strong>mypy 2.0</strong>.</p> <p>Contributed by Ali Hamdan (PR <a href="https://redirect.github.com/python/mypy/pull/18263">18263</a>) and Shantanu Jain (PR <a href="https://redirect.github.com/python/mypy/pull/13952">13952</a>).</p> <h3>Improvements to Reachability Analysis and Partial Type Handling in Loops</h3> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/python/mypy/commit/9397454fb5aead107461b089e7cf190bf538d20a"><code>9397454</code></a> remove +dev from version ahead of final release</li> <li><a href="https://github.com/python/mypy/commit/686b591a69db216f714ad50698db785f4ac63eb0"><code>686b591</code></a> remove &quot;unreleased&quot; from 1.15 changelog entry</li> <li><a href="https://github.com/python/mypy/commit/cb4b243a5d9e03173e3e7275e5b92b98afaefb60"><code>cb4b243</code></a> Various small updates to 1.15 changelog (<a href="https://redirect.github.com/python/mypy/issues/18599">#18599</a>)</li> <li><a href="https://github.com/python/mypy/commit/1a265024f901399c701a772e8c1f9e6e110f45e6"><code>1a26502</code></a> Prepare changelog for 1.15 release (<a href="https://redirect.github.com/python/mypy/issues/18583">#18583</a>)</li> <li><a href="https://github.com/python/mypy/commit/d4515e4ad3eee6318744c64cf2eab0ea0b5b7562"><code>d4515e4</code></a> Fix a few PR links in the changelog (<a href="https://redirect.github.com/python/mypy/issues/18586">#18586</a>)</li> <li><a href="https://github.com/python/mypy/commit/f83b6435b0c07a327f6b567dfb5e79ffa36708a2"><code>f83b643</code></a> Add object self-type to tuple test fixture (<a href="https://redirect.github.com/python/mypy/issues/18592">#18592</a>)</li> <li><a href="https://github.com/python/mypy/commit/ebc2cb8befbadfc10b962af018b3fa3842d3fd87"><code>ebc2cb8</code></a> Prevent crash on generic NamedTuple with unresolved typevar bound (<a href="https://redirect.github.com/python/mypy/issues/18585">#18585</a>)</li> <li><a href="https://github.com/python/mypy/commit/63c251e249e52256629dbe8b8334937a092f792d"><code>63c251e</code></a> empty commit to trigger wheel rebuild</li> <li><a href="https://github.com/python/mypy/commit/c30573e7b95eef9d057ff42ebfd326438dac3c42"><code>c30573e</code></a> Fix literal context for ternary expressions (for real) (<a href="https://redirect.github.com/python/mypy/issues/18545">#18545</a>)</li> <li><a href="https://github.com/python/mypy/commit/23d862dd6fbb905a69bcb31e88746dc7a1eb4a43"><code>23d862d</code></a> Fix isinstance with explicit (non generic) type alias (<a href="https://redirect.github.com/python/mypy/issues/18512">#18512</a>)</li> <li>Additional commits viewable in <a href="https://github.com/python/mypy/compare/v1.14.1...v1.15.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=mypy&package-manager=pip&previous-version=1.14.1&new-version=1.15.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) --- <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 show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@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> --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Kai Harder <[email protected]>
1 parent 83a18b0 commit c63d2ce

File tree

3 files changed

+21
-5
lines changed

3 files changed

+21
-5
lines changed

CHANGES.rst

+7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
Changelog
22
=========
33

4+
3.0.1
5+
6+
Fixes
7+
~~~~~
8+
9+
- Fixed an issue causing `sqlalchemy_hana.elements.view` to fail with sqlalchemy 2.0.38
10+
411
3.0.0
512
-----
613

pyproject.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "sqlalchemy-hana"
7-
version = "3.0.0"
7+
version = "3.0.1"
88
description = "SQLAlchemy dialect for SAP HANA"
99
keywords = ["sqlalchemy", "sap", "hana"]
1010
requires-python = "~=3.9"
@@ -41,7 +41,7 @@ dev = [
4141
"pre-commit==4.1.0",
4242
"flake8==7.1.1",
4343
"pylint==3.3.4",
44-
"mypy==1.14.1",
44+
"mypy==1.15.0",
4545
"types-hdbcli==2.23.0.20241221",
4646
"typing-extensions==4.12.2",
4747
]

sqlalchemy_hana/elements.py

+12-3
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,18 @@ def __init__(self, name: str):
3535
def view(name: str, selectable: AnySelect) -> TableClause:
3636
"""Helper function to create a view clause element."""
3737
clause = table_clause(name)
38-
clause._columns._populate_separate_keys(
39-
col._make_proxy(clause) for col in selectable.selected_columns
40-
)
38+
39+
iter_ = []
40+
for col in selectable.selected_columns:
41+
try:
42+
iter_.append(col._make_proxy(clause)) # type:ignore
43+
except TypeError:
44+
iter_.append(
45+
col._make_proxy(
46+
clause, clause.primary_key, clause.foreign_keys # type:ignore
47+
)
48+
)
49+
clause._columns._populate_separate_keys(iter_)
4150
return clause
4251

4352

0 commit comments

Comments
 (0)