Skip to content

Conversation

@antoniovazquezblanco
Copy link
Contributor

@antoniovazquezblanco antoniovazquezblanco commented Feb 8, 2025

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
  • I executed the regression tests (using cd test && ./run_tests or tox)
  • If the PR is still not finished, please create a Draft Pull Request

I was thinking on being able to provide feedback on progress while reading PCAP files. I looked at the code of the reader metaclass an thought it could be refactored to be a little simpler to understand...

This changes introduce a behaviour change so this PR is kind not necessary at all, changes the behaviour and all in order to maybe make the code slightly more readable...

Let me know if this is clearly a no go or if there may be a chance.

Thanks!

@antoniovazquezblanco antoniovazquezblanco marked this pull request as draft February 8, 2025 15:16
@antoniovazquezblanco antoniovazquezblanco force-pushed the reader branch 4 times, most recently from 13dda53 to 1b09330 Compare February 8, 2025 15:31
@codecov
Copy link

codecov bot commented Feb 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.55%. Comparing base (c15a670) to head (4bc91a2).
Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4661      +/-   ##
==========================================
- Coverage   81.55%   81.55%   -0.01%     
==========================================
  Files         359      359              
  Lines       86557    86559       +2     
==========================================
- Hits        70592    70589       -3     
- Misses      15965    15970       +5     
Files with missing lines Coverage Δ
scapy/utils.py 73.56% <100.00%> (+0.02%) ⬆️

... and 6 files with indirect coverage changes

@gpotter2
Copy link
Member

Hi, thanks for the PR !
I'm honnestly not convinced this is simpler, and tend to prefer the way it was before. Sorry :(

@antoniovazquezblanco
Copy link
Contributor Author

Nothing to be sorry about :)

My reasoning was that this isolates the two things performed in the function and thus may be easier to read and or maybe perform testing.

Please, let me know if there is anything that may improve the idea or if you have some other feedback. Also, feel free to close this PR, as I said in my previous comment, I expected this to not be merged for various reasons.

Thanks for your time :)

@gpotter2 gpotter2 closed this Feb 22, 2025
@antoniovazquezblanco antoniovazquezblanco deleted the reader branch October 20, 2025 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants