Bug 228575 - www/py-aiohttp: Update to 3.5.4
Summary: www/py-aiohttp: Update to 3.5.4
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Kubilay Kocak
URL:
Keywords:
Depends on: 235339
Blocks: 228581
  Show dependency treegraph
 
Reported: 2018-05-28 21:21 UTC by Waitman Gobble
Modified: 2019-03-26 13:42 UTC (History)
4 users (show)

See Also:
koobs: maintainer-feedback+


Attachments
svn diff changed Makefile, distinfo (1.71 KB, patch)
2018-05-28 21:21 UTC, Waitman Gobble
no flags Details | Diff
Update to 3.5.4 (828 bytes, patch)
2019-02-15 22:44 UTC, Romain Tartière
koobs: maintainer-approval-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Waitman Gobble 2018-05-28 21:21:08 UTC
Created attachment 193797 [details]
svn diff changed Makefile, distinfo
Comment 1 Romain Tartière freebsd_committer freebsd_triage 2019-02-15 22:44:45 UTC
Created attachment 202057 [details]
Update to 3.5.4

3.5.4 has been released.  Some port I am working on required a more recent version of www/py-aiohttp
Comment 2 Olivier Cochard freebsd_committer freebsd_triage 2019-03-25 23:51:54 UTC
I need a recent version of this too.
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2019-03-26 03:23:44 UTC
Comment on attachment 202057 [details]
Update to 3.5.4

Initial review identifies at least the following updates are needed:

- Dependency list review/updates, including python_version conditional ones
- USES=python:<version-spec> update (now 3.5+)
- LICENSE change and other metadata changes (comment, pkg descr, www URL)
- Evaluate cython removal (only required from git checkout)

If anyone finds/identifies anything else, please let me know so I can include it in the local changes I'm working on now
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2019-03-26 04:15:34 UTC
tests/conftest.py:9: in <module>
    import trustme
E   ModuleNotFoundError: No module named 'trustme'

- trustme is missing from setup.py:tests_require
- trustme hasn't been ported

We can consider just adding it to setup.py:tests_require so the test command grabs it from PyPI, and adding it to Makefile as a commented TEST_DEPENDS "to be ported"
Comment 5 Kubilay Kocak freebsd_committer freebsd_triage 2019-03-26 04:26:12 UTC
setup.py: error: unrecognized arguments: --cov=aiohttp
  inifile: /usr/home/koobs/repos/freebsd/ports/www/py-aiohttp/work-py37/aiohttp-3.5.4/pytest.ini

pytest-cov

- is missing from setup.py:tests_require (and thus TEST_DEPENDS)
- is ported

Can either:

- Remove --cov argument from pytest.ini (likely), as we don't care about code coverage and it should be really be a 'compulsory' test requirement, OR
- Add pytest-cov to TEST_DEPENDS
Comment 6 Kubilay Kocak freebsd_committer freebsd_triage 2019-03-26 04:48:58 UTC
test TestDeflateBuffer.test_feed_eof_no_err_brotli fails with:

aiohttp.http_exceptions.ContentEncodingError: 400, message='Can not decode content-encoding: brotli (br). Please install `brotlipy`'

brotlipy

- is not listed in setup.py:tests_require
- is not ported
- should be skipped in tests (not fail) if not found, like aiodns:

  SKIPPED [1] tests/test_resolver.py:59: aiodns required

We can consider just adding it to setup.py:tests_require so the test command grabs it from PyPI, and adding it to Makefile as a commented TEST_DEPENDS "to be ported"
Comment 7 Kubilay Kocak freebsd_committer freebsd_triage 2019-03-26 05:16:42 UTC
Many test failures of type:

E       fixture 'mocker' not found

pytest-mock

- is not listed in setup.py:tests_require
- is ported: devel/py-pytest-mock
Comment 8 Kubilay Kocak freebsd_committer freebsd_triage 2019-03-26 05:40:54 UTC
So far:

 2364 passed, 31 skipped, 3 xfailed, 11 error

A number of ssl-related test failures remain, due to: 

cryptography/hazmat/bindings/_openssl.abi3.so: Undefined symbol "SSLv3_client_method"

This may be caused by cryptography being installed by setuptools, as a dependency of trustme (which isn't ported, see comment 4), rather than being installed by ports, and ending up build/linked against different (base/ports) OpenSSL versions

Adding cryptography to TEST_DEPENDS (even though its in an indirect dependency) should be a good test of that theory.
Comment 9 Kubilay Kocak freebsd_committer freebsd_triage 2019-03-26 05:42:18 UTC
SKIPPED [1] tests/test_resolver.py:48: aiodns 1.1 required
SKIPPED [1] tests/test_resolver.py:59: aiodns required
SKIPPED [1] tests/test_resolver.py:70: aiodns 1.1 required
SKIPPED [1] tests/test_resolver.py:81: aiodns required
SKIPPED [1] tests/test_resolver.py:92: aiodns 1.1 required
SKIPPED [1] tests/test_resolver.py:101: aiodns required
SKIPPED [1] tests/test_resolver.py:111: aiodns required
SKIPPED [1] tests/test_resolver.py:121: aiodns 1.1 required
SKIPPED [1] tests/test_resolver.py:162: aiodns required
SKIPPED [1] tests/test_resolver.py:174: aiodns required
SKIPPED [1] tests/test_resolver.py:181: aiodns 1.1 required
SKIPPED [1] tests/test_resolver.py:193: aiodns required

aiodns

- is not listed in setup.py:tests_require
- is ported: dns/py-aiodns
Comment 10 Kubilay Kocak freebsd_committer freebsd_triage 2019-03-26 06:47:10 UTC
Tests pass after adding cryptography to TEST_DEPENDS as a test to validate theory from comment 8

2375 passed, 31 skipped, 3 xfailed in 418.18 seconds
Comment 11 commit-hook freebsd_committer freebsd_triage 2019-03-26 13:39:34 UTC
A commit references this bug:

Author: koobs
Date: Tue Mar 26 13:39:00 UTC 2019
New revision: 496897
URL: https://svnweb.freebsd.org/changeset/ports/496897

Log:
  www/py-aiohttp: Update to 3.5.4

    - Drop use of cython, only needed for 'from git' builds
    - Document necessary but not-yet-ported TEST_DEPENDS for our future selves
      and potential contributors to see.
    - Update port metadata to match upstream: pkg-desc, WWW URL, LICENSE, COMMENT
    - Patch setup.py: Add necessary but missing entries to tests_require. For the
      ones not yet ported, they're fetched from PyPI via setuptools when correctly
      declared. Move pytest min version requirement from pytest.ini to
      tests_require where it belongs, so it can be parsed and the right version
      can be fetched, instead of just failing if its not the required version.
    - Patch pytest.ini: Strip --cov from pytest args. We don't care about coverage
      downstream, and it shouldnt be a compulsory (tests_require) dependency, but
      instead an extras_require, so dont add it to TEST_DEPENDS even though it is
      a port.

  Changelog:

    https://github.com/aio-libs/aiohttp/blob/v3.5.4/CHANGES.rst

  PR:	228575

Changes:
  head/www/py-aiohttp/Makefile
  head/www/py-aiohttp/distinfo
  head/www/py-aiohttp/files/
  head/www/py-aiohttp/files/patch-pytest.ini
  head/www/py-aiohttp/files/patch-setup.py
  head/www/py-aiohttp/pkg-descr
Comment 12 Kubilay Kocak freebsd_committer freebsd_triage 2019-03-26 13:42:54 UTC
Committed with changes, apologies for the delay.