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

Use find_namespace_packages to get needed subdirectories to silent lots of warnings #4457

Merged
merged 7 commits into from Sep 14, 2022

Conversation

jcwchen
Copy link
Member

@jcwchen jcwchen commented Aug 18, 2022

Description

Use find_namespace_packages instead of find_packages to silent lots of warnings.

Motivation and Context

Currently there is a lot of warnings about using find_packages by setuptools in CIs. Related discussion: pypa/setuptools#3340.

Warning message is like:

2022-08-24T04:07:24.6253054Z /opt/python/cp38-cp38/lib/python3.8/site-packages/setuptools/command/build_py.py:202: SetuptoolsDeprecationWarning:     Installing 'onnx.backend.test.data.node.test_blackmanwindow.test_data_set_0' as data is deprecated, please list it in `packages`.
2022-08-24T04:07:24.6253649Z     !!
2022-08-24T04:07:24.6253751Z 
2022-08-24T04:07:24.6253758Z 
2022-08-24T04:07:24.6253879Z     ############################
2022-08-24T04:07:24.6254179Z     # Package would be ignored #
2022-08-24T04:07:24.6254472Z     ############################
2022-08-24T04:07:24.6255051Z     Python recognizes 'onnx.backend.test.data.node.test_blackmanwindow.test_data_set_0' as an importable package,
2022-08-24T04:07:24.6255554Z     but it is not listed in the `packages` configuration of setuptools.
2022-08-24T04:07:24.6255793Z 
2022-08-24T04:07:24.6449836Z     'onnx.backend.test.data.node.test_blackmanwindow.test_data_set_0' has been automatically added to the distribution only
2022-08-24T04:07:24.6450376Z     because it may contain data files, but this behavior is likely to change
2022-08-24T04:07:24.6450924Z     in future versions of setuptools (and therefore is considered deprecated).
2022-08-24T04:07:24.6451188Z 
2022-08-24T04:07:24.6638863Z     Please make sure that 'onnx.backend.test.data.node.test_blackmanwindow.test_data_set_0' is included as a package by using
2022-08-24T04:07:24.6639566Z     the `packages` configuration field or the proper discovery methods
2022-08-24T04:07:24.6641711Z     (for example by using `find_namespace_packages(...)`/`find_namespace:`
2022-08-24T04:07:24.6646818Z     instead of `find_packages(...)`/`find:`).
2022-08-24T04:07:24.6647071Z 
2022-08-24T04:07:24.6647296Z     You can read more about "package discovery" and "data files" on setuptools
2022-08-24T04:07:24.6647633Z     documentation page.
2022-08-24T04:07:24.6647874Z 
2022-08-24T04:07:24.6647882Z 
2022-08-24T04:07:24.6647990Z !!

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
@jcwchen jcwchen added build Issues related to ONNX builds and packages CI pipelines Issues related to the CI pipeline labels Aug 18, 2022
@jcwchen jcwchen requested a review from a team as a code owner August 18, 2022 18:15
@jcwchen jcwchen added the run release CIs Use this label to trigger release tests in CI label Aug 18, 2022
@jcwchen jcwchen closed this Aug 18, 2022
@jcwchen jcwchen reopened this Aug 18, 2022
Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
@jcwchen jcwchen changed the title [WIP] Use find_namespace_packages instead of find_packages to silent lots of warnings Use find_namespace_packages to get needed subdirectories to silent lots of warnings Aug 24, 2022
Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
@jcwchen jcwchen enabled auto-merge (squash) September 14, 2022 21:26
@jcwchen jcwchen merged commit a252e65 into onnx:main Sep 14, 2022
@jcwchen jcwchen deleted the jcw/remove-setup-warings branch September 14, 2022 22:33
prasanthpul pushed a commit that referenced this pull request Oct 5, 2022
…ts of warnings (#4457)

* use find_namespace_packages instead of find_packages

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>

* specifiy data

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>

* specify needed dirs

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>

* fix flake8

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>

* remove unnecessary set

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>

* fix black

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
Signed-off-by: Prasanth Pulavarthi <prasanth.pulavarthi@microsoft.com>
prasanthpul pushed a commit that referenced this pull request Jan 26, 2023
…ts of warnings (#4457)

* use find_namespace_packages instead of find_packages

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>

* specifiy data

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>

* specify needed dirs

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>

* fix flake8

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>

* remove unnecessary set

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>

* fix black

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
Signed-off-by: Prasanth Pulavarthi <prasanth.pulavarthi@microsoft.com>
prasanthpul pushed a commit that referenced this pull request Jan 26, 2023
…ts of warnings (#4457)

* use find_namespace_packages instead of find_packages

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>

* specifiy data

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>

* specify needed dirs

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>

* fix flake8

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>

* remove unnecessary set

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>

* fix black

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
Signed-off-by: Prasanth Pulavarthi <prasanth.pulavarthi@microsoft.com>
broune pushed a commit to broune/onnx that referenced this pull request May 6, 2023
…ts of warnings (onnx#4457)

* use find_namespace_packages instead of find_packages

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>

* specifiy data

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>

* specify needed dirs

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>

* fix flake8

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>

* remove unnecessary set

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>

* fix black

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues related to ONNX builds and packages CI pipelines Issues related to the CI pipeline run release CIs Use this label to trigger release tests in CI
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants