PaloAltoNetworks / pan-os-python

The PAN-OS SDK for Python is a package to help interact with Palo Alto Networks devices (including physical and virtualized Next-generation Firewalls and Panorama). The pan-os-python SDK is object oriented and mimics the traditional interaction with the device via the GUI or CLI/API.
https://pan-os-python.readthedocs.io
ISC License
340 stars 168 forks source link

build: Replace dephell with poetry2setup #489

Closed btorresgil closed 1 year ago

btorresgil commented 1 year ago

dephell is no longer being maintained. dephell uses pyproject.toml to generate a setup.py file for pip to install the package. Long term this shouldn't matter because recent versions of pip can now install packages using pyproject.toml and don't care about setup.py.

However, there may be users who leverage pan-os-python in environments that don't use newer versions of pip, especially since we deprecated but haven't completely removed python 2.7 and 3.5 support.

Next steps after this PR:

  1. remove support for EOL python versions
  2. eliminate poetry2setup and setup.py
  3. ensure pyproject.toml has the necessary [build-system] configuration to be installed by pip
  4. do a major release of pan-os-python, since removing support for python versions is a breaking change
btorresgil commented 1 year ago

...seems to replace dephell well enough in terms of producing the setup.py file, just produces a smaller output.

Yeah, the smaller output was concerning cause it's missing normally critical parts like the 'classifiers'. But in looking deeper, it doesn't seem like Pypi or pip leverage the setup.py at all anymore, so having these parts missing won't affect anything. The setup.py going forward will only fill the gap for users who are on older versions of pip, which we have already deprecated and will remove support for in the future.

Just mentioning all this here for documentation purposes, and in case anyone finds an issue with this logic for their own environment.

github-actions[bot] commented 1 year ago

:tada: This PR is included in version 1.8.0 :tada:

The release is available on PyPI and GitHub release

Posted by semantic-release bot