On 03. 05. 19 23:36, Robert-André Mauchin wrote:
Hello,
patool FTBFS depends on Archmage, which is Python 2 only.
I'm trying to convert it to Python 3.
So far I have the dependency pychm converted:
https://copr.fedorainfracloud.org/coprs/eclipseo/pythontests/build/903162/
Here's my Py3 port with 2to3 and minor fixes:
https://github.com/eclipseo/archmage/tree/python3_port
The problem is it doesn't work as expected:
$ archmage -x t.chm
Traceback (most recent call last):
File "/usr/bin/archmage", line 11, in <module>
load_entry_point('archmage==0.3.1', 'console_scripts', 'archmage')()
File "/usr/lib/python3.7/site-packages/archmod/cli.py", line 161, in main
CHMFile(options.chmfile) or CHMDir(options.chmfile)
File "/usr/lib/python3.7/site-packages/archmod/Cached.py", line 34, in
__new__
__instance = object.__new__(classtype, *args, **kwargs)
TypeError: object.__new__() takes exactly one argument (the type to instantiate)
I don't think you can do this in either Python version. On Python 2, I get:
TypeError: object() takes no parameters
When I try to use object.__new__(classtype, *args, **kwargs).
The reason that this only happens on Python 3 might be somewhere else.
I think that code is wrong either way, just replace it with
object.__new__(classtype).
--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok
_______________________________________________
python-devel mailing list -- python-devel@lists.fedoraproject.org
To unsubscribe send an email to python-devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org