Skip to content
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

Flexget: 2.17.14 -> 2.17.20 & Python: 2.7 -> 3.6 #52529

Closed
wants to merge 1 commit into from
Closed

Flexget: 2.17.14 -> 2.17.20 & Python: 2.7 -> 3.6 #52529

wants to merge 1 commit into from

Conversation

sjau
Copy link

@sjau sjau commented Dec 19, 2018

Motivation for this change

Flexget fails on current master because of Cherrypy for python 2.7, so updated flexget to using python 3.6 and updated it to v2.17.20

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

'';

# ~400 failures
doCheck = false;

propagatedBuildInputs = [
python27
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not look right.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it needs python2.7 for teh deluge plugin. Taking it out will cause build fail.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then, that plugin has to be removed. We can't have two python versions in here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why should it be removed? Deluge is a different tool.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know what deluge is nor do I care. It's simple: Either python36 or python27 has to removed from the expression.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, can you please once again explain why and where python27 is needed? Maybe we can find a solution.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because it's needed for deluge and the deluge plugin.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A little detail would be appreciated. E.g., why did you put it in propagatedBuildInputs. Can you point me to some source code that explains this requirement?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

try to build it without. Then try to build it with it. I don't speak python. I'm just a user of flexget.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case, you're probably not the right one to do this. An alternative might be to keep using Python 2.7 and override the cherrypy version.

Copy link
Member

@dotlambda dotlambda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

propagatedBuildInputs should be updated to reflect https://github.com/Flexget/Flexget/blob/2.17.20/requirements.txt

@sjau
Copy link
Author

sjau commented Dec 19, 2018

And what exactely there?

@dotlambda
Copy link
Member

For example, I don't find pathlib anywhere.

@dotlambda
Copy link
Member

Building with python27 removed yields

$ nix-build -A flexget
these derivations will be built:
  /nix/store/bam7hlz4av1jh39m4npfmkvx3gc77p0s-FlexGet-2.17.20.drv
building '/nix/store/bam7hlz4av1jh39m4npfmkvx3gc77p0s-FlexGet-2.17.20.drv'...
unpacking sources
unpacking source archive /nix/store/s7nzc484r5hqxh207cr481c3x3m61ss2-FlexGet-2.17.20.tar.gz
source root is FlexGet-2.17.20
setting SOURCE_DATE_EPOCH to timestamp 1544752955 of file FlexGet-2.17.20/setup.cfg
patching sources
configuring
building
Failed to import the site module
Traceback (most recent call last):
  File "/nix/store/vprk5i2jrlc0q7g3ip4xd4al51p6ydyg-python2.7-setuptools-40.6.2/lib/python2.7/site-packages/site.py", line 73, in <module>
    __boot()
  File "/nix/store/vprk5i2jrlc0q7g3ip4xd4al51p6ydyg-python2.7-setuptools-40.6.2/lib/python2.7/site-packages/site.py", line 26, in __boot
    import imp  # Avoid import loop in Python 3
  File "/nix/store/gawjnyhb54aq4qby8vk9glh3pn1iyaqn-python3-3.6.7/lib/python3.6/imp.py", line 27, in <module>
    import tokenize
  File "/nix/store/gawjnyhb54aq4qby8vk9glh3pn1iyaqn-python3-3.6.7/lib/python3.6/tokenize.py", line 33, in <module>
    import re
  File "/nix/store/gawjnyhb54aq4qby8vk9glh3pn1iyaqn-python3-3.6.7/lib/python3.6/re.py", line 142, in <module>
    class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
builder for '/nix/store/bam7hlz4av1jh39m4npfmkvx3gc77p0s-FlexGet-2.17.20.drv' failed with exit code 1
error: build of '/nix/store/bam7hlz4av1jh39m4npfmkvx3gc77p0s-FlexGet-2.17.20.drv' failed

which tells us that somehow, python27 still gets in there and is mixed up with python36. That's why I wanted to avoid having two Python versions in the first place.
Maybe this is caused by deluge being built with python27. Do we really need deluge in propagatedBuildInputs? Can we build it with python36?

@sjau
Copy link
Author

sjau commented Dec 20, 2018

Then feel free to fix it with python 2.7

@dotlambda
Copy link
Member

According to Flexget/Flexget#2102, Flexget only uses deluge-client nowadays, which is also supported on Python 3.
Do you actually use the deluge plugin and could you test this?

@dotlambda
Copy link
Member

I could try to update this myself in the next few days so you can test it, if you have the time to wait.

@sjau
Copy link
Author

sjau commented Dec 21, 2018

I don't use deluge but a lot of people do.

@dotlambda dotlambda self-assigned this Dec 22, 2018
@dotlambda dotlambda mentioned this pull request Dec 22, 2018
10 tasks
@dotlambda
Copy link
Member

Superseded by #52681.

@dotlambda dotlambda closed this Dec 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants