Bug 233781 - devel/py-freebsd: Update to 0.9.4, Fix with python 3.x support
Summary: devel/py-freebsd: Update to 0.9.4, Fix with python 3.x support
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
Keywords: needs-qa
: 233782 (view as bug list)
Depends on:
Reported: 2018-12-04 16:34 UTC by Maxim Sobolev
Modified: 2020-02-17 06:05 UTC (History)
5 users (show)

See Also:
koobs: maintainer-feedback+
koobs: maintainer-feedback? (perky)

Patch to update the port (8.78 KB, patch)
2018-12-04 16:34 UTC, Maxim Sobolev
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Maxim Sobolev freebsd_committer 2018-12-04 16:34:07 UTC
Created attachment 199819 [details]
Patch to update the port

This patch updates devel/py-freebsd to the latest version as well as enables python 3.x support in its builds.
Comment 1 Maxim Sobolev freebsd_committer 2018-12-04 16:43:32 UTC
*** Bug 233782 has been marked as a duplicate of this bug. ***
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2018-12-05 03:25:47 UTC
Thank you Maxim. A couple of review items:


2) Can you provide detail or explanation (and include in the commit message after approval) of:

a) the upstream change. Is it a fork, did you transfer/coordinate with perky to move it to GitHub?
b) The patch removals. Were they upstreamed? No longer necessary?

3) Since it appears the upstream is not hosted under your GitHub account, would you like to update MAINTAINER to yourself? Please include that change if so.

4) The package includes tests. Can you add TEST_DEPENDS (if necessary) and a test target to run them. Ideally this should be integrated upstream, using setup.py test (setup.py:tests_require,test_suite, et al)

5) Was Python 3 support supposed to work prior to this, but was broken? Or was Python 3 support recently added upstream and in this version? If the latter, update the issue summary (and commit log message) to say 'Enable Python3.x support' rather than 'Fix Python 3.x support'

