Bug 1268039 - broken dependencies (python3-dateutil)
broken dependencies (python3-dateutil)
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: python-nikola (Show other bugs)
22
All Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Pete Travis
Fedora Extras Quality Assurance
:
: 1278581 1305623 1305627 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-01 12:16 EDT by Chris Warrick
Modified: 2016-07-10 01:56 EDT (History)
9 users (show)

See Also:
Fixed In Version: python-nikola-7.7.9-2.fc24
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-10 01:56:06 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Chris Warrick 2015-10-01 12:16:37 EDT
Description of problem:

Nikola has a broken dependency. v7.3.0 (which is ancient) requires a specific version of dateutil (2.4.0), but Fedora provides 2.4.2.

[kwpolska@kw-arya ~]% nikola3.4                                                                                                                                                                                                          ~ 0
Traceback (most recent call last):
  File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line 651, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line 952, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line 844, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (python-dateutil 2.4.2 (/usr/lib/python3.4/site-packages), Requirement.parse('python-dateutil==2.4.0'), {'Nikola'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/nikola3.4", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line 3084, in <module>
    @_call_aside
  File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line 3070, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line 3097, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line 653, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line 666, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line 839, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'python-dateutil==2.4.0' distribution was not found and is required by Nikola


Version-Release number of selected component (if applicable):

v7.3.0

How reproducible: always


Steps to Reproduce:
1. dnf install python3-nikola 
2. nikola3.4

Actual results:

crash, see above

Expected results:

a nice and smooth help message

Additional info:

to fix, upgrade Nikola to v7.7.1
Comment 1 akiross 2015-10-17 13:17:42 EDT
I have the same issue. Like this, Nikola is unusable.
Comment 2 Lenz Grimmer 2015-12-09 12:30:55 EST
Just stumbled over that one myself. Any chance that Nikola could be updated?
Comment 3 Pete Travis 2016-01-11 23:17:52 EST
*** Bug 1278581 has been marked as a duplicate of this bug. ***
Comment 4 Pete Travis 2016-01-11 23:26:43 EST
Hey Chris and all, my apologies - I haven't made much time for this lately.  Each explicit dependency that isn't met by packaged modules requires at least admittedly trivial patching of upstream's declared requirements, and somewhat less trivial testing and code review to validate that the available packaged version of each module will function as expected.  python-dateutil specifically hasn't changed the way it is used in many years, so I can push a release bump in the short term to apply this patch, but the update to nikola's latest version will need a closer inspection.
Comment 5 Pete Travis 2016-02-09 09:09:13 EST
*** Bug 1305623 has been marked as a duplicate of this bug. ***
Comment 6 Pete Travis 2016-02-09 09:10:14 EST
*** Bug 1305627 has been marked as a duplicate of this bug. ***
Comment 7 David Yaffe 2016-02-17 09:49:44 EST
Hi,
I downloaded the 7.6.4-1 package from updates-testing. I installed in on a Raspberry Pi2 and a x86-64 system, both running f23, and was able to run nikola3.4 properly:

# nikola3.4 init mytest
[2016-02-17T14:43:40Z] WARNING: Nikola: In order to USE_BUNDLES, you must install the "webassets" Python package.
[2016-02-17T14:43:40Z] WARNING: bundles: Setting USE_BUNDLES to False.
Creating Nikola Site
====================

This is Nikola v7.6.4.  We will now ask you a few easy questions about your new site.
If you do not want to answer and want to go with the defaults instead, simply restart with the `-q` parameter.
--- Questions about the site ---
Site title [My Nikola Site]:
Site author [Nikola Tesla]:
Site author's e-mail [n.tesla@example.com]:
Site description [This is a demo site for Nikola.]:
Site URL [https://example.com/]:
Enable pretty URLs (/page/ instead of /page.html) that don't need web server configuration? [Y/n]
--- Questions about languages and locales ---
We will now ask you to provide the list of languages you want to use.
Please list all the desired languages, comma-separated, using ISO 639-1 codes.  The first language will be used as the default.
Type '?' (a question mark, sans quotes) to list available languages.
Language(s) to use [en]:

Please choose the correct time zone for your blog. Nikola uses the tz database.
You can find your time zone here:
http://en.wikipedia.org/wiki/List_of_tz_database_time_zones

Time zone [America/Springfield]:
    Current time in America/Springfield: 08:45:50
Use this time zone? [Y/n]
--- Questions about comments ---
You can configure comments now.  Type '?' (a question mark, sans quotes) to list available comment systems.  If you do not want any comments, just leave the field blank.
Comment system: 

That's it, Nikola is now configured.  Make sure to edit conf.py to your liking.
If you are looking for themes and addons, check out https://themes.getnikola.com/ and https://plugins.getnikola.com/.
Have fun!
[2016-02-17T14:46:13Z] INFO: init: Created empty site at mytest.
# ls mytest/
conf.py  files  galleries  listings  posts  stories
Comment 8 Mike McLean 2016-03-21 17:10:31 EDT
Still has dep problems on F22

[mike@localhost site]$ rpm -q python-nikola
python-nikola-7.3.0-6.fc22.noarch
[mike@localhost site]$ make
nikola build
ERROR: You are using doit version 0.28.0, it is too new! This application requires version <= 0.27.
Makefile:7: recipe for target 'build' failed
make: *** [build] Error 3
Comment 9 Michele Baldessari 2016-04-04 14:57:58 EDT
This still happens on F24 with
$ rpm -q python3-nikola   
python3-nikola-7.6.4-2.fc24.noarch


nikola3.5 build
Traceback (most recent call last):
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 640, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 941, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 833, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (python-dateutil 2.5.0 (/usr/lib/python3.5/site-packages), Requirement.parse('python-dateutil==2.4.2'), {'Nikola'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/nikola3.5", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 3141, in <module>
    @_call_aside
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 3127, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 3154, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 642, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 655, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 828, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'python-dateutil==2.4.2' distribution was not found and is required by Nikola
Makefile:12: recipe for target 'build' failed
make: *** [build] Error 1
Comment 10 Solomon Peachy 2016-05-15 17:54:34 EDT
I just ran into the same problem as comment #9, when Upgrading from a working F23 python3-nikola installation to f24 beta.

Also, FWIW Nikola 7.7.8 is the current version.
Comment 11 Solomon Peachy 2016-05-15 19:35:46 EDT
BTW, upstream nikola has changed their dependency to 'dateutil >= 2.4.0' -- See:

https://github.com/getnikola/nikola/issues/2180

If fedora does not repackage current upstream, it should at least apply this patch:

https://github.com/getnikola/nikola/commit/7d8808282392fd9225d0d28d84452e571f6f00ba
Comment 12 Solomon Peachy 2016-05-15 19:55:47 EDT
I built a fixed version of the F24 package.  Here's the SRPM with the patch and updated spec:

http://www.shaftnet.org/~pizza/python-nikola-7.6.4-2.1.fc24.src.rpm

My personal nikola site rebuilt successfully, at least.
Comment 13 Pete Travis 2016-05-16 02:23:22 EDT
This is less about dateutil, which hasn't changed it's interfaces _ever_ afaik and doesn't actually need a version declaration, and more about multiple other dependencies with legitimate versioned requirements that cannot be met with the respective Fedora packages.  If I patch out the version info for the deps and run nikola's tests, the majority fail.  It frankly hasn't seemed viable to ship a package with that kind of breakage.

That said, I haven't checked in a bit, so I'll check things over again soon.
Comment 14 Chris Warrick 2016-05-16 09:57:52 EDT
We’re sorry for the inconvenience, but this isn’t exactly our fault. Assuming the test failures are not related to some other things (our tests are a pain to set up, we’re aware of that and can’t really do much about it), this means that we truly need newer packages…

That said, we’d love to see the error log and we’ll see what we can do about it.

(Nikola users can always set up a virtualenv and avoid all dependency problems.)
Comment 15 Pete Travis 2016-05-17 21:45:39 EDT
Not trying to pass blame, Chris - we truly needed newer packages for shared dependencies, and not everything that shared dependencies with nikola could use the version that nikola required.  F24 looks more promising at this point, I'm looking into it now.
Comment 16 Fedora Update System 2016-07-01 19:23:07 EDT
python-nikola-7.7.9-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-a40d5c3269
Comment 17 José Matos 2016-07-01 19:30:26 EDT
OK.

Following the changes made by Pete I have been able to get nikola to work and to pass all the tests with the single exception of those that import wordpress since those require python-phpsererialize that is not available at Fedora now.

For now everything is working properly to me.

Please test this release.
Comment 18 José Matos 2016-07-02 05:15:54 EDT
Answering Chris from the updates page.

> Fails to build my blog due to a bug in python-husl 4.0.1 that was fixed in version 4.0.3. This issue only affects people who use husl (not in default setup)

OK, thank you for noticing that. I am updating python-husl to 4.0.3 and I will add it to this update to fix this issue.

> Fails to build demo site due to missing pyphen dependency (requires removal of stories/dr-nikolas-vendetta.rst and the link in posts/1.rst)

That should be taken care by installing python-nikola-extras that requires several extra dependencies. From the package description:

%description -n python-nikola-extras
This package adds optional dependencies for python-nikola,
expanding functionality.
Comment 19 Chris Warrick 2016-07-02 05:42:52 EDT
The pyphen problem is actually a layer of bugs upon bugs:

0. python-pyphen in Fedora doesn’t ship its own dictionaries and instead uses hyphen-* packages (is this documented anywhere?)
1. python-pyphen does not depend on hyphen-en nor any other dictionary.
2. hyphen-en does not provide a 'en' dictionary — there are only en_US, en_GB and others.
3. Nikola wants an 'en' dictionary, which is available in vanilla pyphen, but not in Fedora.
4. Nikola also has a tiny bug which prevented graceful degradation.

I fixed 3. and 4. on Nikola’s side: https://github.com/getnikola/nikola/commit/f98b90d187738972030861278983295f04bfbe70 — you could backport this patch to v7.7.9 to make things work.

PS. a `nikola3` binary would be nice.
Comment 20 José Matos 2016-07-02 12:31:15 EDT
(In reply to Chris Warrick from comment #19)
> The pyphen problem is actually a layer of bugs upon bugs:
> 
> 0. python-pyphen in Fedora doesn’t ship its own dictionaries and instead
> uses hyphen-* packages (is this documented anywhere?)

I found the same almost two years ago:
https://bugzilla.redhat.com/show_bug.cgi?id=1147012

> 1. python-pyphen does not depend on hyphen-en nor any other dictionary.
> 2. hyphen-en does not provide a 'en' dictionary — there are only en_US,
> en_GB and others.
> 3. Nikola wants an 'en' dictionary, which is available in vanilla pyphen,
> but not in Fedora.
> 4. Nikola also has a tiny bug which prevented graceful degradation.
> 
> I fixed 3. and 4. on Nikola’s side:
> https://github.com/getnikola/nikola/commit/
> f98b90d187738972030861278983295f04bfbe70 — you could backport this patch to
> v7.7.9 to make things work.

I have incorporated your patch. Now the packages requires hyphen-en (that brings hyphen with it). I am building nikola with these changes to amend the update.

> PS. a `nikola3` binary would be nice.

You get that installing python3-nikola. The other issue is the at this time nikola should point to nikola3 and not to nikola2 as it is now.

Thank you for your feedback.
Comment 21 Chris Warrick 2016-07-02 12:32:41 EDT
$ ls /usr/bin/nikola*
/usr/bin/nikola@  /usr/bin/nikola2*  /usr/bin/nikola3.5*
Comment 22 Fedora Update System 2016-07-03 10:53:08 EDT
python-husl-4.0.3-1.fc24, python-nikola-7.7.9-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-a40d5c3269
Comment 23 Chris Warrick 2016-07-03 15:11:07 EDT
husl works, at least on my site with Python 3, and with Python 2 after a patch (in github master; not really important because it was broken anyway).

Was the Nikola package updated with the one-line patch?
Comment 24 Fedora Update System 2016-07-04 10:47:13 EDT
python-husl-4.0.3-1.fc24 python-nikola-7.7.9-2.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-a40d5c3269
Comment 25 José Matos 2016-07-04 11:01:18 EDT
(In reply to Chris Warrick from comment #23)
> husl works, at least on my site with Python 3, and with Python 2 after a
> patch (in github master; not really important because it was broken anyway).

Thanks for checking that. :-)
 
> Was the Nikola package updated with the one-line patch?

Not initially because the patch did not apply cleanly (nothing troublesome) and my free time yesterday was over as the kids decided to show up near the computer. :-)

Today I have rewritten the patch as to remove the diff in Changes and to adjust the line numbers in the patch to insure that the patch applies cleanly (in Fedora rpm generation patch runs with --fuzz=0).

So the new version, python*-nikola-7.7.9-2 has the patches to hyphen. I have also changed the suffix appended to correspond only to the major number of the python version used to built it: nikola2 and nikola3.

The default it is still nikola2 but I think that it should be changed to nikola3, but I decided not to change everything at once.

Thank you for your tests.
Comment 26 Chris Warrick 2016-07-04 11:03:31 EDT
Everything is fine, and switching to nikola → nikola3 can happen at some point in the future (and will be mandatory in Nikola v8.0.0, one day).

Thanks for working with me on this! (take your time getting this to the main repo if necessary)
Comment 27 Fedora Update System 2016-07-05 04:53:40 EDT
python-husl-4.0.3-1.fc24, python-nikola-7.7.9-2.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-a40d5c3269
Comment 28 Fedora Update System 2016-07-10 01:55:59 EDT
python-husl-4.0.3-1.fc24, python-nikola-7.7.9-2.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.