Bug 244294 - www/py-flask-restplus: Update to 0.13.0, Add missing dependencies
Summary: www/py-flask-restplus: Update to 0.13.0, Add missing dependencies
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Wen Heping
Depends on:
Reported: 2020-02-22 01:12 UTC by Andrej Ebert
Modified: 2020-06-17 12:44 UTC (History)
2 users (show)

See Also:

svn-diff (2.35 KB, patch)
2020-02-22 01:12 UTC, Andrej Ebert
andrej: maintainer-approval+
Details | Diff
poudriere log (30.60 KB, text/plain)
2020-02-22 01:13 UTC, Andrej Ebert
no flags Details
poudriere-portlint log (90 bytes, text/plain)
2020-02-22 01:14 UTC, Andrej Ebert
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrej Ebert 2020-02-22 01:12:14 UTC
Created attachment 211816 [details]

Simple update to 0.13.0, but there are some new test dependencies, that are missing, this leads to following errors on make test:

Test session starts (platform: freebsd12, Python 3.7.6, pytest 4.5.0, pytest-sugar 0.9.2)
rootdir: /usr/work/ports/www/py-flask-restplus/work-py37/flask-restplus-0.13.0, inifile: setup.cfg, testpaths: tests
plugins: sugar-0.9.2, cov-2.8.1, flask-0.15.1, mock-1.10.4
collecting ...
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― tests/benchmarks/bench_marshalling.py ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
ImportError while importing test module '/usr/work/ports/www/py-flask-restplus/work-py37/flask-restplus-0.13.0/tests/benchmarks/bench_marshalling.py'.
Hint: make sure your test modules/packages have valid Python names.
tests/benchmarks/bench_marshalling.py:3: in <module>
    from faker import Faker
E   ModuleNotFoundError: No module named 'faker'

============================================================================================================= warnings summary ==============================================================================================================
  /usr/local/lib/python3.7/site-packages/_pytest/mark/structures.py:324: PytestUnknownMarkWarning: Unknown pytest.mark.request_context - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html

  /usr/local/lib/python3.7/site-packages/_pytest/mark/structures.py:324: PytestUnknownMarkWarning: Unknown pytest.mark.api - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html

  /usr/local/lib/python3.7/site-packages/_pytest/mark/structures.py:324: PytestUnknownMarkWarning: Unknown pytest.mark.benchmark - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html

-- Docs: https://docs.pytest.org/en/latest/warnings.html
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Results (5.31s):
*** Error code 2

make: stopped in /usr/work/ports/www/py-flask-restplus

The missing modules are py-pytest-benchmark, py-pytest-profiling, py-pytest-faker, I might make ports for them, if I have time, or someone is faster :)

Build itself works so far with the attached diff.
Comment 1 Andrej Ebert 2020-02-22 01:13:51 UTC
Created attachment 211817 [details]
poudriere log
Comment 2 Andrej Ebert 2020-02-22 01:14:11 UTC
Created attachment 211818 [details]
poudriere-portlint log
Comment 3 commit-hook freebsd_committer 2020-02-23 03:26:30 UTC
A commit references this bug:

Author: wen
Date: Sun Feb 23 03:26:16 UTC 2020
New revision: 526873
URL: https://svnweb.freebsd.org/changeset/ports/526873

  - Update to 0.13.0
  - Add missing TEST_DEPENDS

  PR:		244294
  Submitted by:	andrej@ebert.su(maintainer)

Comment 4 Andrej Ebert 2020-02-23 10:35:12 UTC
TL;DR: Test suite doesn't work and won't work without a lot (too much) work. Remove it for now, pending upstream updates, or even roll back the update altogether, since the only user (flexget) wants the older version anyway.

Long version:

There seems to be a misunderstanding, maybe my comment wasn't clear enough: there are still test dependencies missing that are not in the ports tree. 
Namely, py-pytest-benchmark, py-pytest-profiling and py-pytest-faker.

I'm trying to add them, but it is a rabbit hole of more and more dependencies, some of them not in the ports tree, others pulling a lot of dependencies, ie pytest-profiling depends on py-gprof2dot, which in turn depends on graphviz, which pulls in a ton of X11 stuff... 

Also, during my tests (with the missing test dependencies added as ports) I noticed that the test suite won't work at all because of an originally pinned pytest==3.2.3. We have 4.5.0 in the ports tree, which isn't compatible, so regardless of dependencies the test suite just throws a ton of errors.

Also, there seems to be a more active fork of flask-restplus (flask-restx, see https://github.com/noirbizarre/flask-restplus/issues/770 ), which others are using already instead of restplus, but flexget (the only user of flask-restplus in there ports tree) doesn't yet.

I think it's overkill to introduce a 3.2.3 py-pytest to the ports tree and add all these ports just to make the tests work. For now I would remove the tests entirely, pending upstream updates or a migration of flexget to flask-restx, which would make this port more or less obsolete.

 Maybe even rollback the update altogether, since flexget prefers the older version anyway.
Comment 5 Wen Heping freebsd_committer 2020-02-23 10:44:49 UTC
(In reply to Andrej Ebert from comment #4)
Does flexget work with this update ?
Shall I revert this commit ?

Comment 6 Andrej Ebert 2020-02-23 16:39:36 UTC
(In reply to Wen Heping from comment #5)
I think reverting would be best for now, and leave the bug open as WIP or something. It was intended as work in progress, but I should have communicated that clearer.
Comment 7 commit-hook freebsd_committer 2020-06-17 12:36:59 UTC
A commit references this bug:

Author: jbeich
Date: Wed Jun 17 12:36:43 UTC 2020
New revision: 539422
URL: https://svnweb.freebsd.org/changeset/ports/539422

  www/py-flexget: update to 3.1.64

  - Switch from flask-restplus to flask-restx, removing the former

  Changes:	https://github.com/Flexget/Flexget/compare/v3.1.59...v3.1.64
  PR:		244294

Comment 8 Jan Beich freebsd_committer 2020-06-17 12:44:24 UTC
Given comment 4 I didn't bother with tests in www/py-flask-restx. PyPI distfile also lacks tests/ subdirectory. Besides, given www/py-flexget is the only consumer it's easier to just run it instead of wading through false positives.

No deprecation for www/py-flask-restplus because ports r536265 illustrated just how much of a PITA to keep it working.