Bug 256504 - games/pysolfc 2.6.4 needs update due to python 3.8 incompatibility.
Summary: games/pysolfc 2.6.4 needs update due to python 3.8 incompatibility.
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Kai Knoblich
Depends on:
Reported: 2021-06-09 16:33 UTC by sven.a.jonsson
Modified: 2021-06-10 06:12 UTC (History)
1 user (show)

See Also:
kai: maintainer-feedback+
kai: merge-quarterly?

pysolfc-fix-runtime-with-py38.patch (1.21 KB, patch)
2021-06-10 05:08 UTC, Kai Knoblich
kai: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description sven.a.jonsson 2021-06-09 16:33:50 UTC
The current 2.6.4 version of pysolfc crashes at startup on new install of FreeBSD 13.0 with

Traceback (most recent call last):
  File "/usr/local/bin/pysolfc", line 36, in <module>
    from pysollib.main import main  # noqa: E402,I202
  File "/usr/local/lib/python3.8/site-packages/pysollib/main.py", line 30, in <module>
    from pysollib.app import Application
  File "/usr/local/lib/python3.8/site-packages/pysollib/app.py", line 31, in <module>
    from pysollib.gamedb import GAME_DB, GI, loadGame
  File "/usr/local/lib/python3.8/site-packages/pysollib/gamedb.py", line 28, in <module>
    from pysollib.mfxutil import Struct, print_err
  File "/usr/local/lib/python3.8/site-packages/pysollib/mfxutil.py", line 146, in <module>
    uclock = time.clock
AttributeError: module 'time' has no attribute 'clock'

This was reported to upstream in "https://github.com/shlomif/PySolFC/issues/145" as an incompatibility with python 3.8 and is fixed in newer versions.
Comment 1 Kai Knoblich freebsd_committer 2021-06-10 05:08:32 UTC
Created attachment 225684 [details]

(In reply to sven.a.jonsson from comment #0)


thank you for the report!

Can you please try the attached patch? It should fix the issue with
"clock.time", that was removed in Python 3.8.

An update to 3.10.1 is not entirely trivial and requires more work than I
currently have time because.
Comment 2 Kai Knoblich freebsd_committer 2021-06-10 05:13:24 UTC
^ Triage: Set maintainer-feedback and merge-quarterly (version in 2021Q2 branch is also affected) flags accordingly, adding external reference from comment #0 to "See also".
Comment 3 sven.a.jonsson 2021-06-10 06:12:01 UTC
Thank you so much for your quick response!
I have just applied the attached patch and built and installed pysolfc using synth, and I can verify that it appears to be fully functional.