Longer term (not for this commit), can we look at distributing/publishing this to PyPI (CHEESESHOP). In particular, it would be good to have a 'registered' and canonical name for this package. Right now the portname is 'freebsd', but the actual upstream / distname is 'py-freebsd'. I'd go with just 'freebsd' for PyPI, to match the current PORTNAME. It doesn't ultimate matter what the repo name is.
Comment 3 Maxim Sobolev freebsd_committer 2019-01-09 21:25:48 UTC
(In reply to Kubilay Kocak from comment #2)

Well the story is that we rely on this module here in our software for a number of years and it's been blocking us from migrating code from Python 2.7 to 3.x which prompted this change. On top of that, we've added some missing functionality in out private fork over that time. Two came together and after poking around I found https://github.com/astralblue/py-freebsd/ that had some initial python3 work, as well as integrated some of the patches into it.

So I went on and forked that repo and made python 3.x actually working as well as merged all relevant port changes. Just in case, I've submitted my python 3.x changes to astralblue about a month ago as a pull request but that went unnoticed.

I can maintain code on GitHub for now until somebody more motivated surfaces, as for taking over port's MAINTAINERship, I'd probably pass on that. 

WRT contacting perky to rubberstamp those changes it's probably safe to say he does not mind/care after all those years. But just in case I am including him into the CC.

This is probably as far as I am prepared to go now to push this trough, so I'd leave it with you as a maintainer to decide. Also if you have any ideas about improving package (tests, PyPI etc) then a pull request on GitHub would be very welcome!
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2019-01-12 03:07:01 UTC
(In reply to Maxim Sobolev from comment #3)

Thanks for the detail Maxim.

A couple of review items:

- Clarify patch removal. Are they now (at your) upstream?
- It would still be great to add TEST_DEPENDS and a (do-)test target so that the tests can be run for QA. 

If you can do that, and confirm the port passes QA (portlint, poudriere: python 2/3, maketest), I am happy to accept the change (@python) so you can assign yourself and commit.
Comment 5 Maxim Sobolev freebsd_committer 2019-08-01 17:22:55 UTC
(In reply to Kubilay Kocak from comment #4)

Kubilay, I can do small tweaks to the port that's not a problem. However, my ports commit bit have been somewhat unexpectedly taken for "safekeeping" last November, so that QA steps are nearly impossible for me to achieve and I won't be able to commit my changes either. I tried to contact portmgr@ to get it re-instantiated back in December but got no reply whatsoever. So I am not quite sure if I need to ask somebody to help me with that QA.
Comment 6 Kubilay Kocak freebsd_committer freebsd_triage 2019-10-08 01:46:43 UTC
@Perky Could you arrange a repository transfer to sobomax, or, alternatively, add sobomax to the astralblue/py-freebsd repository as a collaborator and admin
Comment 7 Rene Ladan freebsd_committer 2020-01-27 20:04:46 UTC
Any news? Notice that this port expired today, but was retained for the time being.
Comment 8 Kubilay Kocak freebsd_committer freebsd_triage 2020-01-28 00:45:35 UTC
(In reply to Rene Ladan from comment #7)

I'll commit it before end of week, thanks Rene
Comment 9 Rene Ladan freebsd_committer 2020-02-15 22:17:03 UTC
(In reply to Kubilay Kocak from comment #8)
Any news? Should I commit the patch instead?
Comment 10 Kubilay Kocak freebsd_committer freebsd_triage 2020-02-17 02:03:32 UTC
Sorry Rene, will do this today
Comment 11 Kubilay Kocak freebsd_committer freebsd_triage 2020-02-17 05:59:00 UTC
There are a number of test failures in various conditions:

test_getosreldate fails when run inside a poudriere jail:

FAIL: test_getosreldate (test_sysctl.Test_sysctl)
Traceback (most recent call last):
  File "/wrkdirs/usr/ports/devel/py-freebsd/work-py27/py-freebsd-0.9.4/tests/test_sysctl.py", line 19, in test_getosreldate
    getprocoutput('sysctl kern.osreldate').split()[-1])
AssertionError: '1201000' != '1300076'


test_get_kern_cp_time fails on at least 12/13{amd64}

FAIL: test_get_kern_cp_time (test_sysctl.Test_sysctl)
Traceback (most recent call last):
  File "/wrkdirs/usr/ports/devel/py-freebsd/work-py27/py-freebsd-0.9.4/tests/test_sysctl.py", line 33, in test_get_kern_cp_time
    ctimes = self.do_cp_time_test(get_kern_cp_time, 0)
  File "/wrkdirs/usr/ports/devel/py-freebsd/work-py27/py-freebsd-0.9.4/tests/test_sysctl.py", line 44, in do_cp_time_test
    self.check_monot(ctimes, ctimes1)
  File "/wrkdirs/usr/ports/devel/py-freebsd/work-py27/py-freebsd-0.9.4/tests/test_sysctl.py", line 49, in check_monot
    self.assertTrue(ct0[i] < ct1[i])
AssertionError: False is not true

test_get_cpu_times fails intermittently in multiple test runs:

FAIL: test_get_cpu_times (test_sysctl.Test_sysctl)
Traceback (most recent call last):
  File "/wrkdirs/usr/ports/devel/py-freebsd/work-py27/py-freebsd-0.9.4/tests/test_sysctl.py", line 30, in test_get_cpu_times
    self.do_cp_time_test(get_cpu_times, 0.0)
  File "/wrkdirs/usr/ports/devel/py-freebsd/work-py27/py-freebsd-0.9.4/tests/test_sysctl.py", line 44, in do_cp_time_test
    self.check_monot(ctimes, ctimes1)
  File "/wrkdirs/usr/ports/devel/py-freebsd/work-py27/py-freebsd-0.9.4/tests/test_sysctl.py", line 49, in check_monot
    self.assertTrue(ct0[i] < ct1[i])
AssertionError: False is not true
Comment 12 commit-hook freebsd_committer 2020-02-17 06:04:57 UTC
A commit references this bug:

Author: koobs
Date: Mon Feb 17 06:04:00 UTC 2020
New revision: 526342
URL: https://svnweb.freebsd.org/changeset/ports/526342

  devel/py-freebsd: Update to 0.9.4

    - Switch to GitHub (sobomax fork of perky's upstream)
    - This update includes Python 3.x support
    - Add test target (and adjust PYDISTUTILS_BUILD_TARGET to build in-place)
    - Remove patches (upstreamed)

  PR:		233781
  Submitted by:	sobomax (based on)
  Approved by:	portmgr (maintainer timeout)

Comment 13 Kubilay Kocak freebsd_committer freebsd_triage 2020-02-17 06:05:26 UTC
Committed, thanks Maxim