Closed hwhesselink closed 4 years ago
Best reviewed: commit by commit
Powered by Pull Assistant. Last update c879b8f ... 0b63373. Read the comment docs.
I just submitted a PR to remove Wheezy from testing.
Agreed, using dictsort is a cleaner solution, I've updated the PR.
Haven't checked this PR in any detail but please be aware of the various issues surrounding |dictsort
and .items()
here:
Hi @myii, the |dictsort
change only applies to the zone and interface names. They are always strings, and the sort order doesn't matter (the previous iteritems
and items
also don't sort), so I don't think there are issues in this case. I've been using the code in production for a while.
Thanks for merging the "Drop wheezy testing" PR. Travis is still failing with that test atm, do I need to do anything to this PR to update the testing?
Hi @myii, the
|dictsort
change only applies to the zone and interface names. They are always strings, and the sort order doesn't matter (the previousiteritems
anditems
also don't sort), so I don't think there are issues in this case. I've been using the code in production for a while.
@hwhesselink That should be absolutely fine, then. I'll just let @vutny confirm and merge this.
Thanks for merging the "Drop wheezy testing" PR. Travis is still failing with that test atm, do I need to do anything to this PR to update the testing?
You're welcome. There are two ways that we could proceed:
wheezy
failure here.Essentially, don't worry about it in this particular PR but you may need to use option 1 elsewhere.
... (the previous
iteritems
anditems
also don't sort)
Just a note, as mentioned here, .items()
isn't random anymore since around Python 3.6.
@myii, great, I'll wait for the merge.
My original PR actually used .items()
but I changed it to use |dictsort
based on @vutny's comment earlier in this thread. Both work fine.
After this is merged I'll submit a larger patch to update the formula to work with Shorewall v5.
Any final comments, @vutny? Would you mind merging if this is ready to go?
Merged, thanks for the PR @hwhesselink and for the review @vutny.
PR progress checklist (to be filled in by reviewers)
What type of PR is this?
Primary type
[build]
Changes related to the build system[chore]
Changes to the build process or auxiliary tools and libraries such as documentation generation[ci]
Changes to the continuous integration configuration[feat]
A new feature[fix]
A bug fix[perf]
A code change that improves performance[refactor]
A code change that neither fixes a bug nor adds a feature[revert]
A change used to revert a previous commit[style]
Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)Secondary type
[docs]
Documentation changes[test]
Adding missing or correcting existing testsDoes this PR introduce a
BREAKING CHANGE
?No.
Related issues and/or pull requests
Describe the changes you're proposing
Python3 dropped iteritems, this PR changes them to items. The only downside to items is that, because it's not a generator, it doesn't handle large dataset well. Given that the changes are for the interfaces and zones files I don't believe that will be an issue.
BTW, the Travis CI check is failing on Wheezy because Debian no longer supports it so the build env. download isn't found.
Pillar / config required to test the proposed changes
Debug log showing how the proposed changes work
Documentation checklist
README
(e.g.Available states
).pillar.example
.Testing checklist
state_top
).Additional context