GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: Introduce compatibility with native namespace packages by parthea · Pull Request #375 · googleapis/python-spanner-sqlalchemy

This repository was archived by the owner on May 14, 2026. It is now read-only.

Conversation

@parthea

@parthea parthea commented Nov 14, 2023

Copy link
Copy Markdown
Contributor

This PR:

  • Migrates code to use native namespace packages similar to feat: Introduce compatibility with native namespace packages google-auth-library-python#1205. Also see https://packaging.python.org/en/latest/guides/packaging-namespace-packages/#native-namespace-packages
  • Removes usage of pkg_resources to prepare for adding python 3.12 support
  • Moves the version module to google/cloud/sqlalchemy_spanner

To obtain the version at runtime, use google.cloud.sqlalchemy_spanner.__version__

(py39) partheniou@partheniou-vm-3:~/git/python-spanner-sqlalchemy$ python3
Python 3.9.16 (main, Mar  2 2023, 17:52:22) 
[GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import google.cloud.sqlalchemy_spanner 
>>> google.cloud.sqlalchemy_spanner.__version__
'1.6.2'

Fixes #337 🦕

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@product-auto-label product-auto-label Bot added the api: spanner Issues related to the googleapis/python-spanner-sqlalchemy API. label Nov 14, 2023
@parthea
parthea force-pushed the migrate-to-native-namespace-packages branch 2 times, most recently from fdcceeb to 1547b36 Compare November 14, 2023 16:00
@parthea

parthea commented Nov 14, 2023

Copy link
Copy Markdown
Contributor Author

Adding do not merge as there is an upcoming release freeze. This should be merged after the release freeze ends on November 29th.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@parthea parthea added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Nov 14, 2023
@parthea
parthea force-pushed the migrate-to-native-namespace-packages branch 3 times, most recently from f795ed5 to 29285a5 Compare November 14, 2023 16:19
@harshachinta

harshachinta commented Jan 16, 2024

Copy link
Copy Markdown
Contributor

Hi @parthea,
The python-spanner-sqlalchemy presubmits are failing with below error after the latest 3.41.0 release of python-spanner,

ModuleNotFoundError: No module named 'google.cloud.spanner_v1'

From my analysis below, it looks like this PR should be merged for the presubmits to not face this issue.

Analysis

  1. I wrote a sample Python application with python-spanner 3.41.0 as dependency (Assuming python-spanner release is the issue), but the application did not face this import issue and was working perfectly.
  2. This should be some issue with the python-spanner-sqlalchemy package setup. Analyzing more pointed out to this PR which is in draft stage. We did the same change in python-spanner in the latest release.
  3. I checked out this PR on my local and ran presubmits. The above import issue was not seen. I think we should merge this PR to have similar package setup as python-spanner.

cc: @ankiaga @olavloite

parthea reacted with eyes emoji
All reactions
  • 👀 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@harshachinta harshachinta mentioned this pull request Jan 16, 2024
feat: Introduce compatibility with native namespace packages googleapis/python-spanner#1036
Merged
@parthea

parthea commented Jan 16, 2024

Copy link
Copy Markdown
Contributor Author

@harshachinta,

Please can you check if the issue is resolved with this PR which removes editable installations from tests? #383

There are limitations for editable installations, and this type of installation is still listed as experimental on pypa.io:
https://setuptools.pypa.io/en/latest/userguide/development_mode.html#limitations

We may be able to improve support for editable installations by switching to a src layout instead of a flat layout.
googleapis/google-cloud-python#12078

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@parthea
feat: Introduce compatibility with native namespace packages
6e19a4f
@parthea
parthea force-pushed the migrate-to-native-namespace-packages branch from 29285a5 to 6e19a4f Compare June 5, 2025 10:40
parthea added 2 commits June 5, 2025 10:41
@parthea
lint
b89e0af
@parthea
lint
3d6a80c
@parthea parthea removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Jun 5, 2025
@parthea
parthea marked this pull request as ready for review June 5, 2025 10:43
@parthea
lint
da73c5e
@parthea parthea added kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Jun 5, 2025
@yoshi-kokoro yoshi-kokoro removed kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Jun 5, 2025
@parthea
parthea requested a review from olavloite June 5, 2025 10:53
@parthea parthea assigned olavloite Jun 5, 2025
olavloite
olavloite approved these changes Jun 5, 2025
View reviewed changes
@olavloite
olavloite merged commit 052e699 into main Jun 5, 2025
@olavloite
olavloite deleted the migrate-to-native-namespace-packages branch June 5, 2025 11:03
@release-please release-please Bot mentioned this pull request Jun 5, 2025
chore(main): release 1.13.0 #688
Merged
This was referenced Jun 5, 2025
Python 3.12 Support #546
Closed
chore: Release candidate v1.13.0rc0 #689
Closed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

1 more reviewer
@olavloite olavloite olavloite approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@olavloite olavloite

Labels

api: spanner Issues related to the googleapis/python-spanner-sqlalchemy API.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

version.py missing from source on PyPI

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@parthea @harshachinta @olavloite @yoshi-kokoro
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.