Skip to content

Python: Add testcase for import problem#10176

Merged
tausbn merged 2 commits into
github:mainfrom
RasmusWL:import-problem
Sep 6, 2022
Merged

Python: Add testcase for import problem#10176
tausbn merged 2 commits into
github:mainfrom
RasmusWL:import-problem

Conversation

@RasmusWL
Copy link
Copy Markdown
Member

Apparently ordering is currently important when using import * 😬 We should fix that, but here is a test-case to reproduce 😊

@RasmusWL RasmusWL marked this pull request as ready for review August 25, 2022 13:56
@RasmusWL RasmusWL requested a review from a team as a code owner August 25, 2022 13:56
Copy link
Copy Markdown
Contributor

@tausbn tausbn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this comprehensive test case! 👍

@tausbn tausbn merged commit 3bb7e28 into github:main Sep 6, 2022
@RasmusWL RasmusWL deleted the import-problem branch September 8, 2022 09:58
RasmusWL added a commit to RasmusWL/codeql that referenced this pull request Feb 23, 2023
It's nice that it fixes the `InsecureProtocol` test-case (which maybe
should have been a test-case for the import resolution library in the
first place?)

But it's not quite right:

1. it adds spurious flow for `clashing_attr`
2. it runs into huge problems for typetracking_imports/tracked.expected
3. it runs into the problem for
   github#10176 with an `from <pkg>
   import *` blocking flow from previously defined variable, that is NOT
   overridden. (simplistic_reexport.bar_attr)
dilanbhalla pushed a commit to microsoft/codeql that referenced this pull request Apr 20, 2023
It's nice that it fixes the `InsecureProtocol` test-case (which maybe
should have been a test-case for the import resolution library in the
first place?)

But it's not quite right:

1. it adds spurious flow for `clashing_attr`
2. it runs into huge problems for typetracking_imports/tracked.expected
3. it runs into the problem for
   github#10176 with an `from <pkg>
   import *` blocking flow from previously defined variable, that is NOT
   overridden. (simplistic_reexport.bar_attr)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants