Bug 256826 - dns/py-namebench: Fails to run: SyntaxError: invalid syntax (detecting python version)
Summary: dns/py-namebench: Fails to run: SyntaxError: invalid syntax (detecting python...
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Jason Helfman
URL:
Keywords: needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2021-06-25 12:12 UTC by tech-lists
Modified: 2021-06-26 01:47 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (jgh)
koobs: merge-quarterly?


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tech-lists 2021-06-25 12:12:09 UTC
Hi,

py38-namebench-1.3.1_1 fails to detect correct python version when it runs.

context: 
built with poudriere-devel poudriere-devel-3.3.99.20210617
portstree last updated: Fri Jun 25 08:56:31 2021 +0800 version: 549828
OS: stable/13-n245218-41d864457dd (on both arm64 and aarch64)

[...]
% namebench.py 
  File "/usr/local/bin/namebench.py", line 28
    print '* Your Python version (%s) is too old! Please upgrade to 2.6+!' % your_version
          ^
SyntaxError: invalid syntax
[...]

% pkg info -xo python
py38-dnspython-1.16.0          dns/py-dnspython                                                                     
python3-3_3                    lang/python3                                                                         
python38-3.8.10                lang/python38
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2021-06-26 01:47:18 UTC
I don't believe namebench is Python 3 compatible [1], but if the issue can be isolated and resolved (patched), please do so. Trying 2to3 or using six may help

This was broken by ports r559531

See Also:

   https://forums.gentoo.org/viewtopic-t-957080-start-0.html

[1] https://github.com/catap/namebench/blob/master/namebench.py#L29