See https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproje...
particularly:
copr-backend copr-frontend copr-dist-git copr-frontend copr-keygen copr-rpmbuild python-copr
use: python3-mock python3-simplejson
Could you please see how hard it is to get rid of those? For compatibility with Python 2 + 3, you can always do:
try: from unittest import mock except ImportError: # Python 2 version depends on mock import mock
and:
try: # Python 2 version depends on simplejson import simplejson as json except ImportError: import json
If you have dependencies in setup.py, you can do something like:
https://github.com/zopefoundation/ZEO/blob/master/setup.py#L137 https://github.com/qtile/qtile/blob/develop/setup.py#L95 or https://www.python.org/dev/peps/pep-0508/
See also https://hynek.me/articles/conditional-python-dependencies/
Thank you,
On 30.6.2018 15:22, Miro Hrončok wrote:
See https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproje...
particularly:
copr-backend copr-frontend copr-dist-git copr-frontend copr-keygen copr-rpmbuild python-copr
use: python3-mock python3-simplejson
Also note that in that thread linked above a point was made that simplejson might not just be a backport but porjects utilize it for spped. So my question is, why do you use simplejson in Copr? Is it speed? If so, do you have some actual data? Have you tried ujson?
https://pypi.org/project/ujson/
Thanks for info.
Hello Miro,
On Sun, Jul 1, 2018 at 7:20 PM Miro Hrončok mhroncok@redhat.com wrote:
On 30.6.2018 15:22, Miro Hrončok wrote:
See
https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproje...
particularly:
copr-backend copr-frontend copr-dist-git copr-frontend copr-keygen copr-rpmbuild python-copr
use: python3-mock python3-simplejson
Also note that in that thread linked above a point was made that simplejson might not just be a backport but porjects utilize it for spped. So my question is, why do you use simplejson in Copr? Is it speed? If so, do you have some actual data? Have you tried ujson?
https://pypi.org/project/ujson/
Thanks for info.
We will look into it and let you know as soon as possible.
Thank you for the hints how to fix it!
Best regards Copr team
-- Miro Hrončok -- Phone: +420777974800 IRC: mhroncok _______________________________________________ copr-devel mailing list -- copr-devel@lists.fedorahosted.org To unsubscribe send an email to copr-devel-leave@lists.fedorahosted.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/copr-devel@lists.fedorahosted....
On Sun, Jul 1, 2018 at 7:42 PM Michal Novotny clime@redhat.com wrote:
Hello Miro,
On Sun, Jul 1, 2018 at 7:20 PM Miro Hrončok mhroncok@redhat.com wrote:
On 30.6.2018 15:22, Miro Hrončok wrote:
See
https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproje...
particularly:
copr-backend copr-frontend copr-dist-git copr-frontend copr-keygen copr-rpmbuild python-copr
use: python3-mock python3-simplejson
Also note that in that thread linked above a point was made that simplejson might not just be a backport but porjects utilize it for spped. So my question is, why do you use simplejson in Copr? Is it speed? If so, do you have some actual data? Have you tried ujson?
https://pypi.org/project/ujson/
Thanks for info.
We will look into it and let you know as soon as possible.
Thank you for the hints how to fix it!
For the python3-mock part, this PR was opened https://pagure.io/copr/copr/pull-request/336#request_diff
I additionally investigated why we use python-simplejson in clients and the main reason is that it has a handy `for_json` attribute in `simplejson.dumps` method, which enables us to invoke for_json() method of an object when serializing it. We use it in our API1, which will soon become deprecated so I would like to keep it there for the time being.
In other Copr components like frontend, backend, keygen, which are only for python3, we can easily switch to python3-ujson. Thanks for that suggestion, it really seems very fast. We can also employ it in the new APIv3, which needs to be discussed a bit further but I think it should be possible.
Best regards Copr team
Best regards Copr team
-- Miro Hrončok -- Phone: +420777974800 IRC: mhroncok _______________________________________________ copr-devel mailing list -- copr-devel@lists.fedorahosted.org To unsubscribe send an email to copr-devel-leave@lists.fedorahosted.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/copr-devel@lists.fedorahosted....
On Fri, Jul 6, 2018 at 12:11 PM Michal Novotny clime@redhat.com wrote:
On Sun, Jul 1, 2018 at 7:42 PM Michal Novotny clime@redhat.com wrote:
Hello Miro,
On Sun, Jul 1, 2018 at 7:20 PM Miro Hrončok mhroncok@redhat.com wrote:
On 30.6.2018 15:22, Miro Hrončok wrote:
See
https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproje...
particularly:
copr-backend copr-frontend copr-dist-git copr-frontend copr-keygen copr-rpmbuild
I opened https://pagure.io/copr/copr/pull-request/350#request_diff for those. Thanks for the python3-ujson recommendation!
clime
python-copr
use: python3-mock python3-simplejson
Also note that in that thread linked above a point was made that simplejson might not just be a backport but porjects utilize it for spped. So my question is, why do you use simplejson in Copr? Is it speed? If so, do you have some actual data? Have you tried ujson?
https://pypi.org/project/ujson/
Thanks for info.
We will look into it and let you know as soon as possible.
Thank you for the hints how to fix it!
For the python3-mock part, this PR was opened https://pagure.io/copr/copr/pull-request/336#request_diff
I additionally investigated why we use python-simplejson in clients and the main reason is that it has a handy `for_json` attribute in `simplejson.dumps` method, which enables us to invoke for_json() method of an object when serializing it. We use it in our API1, which will soon become deprecated so I would like to keep it there for the time being.
In other Copr components like frontend, backend, keygen, which are only for python3, we can easily switch to python3-ujson. Thanks for that suggestion, it really seems very fast. We can also employ it in the new APIv3, which needs to be discussed a bit further but I think it should be possible.
Best regards Copr team
Best regards Copr team
-- Miro Hrončok -- Phone: +420777974800 IRC: mhroncok _______________________________________________ copr-devel mailing list -- copr-devel@lists.fedorahosted.org To unsubscribe send an email to copr-devel-leave@lists.fedorahosted.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/copr-devel@lists.fedorahosted....
copr-devel@lists.fedorahosted.org