-
Notifications
You must be signed in to change notification settings - Fork 134
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
Remove support for Python 3.8 (& fix failing MacOs 3.9 tests) #1192
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
752eb40
Remove 3.8 support
shaunagm a6812d0
Remove md5 security workaround (see issue #1138)
shaunagm c32fa7a
Attempt to Mac OS Python 3.9 limited dependencies issue
shaunagm cd3af5e
Remove uv from pip-install check
shaunagm 11d3ec1
Remove uv from pip-install check
shaunagm ccd0632
Remove unused inmport
shaunagm 57409f9
Remove extra spaces
shaunagm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
import logging | ||
import sys | ||
|
||
import petl | ||
|
||
|
@@ -659,20 +658,12 @@ def unpack_nested_columns_as_rows(self, column, key="id", expand_original=False) | |
orig.concat(melted_list) | ||
# Add unique id column by hashing all the other fields | ||
if "uid" not in self.columns: | ||
if sys.version_info.minor >= 9: | ||
orig.add_column( | ||
"uid", | ||
lambda row: hashlib.md5( | ||
str.encode("".join([str(x) for x in row])), usedforsecurity=False | ||
).hexdigest(), | ||
) | ||
elif sys.version_info.minor < 9: | ||
orig.add_column( | ||
"uid", | ||
lambda row: hashlib.md5( # nosec B324 | ||
str.encode("".join([str(x) for x in row])) | ||
).hexdigest(), | ||
) | ||
orig.add_column( | ||
"uid", | ||
lambda row: hashlib.md5( | ||
str.encode("".join([str(x) for x in row])), usedforsecurity=False | ||
).hexdigest(), | ||
) | ||
Comment on lines
+661
to
+666
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IDK what this section of code is, but these changes seem out of scope of this PR? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ohh I see, it's checking for the python version being 3.9 or higher |
||
orig.move_column("uid", 0) | ||
|
||
# Rename value column in case this is done again to this Table | ||
|
@@ -684,18 +675,12 @@ def unpack_nested_columns_as_rows(self, column, key="id", expand_original=False) | |
else: | ||
orig = self.remove_column(column) | ||
# Add unique id column by hashing all the other fields | ||
if sys.version_info.minor >= 9: | ||
melted_list.add_column( | ||
"uid", | ||
lambda row: hashlib.md5( | ||
str.encode("".join([str(x) for x in row])), usedforsecurity=False | ||
).hexdigest(), | ||
) | ||
elif sys.version_info.minor < 9: | ||
melted_list.add_column( | ||
"uid", | ||
lambda row: hashlib.md5(str.encode("".join([str(x) for x in row]))).hexdigest(), # nosec B324 | ||
) | ||
melted_list.add_column( | ||
"uid", | ||
lambda row: hashlib.md5( | ||
str.encode("".join([str(x) for x in row])), usedforsecurity=False | ||
).hexdigest(), | ||
) | ||
melted_list.move_column("uid", 0) | ||
output = melted_list | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check warning
Code scanning / Scorecard
Pinned-Dependencies Medium
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems solid and makes sense to me