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
gh-95649: Document that asyncio contains uvloop code #107536
base: main
Are you sure you want to change the base?
gh-95649: Document that asyncio contains uvloop code #107536
Conversation
Some of the asyncio SSL changes in pythonGH-31275 were taken from [v0.16.0 of the uvloop project][1]. In order to comply with the MIT license, we need to just need to document the copyright information. [1]: https://github.com/MagicStack/uvloop/tree/v0.16.0
As prior art (just looking through
Given that code was incorporated here, perhaps the best route is instead to add the full A |
(Adding the backport labels as whatever the end result is, the correct licence notices should exist in Python 3.11, where the change first appeared.) |
Already done! Although, I've just linked to the Lines 1045 to 1069 in efa45b0
We still need some information in each individual file, since CPython's But sticking the full license text in every file is very verbose and difficult to summarize. It's why the Linux kernel and lots of other OSS projects have switched to using the SPDX standard, so people can just write FYI, I'm not a lawyer, so I'm just following what other projects do, like the Linux kernel. I'm going to ping @tiran, since as the author of #95649 and python/devguide#928, they probably care the most about this subject. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update -- I realise I was unclear, I had intended to ask why we don't only include the notice in Doc/license.rst
, but you've addressed my concerns. One suggestion on wording for the text in license
:
Thanks!
Adam
Doc/license.rst
Outdated
asyncio | ||
---------- | ||
|
||
The :mod:`asyncio` module contains the following notice:: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The :mod:`asyncio` module contains the following notice:: | |
Parts of the :mod:`asyncio` module are incorporated from uvloop 0.16, | |
which is distributed under the MIT license:: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea! Changed in aloisklink@d5aee03 (I've also made the uvloop 0.16
text a hyperlink to https://github.com/MagicStack/uvloop/tree/v0.16.0)
Reword `Doc/license.rst` file, as suggested in python#107536 (comment) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Some of the asyncio SSL changes in GH-31275 were taken from v0.16.0 of the uvloop project. In order to comply with the MIT license, we need to just need to document the copyright information.
Design decisions
How did I pick the files to add licensing info to?
I went through commit 13c10bf and added the
# SPDX-FileCopyrightText: ...
for changes to any file that has substantial code taken from https://github.com/MagicStack/uvloop/tree/v0.16.0.The uvloop MIT license copyright text is
Copyright (c) 2015-present MagicStack Inc. http://magic.io
, so I changed it toCopyright (c) 2015-2021 MagicStack Inc. http://magic.io
, as when 13c10bf was committed, the uvloop code was last modified in 2021.Why did I use the
# SPDX-...
comment format?Since there isn't yet a standard way to document licensing/copyright info (see python/devguide#928 for the issue tracking this), I've used the
# SPDX-FileCopyrightText
/# SPDX-License-Identifier
format since that's the SPDX spec, which is the most common method of doing copyright/licensing information, used by Linux.Normally, we should also add a
# SPDX-FileCopyrightText: Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 Python Software Foundation; All Rights Reserved
line, but then we'd have to update the line every year, and I think theLICENSE
file already covers this.Why is there no
# Licensed to PSF under a Contributor Agreement.
comment?As raised in #95649, there's no information about whether the contributor actually had the rights to relicense this code under the PSF.
Personally, the changes in
Lib/asyncio
seem to come from uvloop code authored by either @asvetlov, or @MagicStack employees, so it should be pretty easy to relicense these files under the PSF, assuming @MagicStack approves. See https://github.com/MagicStack/uvloop/commits/v0.16.0/uvloop/sslproto.pyx (MagicStack/uvloop@ef29dab is by an author that isn't @MagicStack or @asvetlov, but that change is pretty trivial, so it should still be okay to relicense).However,
Lib/test/test_asyncio/test_ssl.py
seems to have a bunch of different authors from uvloop. And since there doesn't seem to be a uvloop CLA, even if @MagicStack approves, I don't think we can relicense this file under the PSF.📚 Documentation preview 📚: https://cpython-previews--107536.org.readthedocs.build/