Bug 227862 - devel/py-tox: update to 3.0.0
Summary: devel/py-tox: update to 3.0.0
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: Kubilay Kocak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-29 22:36 UTC by Kai Knoblich
Modified: 2019-04-25 04:32 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (koobs)


Attachments
py-tox-3.0.0.patch (3.61 KB, patch)
2018-04-29 22:36 UTC, Kai Knoblich
no flags Details | Diff
py-tox-3.0.0-DOCS.patch (878 bytes, patch)
2018-06-13 18:27 UTC, Kai Knoblich
kai: maintainer-approval? (koobs)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kai Knoblich freebsd_committer freebsd_triage 2018-04-29 22:36:25 UTC
Created attachment 192921 [details]
py-tox-3.0.0.patch

Hello,

attached is the patch that updates py-tox to 3.0.0.

Changes by upstream:

- https://github.com/tox-dev/tox/compare/2.3.1...3.0.0

Changes to the port:
- added BUILD_DEPENDS
- added devel/py-six to RUN_DEPENDS
- updated TEST_DEPENDS
- changed FLAVOR to PY_FLAVOR
- added option DOCS with target and appropriate dependencies
- refine test target
- updated WWW in pkg-descr


QA:
~~~
- poudriere (11.1-RELEASE amd64 + i386) for each py27 + py36 flavor -> OK
- portlint -> OK
- make test for each py27 + py36 flavor -> OK
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2018-06-09 07:24:17 UTC
I'm seeing some build errors with the provided DOCS options/dependencies/build. Will land the version update separately
Comment 2 commit-hook freebsd_committer freebsd_triage 2018-06-09 07:27:09 UTC
A commit references this bug:

Author: koobs
Date: Sat Jun  9 07:26:06 UTC 2018
New revision: 472042
URL: https://svnweb.freebsd.org/changeset/ports/472042

Log:
  devel/py-tox: Update to 3.0.0

  Changelog:

    https://tox.readthedocs.io/en/latest/changelog.html

  PR:		227862
  Submitted by:	Kai <freebsd_ports k-worx org>

Changes:
  head/devel/py-tox/Makefile
  head/devel/py-tox/distinfo
  head/devel/py-tox/pkg-descr
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2018-06-09 07:28:39 UTC
@Kai Could you rebase the DOCS changes after ports r472042 please?

Testing was showing the build (with DOCS enabled) trying to download/install the 'packaging' and 'simple' packages from PyPI.

Also, I couldn't tell where the DOCS_BUILDS_DEPENDS on py and pluggy came from
Comment 4 Kai Knoblich freebsd_committer freebsd_triage 2018-06-09 10:22:18 UTC
(In reply to Kubilay Kocak from comment #3)

Hello Kubilay,

thanks for committing the update. I'll rework a small rebased patch for the DOCS option but I'm a little confused about the fact that there were some build errors with the DOCS option enabled.

Maybe I'm still missing some QA testing technique and thus my workflow needs some improvement? My usual way to do QA with the "make test" target for Python ports is at the moment:

Testing the build process:

> poudriere testport -i -j JAIL -p PORTS -o PORT_TO_TEST

Inside the jail I do usually for Python ports (using py-tox as example with FLAVOR=py27) with a already defined "do-test" target:

> cd /usr/ports/devel/py-tox
> make test

After these steps I check the logs for packages, that were missing or have been fetched from PyPi.

You're right that both devel/py-pluggy + devel/py-py packages are not required as DOCS_BUILD_DEPENDS to build the package successfully. But there will be some warnings during the sphinx build process that these modules could not be imported when they are left out, e.g:

> ImportError: No module named pluggy
> /wrkdirs/usr/ports/devel/py-tox/work-py27/tox-3.0.0/doc/plugins.rst:89: > WARNING: autodoc: failed to import class u'TestenvConfig' from module u'tox.config'; the following exception was raised:

Can such warnings be safely ignored?
Comment 5 Kubilay Kocak freebsd_committer freebsd_triage 2018-06-10 03:08:30 UTC
(In reply to Kai from comment #4)

testport -i is different to -I so may produce different results, but the test target for ports already installs build/run depends and has them installed at that point, so theoretically the behaviour shouldn't be different.

The issue with tox is that is creates a virtualenv that doesn't inherit from system site-packages by default, so those environments cant see the modules that were installed by ports (poudriere), and so tox tries to install them.

I tried to make tox allow (enable) --sitepackages, but saw a different set of test failures in that case, which is why I switched it back to using bare pytest (which is what tox calls anyway).

Warnings, all else being equal, either imply dependencies in setup.py (*_requires) are incorrect/incomplete and need to be fixed, but in this case i dont believe that's the cause.

My current thought is that maybe since pluggy (etc) are *run time* dependencies, but building docs (with sphinx) is a *build* time activity, that's whats producing the warnings. That would imply pluggy (if it is indeed required to build docs), should be a setup_requires, at least conditionally in the setup.py build docs target. However, I'm guessing its not actually required, but instead the warnings are an artifact of something else.
Comment 6 Kai Knoblich freebsd_committer freebsd_triage 2018-06-13 18:27:11 UTC
Created attachment 194231 [details]
py-tox-3.0.0-DOCS.patch

(In reply to Kubilay Kocak from comment #5)

Thank you for the detailed explanations and insights. I really appreciate that.

Attached is a rebased patch with the DOCS option. The builds are fine so far and with the DOCS option enabled, there are 7 warnings (related to devel/py-pluggy + devel/py-py) during the build.l

The test results are:

With Python 2.7:

> 368 passed, 4 skipped, 1 xfailed (due a bug as noted in the results) in 45.71 seconds

With Python 3.6:

> 369 passed, 3 skipped, 1 xfailed (due a bug as noted in the result) in 57.34 seconds

If the problems with the packages "packaging" and "simple" still persist in some way it would be no problem for me to leave the port at its current state without the DOCS option. (Although it's always quite handy to have some reference if you're travelling or your ISP let you down.)
Comment 7 Kubilay Kocak freebsd_committer freebsd_triage 2019-04-25 04:32:13 UTC
Committed in ports r472042