Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unclear licensing for pyo3-ffi #3124

Closed
puradox opened this issue Apr 29, 2023 · 1 comment · Fixed by #3390
Closed

Unclear licensing for pyo3-ffi #3124

puradox opened this issue Apr 29, 2023 · 1 comment · Fixed by #3390

Comments

@puradox
Copy link
Contributor

puradox commented Apr 29, 2023

The pyo3-ffi crate is specified as licensed under Apache 2.0, but pyo3-ffi/LICENSE resembles the Python 3 license. The README mentions "PyO3 is licensed under the Apache-2.0 license. Python is licensed under the Python License" but the presence of pyo3-ffi/LICENSE may imply this particular crate is licensed differently.

For clarification, is the code in the pyo3-ffi crate licensed under Apache 2.0 or Python 3.0?

@davidhewitt
Copy link
Member

I asked Van Lindberg about this, with the following reply:

You can probably license under Apache+MIT. If you directly copied any extraneous expression (think implementing code) from CPython, then you might have an issue. But if you have only copied what is absolutely necessary for binary compatibility - which is likely considering your implementation is in Rust - then the use of Python's header is fair use under Google v. Oracle and can be licensed as you wish as a new work.

My understanding is that we have done as pure a reproduction of the CPython header files in Rust as is "absolutely necessary for binary compatibility" as per above. So I believe the licence of Apache 2.0 is correct (soon to be dual Apache/MIT, see #2339), like the rest of PyO3.

If the pyo3-ffi/LICENSE file is confusing, I suggest we replace it with pyo3-ffi/ACKNOWLEDGEMENTS which contains something along the lines of

This is a Rust reimplementation of the CPython public header files as necessary for binary compatibility, with additional metadata to support PyPy.

For original implementations please see
https://github.com/python/cpython
https://foss.heptapod.net/pypy/pypy

puradox added a commit to puradox/pyo3 that referenced this issue Aug 15, 2023
Replace the Python license from pyo3-ffi/LICENSE with an
ACKNOWLEDGEMENTS file.

pyo3-ffi contains a pure Rust reproduction of the CPython header files;
only copying what is absolutely necessary for binary compatibility. As
such, it is unnecessary to include the Python license.

Fixes PyO3#3124
puradox added a commit to puradox/pyo3 that referenced this issue Aug 15, 2023
Replace the Python license from pyo3-ffi/LICENSE with an
ACKNOWLEDGEMENTS file. Relicense under the parent Apache 2.0 license.

pyo3-ffi contains a Rust reproduction of the CPython header files, only
copying what is absolutely necessary for binary compatibility. As such,
it is unnecessary to include the Python license.

Fixes PyO3#3124
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants