Skip to content

Conversation

@KOLANICH
Copy link
Contributor

Added pyproject.toml

Checklist:

  • If you are new to Scapy: I have checked CONTRIBUTING.md (esp. section submitting-pull-requests)
  • I squashed commits belonging together
  • I added unit tests or explained why they are not relevant - just package building
  • I executed the regression tests for Python2 and Python3 (using tox or, cd test && ./run_tests_py2, cd test && ./run_tests_py3) - not needed
  • If the PR is still not finished, please create a Draft Pull Request

Moves the metadata into the declarative config according to PEP 621, which is more editable and readable with automatic tools and somewhen in future will allow to forbid setup.py as an unjustified potential security threat.

@codecov
Copy link

codecov bot commented Jun 27, 2022

Codecov Report

Merging #3664 (07ae0b5) into master (9473f77) will increase coverage by 0.00%.
The diff coverage is n/a.

❗ Current head 07ae0b5 differs from pull request most recent head 71e1633. Consider uploading reports for the commit 71e1633 to get more accurate results

@@           Coverage Diff           @@
##           master    #3664   +/-   ##
=======================================
  Coverage   84.57%   84.57%           
=======================================
  Files         296      296           
  Lines       62214    62267   +53     
=======================================
+ Hits        52616    52663   +47     
- Misses       9598     9604    +6     
Impacted Files Coverage Δ
scapy/__init__.py 74.54% <0.00%> (-1.82%) ⬇️
scapy/arch/windows/__init__.py 67.16% <0.00%> (-0.56%) ⬇️
scapy/contrib/isotp/isotp_soft_socket.py 82.53% <0.00%> (-0.39%) ⬇️
scapy/contrib/automotive/ecu.py 92.00% <0.00%> (-0.34%) ⬇️
scapy/packet.py 82.66% <0.00%> (+0.07%) ⬆️
scapy/pipetool.py 84.32% <0.00%> (+0.22%) ⬆️
scapy/volatile.py 86.05% <0.00%> (+0.78%) ⬆️

Copy link
Member

@gpotter2 gpotter2 left a comment

Choose a reason for hiding this comment

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

Thanks for the PR.
I like modern stuff so I quite like it. Regarding compatibility: onekey-sec/arpy#18 (comment) (we still support Python 2.7...)

@gpotter2 gpotter2 requested a review from guedou June 27, 2022 11:04
@KOLANICH
Copy link
Contributor Author

Moves the metadata into the declarative config according to PEP 621,

Oops, forgot to add it. But given

(we still support Python 2.7...)

Should I land the second commit converting setup.cfg into pyproject.toml too? It will make the wheel unbuildable on python 2 (the wheel still should be installable and workable, since the code inside supports py2 and the metadata in wheel says it does), but python 2 ... has been officially dropped for several years and BTW there were no real reasons to use python 2 even in 2013. So, I think, if one uses python 2, it should be his personal issue that he cannot build a wheel and has to use workarounds like fetching prebuilt wheels from pypi, unzipping it, replacing the sources and zipping them back. As long as these kind of workarounds work, we can consider python 2 support not dropped.

@gpotter2
Copy link
Member

We are currently looking towards releasing Scapy 2.5.0 which should be the last version to support Python 2.7 (at least I'd like so).
We'll wait for that before breaking building on 2.7

@KOLANICH
Copy link
Contributor Author

OK. In the current state this PR should support 2.7.

@KOLANICH KOLANICH force-pushed the pyproject.toml branch 2 times, most recently from d5034d2 to 34f715e Compare June 29, 2022 14:17
@polybassa polybassa added the cleanup Performs some code clean-up label Jul 11, 2022
@polybassa
Copy link
Contributor

LGTM

Added `pyproject.toml`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cleanup Performs some code clean-up

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants