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

Flip the value of --experimental_python_import_all_repositories to false and remove the flag #2636

Open
lberki opened this issue Mar 6, 2017 · 8 comments
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) team-Rules-Python Native rules for Python type: process

Comments

@lberki
Copy link
Contributor

lberki commented Mar 6, 2017

Filing a bug here so that we don't forget to get rid of Yet Another Command Line Option.

@lberki lberki added the P2 We'll consider working on this in future. (Assignee optional) label Mar 6, 2017
@lberki lberki added this to the 0.5 milestone Mar 6, 2017
@damienmg damienmg added P1 I'll work on this now. (Assignee required) category: rules > python type: feature request and removed P2 We'll consider working on this in future. (Assignee optional) labels Mar 6, 2017
@damienmg
Copy link
Contributor

damienmg commented Apr 4, 2017

Ok I won't manage to fix everything for that change so I am rescheduling it for 0.6

@damienmg damienmg modified the milestones: 0.6, 0.5 Apr 4, 2017
@aj-michael
Copy link
Contributor

cc @vsethia and @ahumesky

FYI, this change will heavily affect the Android testing infrastructure (android_device) that is being open sourced at https://github.com/google/android-testing-support-library. It is mostly in Python and has several external repositories that it imports from.

@damienmg damienmg modified the milestones: 0.7, 0.6 Jul 25, 2017
@damienmg damienmg removed their assignment Dec 14, 2017
@brandjon brandjon added P3 We're not considering working on this, but happy to review a PR. (No assignee) type: process team-Rules-Python Native rules for Python and removed P1 I'll work on this now. (Assignee required) category: rules > python type: feature request labels Oct 17, 2018
@brandjon
Copy link
Member

This is an interesting situation, in that we know we want to ban the old behavior and we even already have a flag to do it, but the new behavior doesn't have a complete story yet. See #7067.

In the meantime, we might go ahead and rename this to --incompatible_repo_roots_are_not_on_pythonpath (inverting the meaning) and make it available as an incompatible change, even though flipping it is blocked on more feature work being done. :-/

@guillaumep
Copy link

I just ran into an issue running Bazel that I tracked down to this flag.
I am packaging the PY2 and PY3 version of an app together, allowing us to start testing the PY3 version on staging environments while still running the PY2 version in prod.

When this flag is set to true, the PY3 version has PY2 dependencies in its PYTHONPATH, causing issues starting the application (the exact issue being that PY2 deps have the enum34 package which causes issues when using Python 3).

So just a note that this flag can cause some very unexpected behaviours.

@person142
Copy link

person142 commented Apr 21, 2021

The current behavior also causes strangeness in rules_python-see bazelbuild/rules_python#414 (comment) e.g.

Would adding the --incompatible_repo_roots_are_not_on_pythonpath flag to disable the behavior as suggested by #2636 (comment) be an acceptable way to get the ball rolling again here? (i.e. would a PR doing that be accepted?)

@rickeylev
Copy link
Contributor

cc @rickeylev

@amir-f
Copy link

amir-f commented Sep 13, 2023

Any updates? I'm here because of this issue

@fmeum
Copy link
Collaborator

fmeum commented Sep 14, 2023

--enable_bzlmod currently relies on this flag value as it mangles the repository names to something you can't reliably import in Python.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) team-Rules-Python Native rules for Python type: process
Projects
None yet
Development

No branches or pull requests

10 participants