Skip to content

feat: Introduce compatibility with native namespace packages #375

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 5, 2025

Conversation

parthea
Copy link
Contributor

@parthea parthea commented Nov 14, 2023

This PR:

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 🦕

@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
Copy link
Contributor Author

parthea commented Nov 14, 2023

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

@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
Copy link
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
Copy link
Contributor Author

parthea commented Jan 16, 2024

@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

@parthea parthea force-pushed the migrate-to-native-namespace-packages branch from 29285a5 to 6e19a4f Compare June 5, 2025 10:40
@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 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
@olavloite olavloite merged commit 052e699 into main Jun 5, 2025
17 checks passed
@olavloite olavloite deleted the migrate-to-native-namespace-packages branch June 5, 2025 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the googleapis/python-spanner-sqlalchemy API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

version.py missing from source on PyPI
4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy