René's URL Explorer Experiment


Title: alembic incompatibility with sqlalchemy < 1.3.11 due to computed columns · Issue #269 · googleapis/python-spanner-sqlalchemy · GitHub

Open Graph Title: alembic incompatibility with sqlalchemy < 1.3.11 due to computed columns · Issue #269 · googleapis/python-spanner-sqlalchemy

X Title: alembic incompatibility with sqlalchemy < 1.3.11 due to computed columns · Issue #269 · googleapis/python-spanner-sqlalchemy

Description: Environment details Programming language: python OS: macos Language runtime version: 3.7.14 Package version: sqlalchemy-spanner 1.3.2, sqlalchemy 1.2.12, alembic 0.9.3 Steps to reproduce install any sqlalchemy version under 1.3.11 run an...

Open Graph Description: Environment details Programming language: python OS: macos Language runtime version: 3.7.14 Package version: sqlalchemy-spanner 1.3.2, sqlalchemy 1.2.12, alembic 0.9.3 Steps to reproduce install an...

X Description: Environment details Programming language: python OS: macos Language runtime version: 3.7.14 Package version: sqlalchemy-spanner 1.3.2, sqlalchemy 1.2.12, alembic 0.9.3 Steps to reproduce install an...

Opengraph URL: https://github.com/googleapis/python-spanner-sqlalchemy/issues/269

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"alembic incompatibility with sqlalchemy \u003c 1.3.11 due to computed columns","articleBody":"#### Environment details\r\n\r\n  - Programming language: python\r\n  - OS: macos\r\n  - Language runtime version: 3.7.14 \r\n  - Package version: sqlalchemy-spanner 1.3.2, sqlalchemy 1.2.12, alembic 0.9.3\r\n\r\n#### Steps to reproduce\r\n\r\n  1. install any sqlalchemy version under 1.3.11\r\n  2. run any alembic migration \r\n \r\nEasy way to try this using the existing tests--in the [migration_test function](https://github.com/googleapis/python-spanner-sqlalchemy/blob/main/noxfile.py#L225) in noxfile.py, add \r\n\r\n```session.run(\"pip\", \"install\", \"sqlalchemy\u003e=1.1.13,\u003c=1.3.10\", \"--force-reinstall\")```\r\n\r\n at the beginning after the imports to force install the sqlalchemy versions with the incompatibilities. Then run the tests using `nox -s migration_test`. In `alembic upgrade head`, and the following error should occur:\r\n\r\n```\r\n\u003cremoved\u003e\r\n  File \"google/cloud/sqlalchemy_spanner/sqlalchemy_spanner.py\", line 352, in get_column_specification\r\n    if column.computed is not None:\r\n  File \"nox/migration_test/lib/python3.8/site-packages/sqlalchemy/sql/elements.py\", line 690, in __getattr__\r\n    key)\r\nAttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'computed'\r\n```\r\n\r\nThis is because the sqlalchemy_spanner alembic code [here](https://github.com/googleapis/python-spanner-sqlalchemy/blob/main/google/cloud/sqlalchemy_spanner/sqlalchemy_spanner.py#L352-L353) refers to the `computed` attribute of `Column`, which was introduced in sqlalchemy 1.3.11 ([release notes](https://github.com/sqlalchemy/sqlalchemy/releases/tag/rel_1_3_11), [code ref](https://github.com/sqlalchemy/sqlalchemy/compare/rel_1_3_10...rel_1_3_11#diff-04bfd5c1f4dc2b278cac4df823a4dca6fbb03a1c16d8dc7bb88714cf3858bce3R1347)). So, for sqlalchemy versions \u003c 1.3.11, this will throw the `AttributeError` above since `Column`s don't have the computed attribute. \r\n\r\nA simple but maybe hacky fix would be to just check if the attribute exists before accessing it:\r\n\r\nNew version\r\n```\r\nif hasattr(column, \"computed\") and column.computed is not None:\r\n    colspec += \" \" + self.process(column.computed)\r\n```\r\n\r\nOld version\r\n```\r\nif column.computed is not None:\r\n    colspec += \" \" + self.process(column.computed)\r\n```\r\n\r\nbut definitely open to suggestions for how to fix this! ","author":{"url":"https://github.com/elainearbaugh","@type":"Person","name":"elainearbaugh"},"datePublished":"2022-10-13T21:55:02.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/269/python-spanner-sqlalchemy/issues/269"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:e19900fc-3a38-33c1-5aa1-41f8c71b2717
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id95F0:2C03D:74F5118:A432606:6A4FDF78
html-safe-nonce3a1d79fafffb7ffd916a1d133969e410cec53a5231bdd5d265edd8d1e5e26d00
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NUYwOjJDMDNEOjc0RjUxMTg6QTQzMjYwNjo2QTRGREY3OCIsInZpc2l0b3JfaWQiOiIzNzQ1ODIwMTIzNzExMTM1NjA4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac33c1d7a164c9595a31e78a52562d8779695a423ce59ccf441bbd6e3b33151c1f
hovercard-subject-tagissue:1408469901
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/python-spanner-sqlalchemy/269/issue_layout
twitter:imagehttps://opengraph.githubassets.com/7531cde24b648abac67321bbada08d8eb4db1bd362585022081d7b8ab30d13cb/googleapis/python-spanner-sqlalchemy/issues/269
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/7531cde24b648abac67321bbada08d8eb4db1bd362585022081d7b8ab30d13cb/googleapis/python-spanner-sqlalchemy/issues/269
og:image:altEnvironment details Programming language: python OS: macos Language runtime version: 3.7.14 Package version: sqlalchemy-spanner 1.3.2, sqlalchemy 1.2.12, alembic 0.9.3 Steps to reproduce install an...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameelainearbaugh
hostnamegithub.com
expected-hostnamegithub.com
None19b98c3d9767bb8a56238a89ff8401d1cbdf3bc5c353799aacf49fe6c76b4b7c
turbo-cache-controlno-preview
go-importgithub.com/googleapis/python-spanner-sqlalchemy git https://github.com/googleapis/python-spanner-sqlalchemy.git
octolytics-dimension-user_id16785467
octolytics-dimension-user_logingoogleapis
octolytics-dimension-repository_id335511641
octolytics-dimension-repository_nwogoogleapis/python-spanner-sqlalchemy
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id335511641
octolytics-dimension-repository_network_root_nwogoogleapis/python-spanner-sqlalchemy
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release142593e66413bbae27fd485859993597d5a3b104
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/googleapis/python-spanner-sqlalchemy/issues/269#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgoogleapis%2Fpython-spanner-sqlalchemy%2Fissues%2F269
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgoogleapis%2Fpython-spanner-sqlalchemy%2Fissues%2F269
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=googleapis%2Fpython-spanner-sqlalchemy
Reloadhttps://github.com/googleapis/python-spanner-sqlalchemy/issues/269
Reloadhttps://github.com/googleapis/python-spanner-sqlalchemy/issues/269
Reloadhttps://github.com/googleapis/python-spanner-sqlalchemy/issues/269
Please reload this pagehttps://github.com/googleapis/python-spanner-sqlalchemy/issues/269
googleapis https://github.com/googleapis
python-spanner-sqlalchemyhttps://github.com/googleapis/python-spanner-sqlalchemy
Notifications https://github.com/login?return_to=%2Fgoogleapis%2Fpython-spanner-sqlalchemy
Fork 35 https://github.com/login?return_to=%2Fgoogleapis%2Fpython-spanner-sqlalchemy
Star 53 https://github.com/login?return_to=%2Fgoogleapis%2Fpython-spanner-sqlalchemy
Code https://github.com/googleapis/python-spanner-sqlalchemy
Issues 1 https://github.com/googleapis/python-spanner-sqlalchemy/issues
Pull requests 0 https://github.com/googleapis/python-spanner-sqlalchemy/pulls
Actions https://github.com/googleapis/python-spanner-sqlalchemy/actions
Projects https://github.com/googleapis/python-spanner-sqlalchemy/projects
Security and quality 0 https://github.com/googleapis/python-spanner-sqlalchemy/security
Insights https://github.com/googleapis/python-spanner-sqlalchemy/pulse
Code https://github.com/googleapis/python-spanner-sqlalchemy
Issues https://github.com/googleapis/python-spanner-sqlalchemy/issues
Pull requests https://github.com/googleapis/python-spanner-sqlalchemy/pulls
Actions https://github.com/googleapis/python-spanner-sqlalchemy/actions
Projects https://github.com/googleapis/python-spanner-sqlalchemy/projects
Security and quality https://github.com/googleapis/python-spanner-sqlalchemy/security
Insights https://github.com/googleapis/python-spanner-sqlalchemy/pulse
#290https://github.com/googleapis/python-spanner-sqlalchemy/pull/290
alembic incompatibility with sqlalchemy < 1.3.11 due to computed columnshttps://github.com/googleapis/python-spanner-sqlalchemy/issues/269#top
#290https://github.com/googleapis/python-spanner-sqlalchemy/pull/290
https://github.com/asthamohta
api: spannerIssues related to the googleapis/python-spanner-sqlalchemy API.https://github.com/googleapis/python-spanner-sqlalchemy/issues?q=state%3Aopen%20label%3A%22api%3A%20spanner%22
priority: p2Moderately-important priority. Fix may not be included in next release.https://github.com/googleapis/python-spanner-sqlalchemy/issues?q=state%3Aopen%20label%3A%22priority%3A%20p2%22
type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.https://github.com/googleapis/python-spanner-sqlalchemy/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%22
https://github.com/elainearbaugh
elainearbaughhttps://github.com/elainearbaugh
on Oct 13, 2022https://github.com/googleapis/python-spanner-sqlalchemy/issues/269#issue-1408469901
migration_test functionhttps://github.com/googleapis/python-spanner-sqlalchemy/blob/main/noxfile.py#L225
herehttps://github.com/googleapis/python-spanner-sqlalchemy/blob/main/google/cloud/sqlalchemy_spanner/sqlalchemy_spanner.py#L352-L353
release noteshttps://github.com/sqlalchemy/sqlalchemy/releases/tag/rel_1_3_11
code refhttps://github.com/sqlalchemy/sqlalchemy/compare/rel_1_3_10...rel_1_3_11#diff-04bfd5c1f4dc2b278cac4df823a4dca6fbb03a1c16d8dc7bb88714cf3858bce3R1347
asthamohtahttps://github.com/asthamohta
api: spannerIssues related to the googleapis/python-spanner-sqlalchemy API.https://github.com/googleapis/python-spanner-sqlalchemy/issues?q=state%3Aopen%20label%3A%22api%3A%20spanner%22
priority: p2Moderately-important priority. Fix may not be included in next release.https://github.com/googleapis/python-spanner-sqlalchemy/issues?q=state%3Aopen%20label%3A%22priority%3A%20p2%22
type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.https://github.com/googleapis/python-spanner-sqlalchemy/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.