Skip to content
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

Remove the sys path hacks (again) to fix edge cases with keyring #5732

Merged
merged 3 commits into from
Jun 12, 2023

Conversation

matteius
Copy link
Member

@matteius matteius commented Jun 11, 2023

The issue

Fixes #5719
Fixes #4706

The fix

When we added back the hack to the sys.path it broke the google keyring support, I verified this -- because the appropriate requests package module cannot be found (strangely). My goal has bene to eliminate these path patchces for a while and there were a couple reasons I had to add them back recent which I think have since been resolved:
1.) pydantic was getting an import error on typing_extensions, but the latest vendor'd pydantic seems to have cleaner imports which got re-written to use the right vendor path.
2.) pipdeptree prior version was getting an error on pipenv graph but it seems like the new version of pipdeptrees may be immune.

I verified that removing this path allows the google keyring stuff to work again.

It still requires that keyring and keyrings.google-artifactregistry-auth be either installed in virtualenv or the virtualenv has access to the system-site-packages.

Additionally, this change allows the sync command to use the --site-packages flag as well, for which I know there is an issue request in our backlog for this. You shouldn't have to relock to create a virtualenv that uses that flag.

The checklist

  • Associated issue
  • A news fragment in the news/ directory to describe this fix with the extension .bugfix.rst, .feature.rst, .behavior.rst, .doc.rst. .vendor.rst. or .trivial.rst (this will appear in the release changelog). Use semantic line breaks and name the file after the issue number or the PR #.

@matteius matteius changed the title Remove the sys path hacks (again) to see where things break. Remove the sys path hacks (again) to fix edge cases with keyring Jun 11, 2023
@matteius matteius requested a review from oz123 June 11, 2023 20:30
@oz123
Copy link
Contributor

oz123 commented Jun 11, 2023

  @matteius this just needs a news snippet.

@matteius matteius merged commit 1cc03ea into main Jun 12, 2023
@matteius matteius deleted the issue-5719 branch June 12, 2023 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants