Opened 5 years ago
Closed 22 months ago
#13611 closed defect (fixed)
Plugin fails on Trac 1.4
Reported by: | Owned by: | Cinc-th | |
---|---|---|---|
Priority: | normal | Component: | XmlRpcPlugin |
Severity: | normal | Keywords: | |
Cc: | duytscal, Gasol Wu, peter.miniar@… | Trac Release: | 1.4 |
Description
When installed and enabled, the current trunk version of the plugin breaks Trac 1.4 with a message:
Trac detected an internal error: AttributeError: 'Environment' object has no attribute 'systeminfo'
Uninstalling the plugin restores Trac to working order:
$ pip uninstall TracXMLRPC DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support Uninstalling TracXMLRPC-1.1.7: Would remove: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/TracXMLRPC-1.1.7.dist-info/* /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tracrpc/* Proceed (y/n)? y Successfully uninstalled TracXMLRPC-1.1.7
Attachments (0)
Change History (29)
comment:1 Changed 5 years ago by
comment:2 Changed 5 years ago by
Owner: | changed from osimons to Ryan J Ollos |
---|---|
Status: | new → accepted |
comment:5 Changed 5 years ago by
There are a few more issues to fix. I will let you know when it's ready to test.
comment:6 Changed 5 years ago by
It's too much to keep the plugin compatible all the way back to Trac 0.11. I'm going to make a branch and drop support for Trac < 1.4.
comment:7 Changed 5 years ago by
Any updates on this Ryan? Where can I check the new branch to try it out? Thanks
comment:8 Changed 5 years ago by
Cc: | duytscal added |
---|
comment:9 Changed 5 years ago by
I tried with the latest SVN version, failing with
2019-11-18 13:10:06,795 Trac[loader] DEBUG: Loading plugin "tractags.xmlrpc" from "/mnt/data/trac/projects/trac-pp/plugins/TracTags-0.11.dev0-py2.7.egg" 2019-11-18 13:10:06,797 Trac[loader] ERROR: Skipping "tractags.xmlrpc = tractags.xmlrpc [tracrpc]": ImportError: cannot import name wiki_to_oneliner ... 2019-11-18 13:14:34,866 Trac[main] WARNING: [10.199.222.111] HTTPNotFound: 404 Not Found (No handler matched request to /rpc), <RequestWithSession "POST '/rpc'">, referrer None
After finding a working patch, please push to PyPI. Thanks.
comment:10 Changed 5 years ago by
Cc: | Gasol Wu added |
---|
comment:11 Changed 5 years ago by
Cc: | peter.miniar@… added |
---|
comment:13 follow-up: 14 Changed 5 years ago by
https://github.com/Gasol/trac-xmlrpcplugin/tree/trac-1.5
I was working on this, You can try it, It should be work with Trac-1.4 too.
comment:14 follow-up: 15 Changed 5 years ago by
Replying to Gasol Wu:
https://github.com/Gasol/trac-xmlrpcplugin/tree/trac-1.5
I was working on this, You can try it, It should be work with Trac-1.4 too.
I tried installing by pip, but failed:
$ pip2 install --user svn+https://github.com/Gasol/trac-xmlrpcplugin.git/trunk Collecting svn+https://github.com/Gasol/trac-xmlrpcplugin.git/trunk Checking out https://github.com/Gasol/trac-xmlrpcplugin.git/trunk to /tmp/pip-req-build-TlVTEk Running command svn checkout -q --force-interactive https://github.com/Gasol/trac-xmlrpcplugin.git/trunk /tmp/pip-req-build-TlVTEk ERROR: Command errored out with exit status 1: command: /usr/bin/python2.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-TlVTEk/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-TlVTEk/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-req-build-TlVTEk/pip-egg-info cwd: /tmp/pip-req-build-TlVTEk/ Complete output (3 lines): Traceback (most recent call last): File "<string>", line 1, in <module> IOError: [Errno 2] No such file or directory: '/tmp/pip-req-build-TlVTEk/setup.py' ---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Then I've built the egg manually and installed, but /rpc leads to
No handler matched request to /rpc.
My test command from a remote host to test the API is:
curl -s -H "Content-Type: application/xml" --data @- http://TracBot:vGJCp4aT0X@trac/trac-pp/rpc <<< '<?xml version="1.0"?><methodCall><methodName>ticket.get</methodName><params><param><int>11794</int></param></params></methodCall>'
comment:15 Changed 5 years ago by
comment:16 follow-up: 17 Changed 5 years ago by
Github provides both git and svn access on the same URL. And because git does not support accessing sub-trees like /trunk I just switched over to svn. I was not able to install from git either.
Though I learned how to set branches in git like https://pip.pypa.io/en/stable/reference/pip_install/#git
comment:17 Changed 5 years ago by
Replying to Massimo:
Github provides both git and svn access on the same URL. And because git does not support accessing sub-trees like /trunk I just switched over to svn. I was not able to install from git either.
Though I learned how to set branches in git like https://pip.pypa.io/en/stable/reference/pip_install/#git
Does it work for you? It's still under development, If you have any issues, feel free to tell me.
comment:18 Changed 5 years ago by
The setup.py
is typically located at top directory but it is not in the repository.
If Git is used, it is able to specify the sub directory using #subdirectory=...
. Also, it is needed to specify the branch trac-1.5
in @<branch-name>
.
$ pip install git+https://github.com/Gasol/trac-xmlrpcplugin.git@trac-1.5#subdirectory=trunk
If Subversion is used, is is able to specify in the URL instead of #subdirectory=...
.
$ pip install svn+https://github.com/Gasol/trac-xmlrpcplugin/branches/trac-1.5/trunk
It is able to install with a zip file as well.
$ pip install https://github.com/Gasol/trac-xmlrpcplugin/archive/trac-1.5.zip#subdirectory=trunk
comment:19 Changed 5 years ago by
Thanks, I was able to install it now like
pip2 install --user svn+https://github.com/Gasol/trac-xmlrpcplugin/branches/trac-1.5/trunk
... and it seems to work now. Thank you very much. Please integrate and release...
comment:20 Changed 5 years ago by
Since it's ready to go, why not merge to master, or at least mention the install address in wiki page?
comment:21 Changed 5 years ago by
Installing without explicit laying an egg doesn't work for me. Correct install command:
pip install svn+https://github.com/Gasol/trac-xmlrpcplugin/branches/trac-1.5/trunk#egg=TracXMLRPC
comment:22 Changed 4 years ago by
This worked for me for the problem with "cannot import name wiki_to_oneliner"
comment:24 Changed 4 years ago by
In [18171]:
XmlRpcPlugin: fixed installation issues with Trac 1.4. Bumped version to 1.1.10. Note that notifications for ticket creation/changes are disabled for now. Refs #13611
This commit message was lost somehow...
comment:25 follow-up: 26 Changed 4 years ago by
comment:26 Changed 4 years ago by
Replying to Cinc-th:
the
dev
tag is not set insetup.cfg
. Should I set it?
Yeah, sounds good.
Note that I (maybe/probably prematurely) already increased the version to 1.1.10 in [18171].
We may want to bump to 1.2.0dev since we are dropping support for older Trac versions and adding support for newer Trac versions.
comment:28 Changed 3 years ago by
Owner: | changed from Ryan J Ollos to Cinc-th |
---|---|
Status: | accepted → assigned |
comment:29 Changed 22 months ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
The latest works with Trac 1.4.
Since t:comment:34:ticket:11901 Plugins need to implement the
ISystemInfoProvider
interface instead of usingsysteminfo
.