-
-
Notifications
You must be signed in to change notification settings - Fork 15.5k
matrix-synapse: prepare for python3 switch #49858
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
Conversation
@GrahamcOfBorg test matrix-synapse |
Since affinity is no longer a dependency of synapse, I think it should just be removed outright; it has not been updated for more than a decade and does not appear to be referenced by any other expression. |
Removing affinity should be done in a separate PR IMHO so I just dropped the commit from here. |
Success on aarch64-linux (full log) Attempted: matrix-synapse Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: matrix-synapse Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: tests.matrix-synapse Partial log (click to expand)
|
buildInputs = with python2Packages; [ | ||
mock setuptoolsTrial | ||
]; | ||
buildInputs = [ mock setuptoolsTrial ]; |
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.
checkInputs
?
pkgs/top-level/all-packages.nix
Outdated
@@ -3720,7 +3720,9 @@ with pkgs; | |||
|
|||
makebootfat = callPackage ../tools/misc/makebootfat { }; | |||
|
|||
matrix-synapse = callPackage ../servers/matrix-synapse { }; | |||
matrix-synapse = callPackage ../servers/matrix-synapse { | |||
python = python2; |
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'd prefer not having this here but instead use python2
as an argument.
However, I think that comes down to personal preference.
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.
Well, if the point is to allow switching to python3
and it's almost there, doesn't it make sense to take python
? Until the switch can be complete and we can take python3
as an argument :)
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.
Alright, why not.
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.
One could have inside the expression:
let
python = python2;
in ...
The idea is to keep all-packages.nix
as clean as possible.
With this commit, we *can* swap python2 for python3 to run synapse using python3 instead. The reason for not making the switch is that a number of CLI tools provided with synapse do not yet work under py3 despite synapse running fine. So this doesn't actually do anything on its own except to prepare for the upcoming py3 switch.
I hope this iteration is more to everyone's liking. Please note that from 0.34.0, py3 is the recommended python ref matrix-org/synapse#4036 |
Success on x86_64-linux (full log) Attempted: matrix-synapse Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: matrix-synapse Partial log (click to expand)
|
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.
LGTM
Motivation for this change
Performance on a low-specced machine is not great, so enable move to py3 which upstream recommends.
I have not benchmarked it.
GH was wonky, so I had to create a new PR: #48695
Apologies for the noise.
Cc: @dotlambda @Ekleog @Ralith
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)