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

Migrate away from pkg_resources as it's deprecated #46

Open
3 of 9 tasks
TheWitness opened this issue Jan 30, 2025 · 1 comment
Open
3 of 9 tasks

Migrate away from pkg_resources as it's deprecated #46

TheWitness opened this issue Jan 30, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@TheWitness
Copy link
Collaborator

Please confirm the following

  • I have checked the current issues for duplicates.
  • I understand that Ascender is open source software provided for free and that I might not receive a timely response.

Bug Summary

The pkg_resources package has been deprecated by setuptools 70.0.0 and above. We need to move Ascender away from it to any of the multitude of libraries that can emulate the functionality.

Ascender version

latest

Select the relevant components

  • UI
  • UI (tech preview)
  • API
  • Docs
  • Collection
  • CLI
  • Other

Installation method

N/A

Modifications

yes

Ansible version

core 2.14.17

Operating system

Linux

Web browser

No response

Steps to reproduce

Build the container with setuptools 70.0.0 and you receive these deprecation warnings that will need to be corrected moving forward.

Expected results

No warnings

Actual results

Warnings

Additional information

No response

@TheWitness
Copy link
Collaborator Author

What I have found in the code:

[root@vmhost10 ascender]# grep -r pkg_resources *
awx/__init__.py:    import pkg_resources
awx/__init__.py:    __version__ = pkg_resources.get_distribution('awx').version
awx/__init__.py:except pkg_resources.DistributionNotFound:
awx/main/db/profiled_pg/base.py:import pkg_resources
awx/main/db/profiled_pg/base.py:            version = pkg_resources.get_distribution('awx').version
grep: awx/main/db/profiled_pg/__pycache__/base.cpython-39.pyc: binary file matches
awx/main/models/credential/__init__.py:from pkg_resources import iter_entry_points
grep: awx/main/models/credential/__pycache__/__init__.cpython-39.pyc: binary file matches
awx/main/utils/common.py:        import pkg_resources
awx/main/utils/common.py:        return pkg_resources.require('awx')[0].version
grep: awx/main/utils/__pycache__/common.cpython-39.pyc: binary file matches
grep: awx/__pycache__/__init__.cpython-39.pyc: binary file matches
awxkit/awxkit/cli/client.py:import pkg_resources
awxkit/awxkit/cli/client.py:__version__ = pkg_resources.get_distribution('awxkit').version
tools/docker-compose/awx-manage:from pkg_resources import load_entry_point
tools/scripts/firehose.py:import pkg_resources
tools/scripts/firehose.py:    sys.path.insert(0, pkg_resources.get_distribution('awx').module_path)

@TheWitness TheWitness added the enhancement New feature or request label Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

1 participant