osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[requirements][placement] orjson instead of stdlib json


On Wed, Aug 28, 2019 at 04:46:11PM +0000, Jeremy Stanley wrote:
> On 2019-08-28 09:47:22 +0100 (+0100), Chris Dent wrote:
> [...]
> > Otherwise it's fine: active, Apache2 or MIT license.
> > 
> > Thoughts?
> > 
> > [1] https://pypi.org/project/orjson/
> [...]
> 
> One thing worth noting is that they don't publish an sdist to PyPI,
> only wheels: https://pypi.org/project/orjson/#files
> 
> This means that when I try to install it into a venv created with my
> local build of Python v3.8.0b3 it fails to find any installable
> orjson because there's no fallback on PyPI beyond the Python
> releases and platforms for which they've explicitly produced wheels.
> 
> There's https://github.com/ijl/orjson/issues/18 open for over two
> months requesting wheels for Python 3.8, but it's going to be a
> treadmill if they're not also publishing an sdist. It's further a
> potential license concern, since they're not publishing the source
> code alongside the wheels (so if for example the upstream Git
> repository goes away...). The official Python Packaging Guide notes
> that sdist publication is strongly recommended, and that publishing
> wheels in addition to that is optional:
> 
> https://packaging.python.org/guides/distributing-packages-using-setuptools/#source-distributions
> 
> If this is a library you care about using, it may make sense to
> attempt to make these points to its maintainer(s).

I expect that it's because orjson is actually a python api for rust code. It
looks like they chose to use pyo3-pack instead of setuptools-rust (which is
normally what I use). pyo3-pack only recently added support for building sdists
but it's only been included in a beta release so far (It was a longstanding
issue with pyo3-pack https://github.com/PyO3/pyo3-pack/issues/2 ).

Also, even assuming orjson start publishing sdists you'll still need nightly
rust installed to compile it since pyo3 only works with the nightly builds of
rust at this point. Which while not difficult to do, is not something people
typically have installed.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack-discuss/attachments/20190828/7ee89e52/attachment.sig>