Skip to content

Remove providers/_init__.py#43187

Closed
potiuk wants to merge 1 commit intoapache:mainfrom
potiuk:remove-providers-init
Closed

Remove providers/_init__.py#43187
potiuk wants to merge 1 commit intoapache:mainfrom
potiuk:remove-providers-init

Conversation

@potiuk
Copy link
Copy Markdown
Member

@potiuk potiuk commented Oct 19, 2024

Removed the __init__.py file from "providers" directory, it is not needed there, because "providers" is just a folder where we keep provider files, it's not a Python package.

Also this PR fixes a few other teething problems with setup of tests that were introcuded in #42505 and #43802 "masked" by having __init__.py added in providers package:

  • common.sql interface pre-commit used wrong path to generated files
  • openlineage extractor test that should not expect "providers.tests." but "tests." package
  • common_sql_api_stubs wrongly calculating generated path for stub-generated files
  • pytest_plugin expecting .asf.yml in "airflow" sources - even during compatibility tests with older version of airflow (where the .asf.yml is not present)

^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

Removed the `__init__.py` file from "providers" directory,
it is not needed there, because "providers" is just a folder where
we keep provider files, it's not a Python package.

Also this PR fixes a few other teething problems with setup of
tests that were introcuded in apache#42505 and apache#43802 "masked" by having
`__init__.py` added in providers package:

* common.sql interface pre-commit used wrong path to generated files
* openlineage extractor test that should not expect "providers.tests.*"
  but "tests.*" package
* common_sql_api_stubs wrongly calculating generated path for
  stub-generated files
* pytest_plugin expecting .asf.yml in "airflow" sources - even during
  compatibility tests with older version of airflow (where the
  .asf.yml is not present)
@potiuk
Copy link
Copy Markdown
Member Author

potiuk commented Oct 19, 2024

Ah it is not that easy indeed :(

@potiuk
Copy link
Copy Markdown
Member Author

potiuk commented Oct 19, 2024

Closing for now until #42632 is fixed - I forgot about it.

@potiuk potiuk closed this Oct 19, 2024
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.

1 participant