[Twisted-Python] Moving iocpsupport to an external package? Implications on Windows?
Looking at this PR: https://github.com/twisted/twisted/pull/1446 I see that iocpsupport was moved to a separate package, in order to make building wheels on Windows easier. Before this patch, I was prototyping building binary wheels on Windows of Twisted core, and I had it working. It looks like this code has now moved to: https://github.com/twisted/twisted-iocpsupport How will this patch change for people installing Twisted on Windows? Twisted is still used by a lot of users on Windows, and the IOCP Reactor is still used on this platform. -- Craig
On Feb 10, 2021, at 12:40 AM, Craig Rodrigues <rodrigc@crodrigues.org> wrote:
How will this patch change for people installing Twisted on Windows?
Twisted is still used by a lot of users on Windows, and the IOCP Reactor is still used on this platform.
This line is what does the trick: https://github.com/twisted/twisted/pull/1446/files#diff-fa602a8a75dc9dcc9226... <https://github.com/twisted/twisted/pull/1446/files#diff-fa602a8a75dc9dcc9226...> Basically, on Windows, you'll automatically get the `twisted-iocpsupport` module as a hard dependency. On other platforms, you won't. Unless you're using a truly ancient `pip` (which is less likely on Windows, where people tend to install things themselves rather than getting them from a calcified platfom) this will just work ✨ magically ✨. (Personally I think that in a future change, we should seriously consider moving this to an extra, since for some Windows users the simplicity of a pure-python install outweighs the performance improvements of a binary dependency. And it should be possible to install Twisted without this accelerator. But that is a very minor point compared to the benefits of not having to drag platform-variant wheels around for all other platforms!) -g
On Wednesday, February 10, 2021, Glyph <glyph@twistedmatrix.com> wrote:
On Feb 10, 2021, at 12:40 AM, Craig Rodrigues <rodrigc@crodrigues.org> wrote:
How will this patch change for people installing Twisted on Windows?
Twisted is still used by a lot of users on Windows, and the IOCP Reactor is still used on this platform.
This line is what does the trick:
https://github.com/twisted/twisted/pull/1446/files#diff- fa602a8a75dc9dcc92261bac5f533c2a85e34fcceaff63b3a3a81d9acde2fc52R34
Basically, on Windows, you'll automatically get the `twisted-iocpsupport` module as a hard dependency. On other platforms, you won't. Unless you're using a *truly* ancient `pip` (which is less likely on Windows, where people tend to install things themselves rather than getting them from a calcified platfom) this will just work ✨ magically
Ok, thanks for the clarification. That is worth calling out in the release announcement, since that is a major change for Windows users. Is the https://github.com/twisted/twisted-iocpsupport repository subject to the same rules as the Twisted core repository such as: - must have a Trac ticket - PR can only be merged after review approval from a reviewer with write access to the https://github.com/twisted/twisted-iocpsupport repository. etc.? -- Craig
On Feb 10, 2021, at 6:45 AM, Craig Rodrigues <rodrigc@crodrigues.org> wrote:
On Wednesday, February 10, 2021, Glyph <glyph@twistedmatrix.com <mailto:glyph@twistedmatrix.com>> wrote:
On Feb 10, 2021, at 12:40 AM, Craig Rodrigues <rodrigc@crodrigues.org <mailto:rodrigc@crodrigues.org>> wrote:
How will this patch change for people installing Twisted on Windows?
Twisted is still used by a lot of users on Windows, and the IOCP Reactor is still used on this platform.
This line is what does the trick:
https://github.com/twisted/twisted/pull/1446/files#diff-fa602a8a75dc9dcc9226... <https://github.com/twisted/twisted/pull/1446/files#diff-fa602a8a75dc9dcc9226...>
Basically, on Windows, you'll automatically get the `twisted-iocpsupport` module as a hard dependency. On other platforms, you won't. Unless you're using a truly ancient `pip` (which is less likely on Windows, where people tend to install things themselves rather than getting them from a calcified platfom) this will just work ✨ magically
Ok, thanks for the clarification. That is worth calling out in the release announcement, since that is a major change for Windows users.
I don't disagree that it's worth calling out, but I might quibble on "major" change - it's a small build-configuration change that mostly affects Twisted contributors (in a positive way), and those with heavily locked-down build environments. From the perspective of a Twisted user on Windows who wants to make use of the IOCP reactor and is installing with a regular `pip install`, nothing changes except a new line in `pip freeze`.
Is the https://github.com/twisted/twisted-iocpsupport <https://github.com/twisted/twisted-iocpsupport> repository subject to the same rules as the Twisted core repository such as: - must have a Trac ticket
Yep! You can see in the README.rst on the repo, and also on its PyPI page: https://pypi.org/project/twisted-iocpsupport/ <https://pypi.org/project/twisted-iocpsupport/>
- PR can only be merged after review approval from a reviewer with write access to the https://github.com/twisted/twisted-iocpsupport <https://github.com/twisted/twisted-iocpsupport> repository. etc.?
The full @twisted/twisted-contributors team has write access to this repo so it's all set for any Twisted reviewer who has the time and inclination. I just noticed that PyPI just had me and graingert, though. Sadly, PyPI doesn't have teams, so I synced up the management permissions on the PyPI project to match Twisted. (The current list of uploaders isn't particularly principled or up to date, but better to have one list than two. And I don't want a bus-factor of 1...) -g
On Wed, Feb 10, 2021 at 2:57 PM Glyph <glyph@twistedmatrix.com> wrote:
On Feb 10, 2021, at 6:45 AM, Craig Rodrigues <rodrigc@crodrigues.org> wrote:
On Wednesday, February 10, 2021, Glyph <glyph@twistedmatrix.com> wrote:
On Feb 10, 2021, at 12:40 AM, Craig Rodrigues <rodrigc@crodrigues.org> wrote:
How will this patch change for people installing Twisted on Windows?
Twisted is still used by a lot of users on Windows, and the IOCP Reactor is still used on this platform.
This line is what does the trick:
https://github.com/twisted/twisted/pull/1446/files#diff-fa602a8a75dc9dcc9226...
Basically, on Windows, you'll automatically get the `twisted-iocpsupport` module as a hard dependency. On other platforms, you won't. Unless you're using a truly ancient `pip` (which is less likely on Windows, where people tend to install things themselves rather than getting them from a calcified platfom) this will just work magically
Ok, thanks for the clarification. That is worth calling out in the release announcement, since that is a major change for Windows users.
I don't disagree that it's worth calling out, but I might quibble on "major" change - it's a small build-configuration change that mostly affects Twisted contributors (in a positive way), and those with heavily locked-down build environments. From the perspective of a Twisted user on Windows who wants to make use of the IOCP reactor and is installing with a regular `pip install`, nothing changes except a new line in `pip freeze`.
I think that you are right, and everything will probably just work for Windows users. I'm just thinking from the perspective of a user of Twisted on Windows, who may not be familiar with all the latest innovations in pip, and may encounter a problem. But I think that these issues will be minor/few, and we can handle them post-release if necessary.
Yep! You can see in the README.rst on the repo, and also on its PyPI page: https://pypi.org/project/twisted-iocpsupport/
Thanks for the clarification. One unfortunate thing with this move to another repository is that version history has been lost, going all the way back to 2008. It's not the end of the world, since anyone who really wants that history can check out an earlier branch of twisted and look at it, but it is still an extra hop for someone to do. -- Craig
participants (2)
-
Craig Rodrigues
-
Glyph