-
Notifications
You must be signed in to change notification settings - Fork 7
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
Port to Python 3 #278
Merged
Port to Python 3 #278
Changes from 41 commits
Commits
Show all changes
60 commits
Select commit
Hold shift + click to select a range
bede3e7
bump to the now-current nixpkgs release
exarkun 96e4c46
parameterize python version in the nix package
exarkun 22b0a17
fix problem with the new collections-extended dependency
exarkun d844ded
fix problem with the new cryptography build system
exarkun 5bfcb79
fix the new conditional foolscap dependency
exarkun b3bacf4
update the pypi database to get fresh-enough versions
exarkun b7f22fc
add source for the now-current nixos release
exarkun 013d873
bump the shell environment nixos release as well
exarkun cd120f3
respect the chosen python version in the tests and lint tools
exarkun 0a0fe9d
nope, use python39 for lint because tools are missing from py27 ecosy…
exarkun 96137fe
switch to flake8 to be able to suppress warnings
exarkun 244cc32
switch from the nixos release tag to branch
exarkun 86a8aa1
fix nixpkgs pkgconfig so mach-nix works at all
exarkun 2bd1f45
initial porting changes
exarkun fc5684e
black
exarkun ed8e0a0
isort
exarkun c123df9
add python3.9 to the ci testing matrix
exarkun f296f9e
fix all the noqa comments
exarkun 71658b3
more packaging fixes
exarkun 4b5824b
changes for a passing test suite on 2.7 and 3.8
exarkun 890e67d
add a test for using the test vector feature
exarkun 4dc239c
provide a shell where we can run tests, not just linters
exarkun 61dc80d
strip explicit Python 2 support from the Nix packaging
exarkun 4c29995
Drop Python 2 from the CI matrix
exarkun bf7c312
commit to Python 3 for json.dumps
exarkun 36667f6
drop __future__ and future imports
exarkun 11a5df5
remove six and future dependency, also isort and black
exarkun 0e489fa
update packaging metadata
exarkun 2c88272
Merge remote-tracking branch 'origin/main' into python3
exarkun aab21d0
drop py27 support from macos ci
exarkun a990635
parameterize python version in nixos ci
exarkun 11b4cc2
drop our copy of some eliot functions that we can now use from upstream
exarkun ec1bf28
switch GitHub Actions to Python 3.9 as well
exarkun ba62031
incompatible version formats ...
exarkun adf0b03
maybe this runs the configs I want
exarkun a24eeee
nope, how about this
exarkun 9ce11d0
spurious mapping
exarkun 9936c1f
normalize the CircleCI job names
exarkun cc70a9c
Drop the workaround for the problem with older prometheus_client
exarkun a8225b0
let setrlimit fail :/
exarkun 6d098bc
Add a test for `get_root_nodes` and fix the implementation
exarkun 1f134f9
match the exact expected length
exarkun 5d2670e
more general reasoning about special cases for provider choices
exarkun 46fa124
replace typing comments with syntax
exarkun f6591cb
base64 encoded tokens are always ascii
exarkun 92ba74c
required_passes is content with dict_values now
exarkun c621b05
use f"" to simplify some string construction
exarkun ea07a48
cleanup stray keystroke
exarkun f7f0c93
Use FilePath instead of os.path
exarkun 14956bf
get rid of past.builtins.long usage
exarkun 34e05c2
drop the silly decode/encode dance for all the binding messages
exarkun 22b0014
fixup comment in new test
exarkun 1ebff29
Use auto_attribus on a couple exception types
exarkun 67072ba
Compare dict keys directly instead of via a set conversion
exarkun 39985b1
It's already a text-mode FilePath, right?
exarkun 4ddd84c
Pin Tahoe-LAFS exactly because we use an unofficial/unstable interface
exarkun 4f59ff8
widen the required range to allow the Nix package
exarkun 209c83c
link to twisted tickets related to this
exarkun 7581149
Use __future__.annotations
exarkun cb771a9
remove one more unnecessary asBytesMode call
exarkun 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
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
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Copyright 2022 PrivateStorage.io, LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
from json import dumps as _dumps | ||
from typing import Any | ||
|
||
|
||
def dumps_utf8(o: Any) -> bytes: | ||
""" | ||
Serialize an object to a UTF-8-encoded JSON byte string. | ||
""" | ||
return _dumps(o).encode("utf-8") |
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.
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.
Given that we pass in release 2105 in PrivateStorageio, I don't think we should be making this change here (at least not without also testing 2105 in CI for the moment.
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.
I think it will be easier to advance to 21.11 in PrivateStorageio than to back this up to 21.05. There are some build failures in our dependencies on 21.05 that aren't interesting in any way once we're up to 21.11 and will be annoying to fix. Since ZKAPAuthorizer is supplying Tahoe-LAFS, the fact that everything is working on 21.11 seems like a pretty strong signal that upgrading PrivateStorageio to 21.11 (at least for Tahoe-LAFS/ZKAPAuthorizer) will be straightforward. Although it is true I haven't really tried it out yet. I could do that before committing to this upgrade to confirm that is going to be the easier path.