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

Move iocpsupport to external dist #1446

Merged
merged 9 commits into from
Oct 21, 2020

Conversation

graingert
Copy link
Member

@graingert graingert commented Oct 14, 2020

another crack at this allows a single source .whl for mac/linux and windows 🎉 https://github.com/twisted/twisted/pull/812/files

Contributor Checklist:

@graingert graingert force-pushed the move-iocpsupport-to-external-dist branch from 501977f to 562571a Compare October 14, 2020 10:25
@graingert graingert force-pushed the move-iocpsupport-to-external-dist branch from 562571a to 8c4b9f5 Compare October 14, 2020 10:47
setup.cfg Outdated Show resolved Hide resolved
@graingert graingert marked this pull request as ready for review October 16, 2020 01:30
Copy link
Member

@adiroiban adiroiban left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this.

This should make Twisted deployment simpler and faster.

I am +1 for moving iocpsupport as a separate package.
I am -1 for moving the source code outside of twisted/twisted

The tests for iocpsupport are part of the main twisted tests...so is best to have the code in the same repo.

Maybe have the twisted-iocpsupport source code moved to src/twisted_iocpsupprt package.
In root we can have a setup_twisted_iocpsupport.py which takes care of the wheel build.

We can have a github action to build the iocpsupport wheel when any file is modified inside the src/twisted_iocpsupport dir.
We can have a github action to publish the iocpsupport wheel when a tag starting with 'iocpsupport-VNNN' is created.

In tox, when tests are executed, iocpsupport is installed from the binary wheel.
In tox, we can have an option (commented / uncommented line) to build and use the code from src/twisted_iocpsupport when we want to develop iocpsupport

@adiroiban
Copy link
Member

For reference... and I think this should be in the PR description.

The code was moved here https://github.com/graingert/twisted-iocpsupport

"send",
]

from twisted_iocpsupport.iocpsupport import (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we have all this as from twisted_iocpsupport import recv ?

And maybe add a deprecation so that in the future the code will import directly from twisted_iocpsupport and not from this redirection.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably worth doing https://github.com/asottile/reorder_python_imports everywhere in a followup

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well.. in Twisted we have backward compatibility policy, so you can't remove something from the public namespace without a prior deprecation warning.

But I can create the deprecation part after this is merged.

@adiroiban
Copy link
Member

For the newsfragment. My suggestion.

twisted.internet.iocpreactor.iocpsupport was moved to a separate package.
With this change the main Twisted package is a OS independent wheel.

setup.cfg Outdated
@@ -31,6 +31,7 @@ install_requires =
Automat >= 0.8.0
hyperlink >= 17.1.1
attrs >= 19.2.0
twisted-iocpsupport ~= 0.0.1; platform_system == "Windows"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
twisted-iocpsupport ~= 0.0.1; platform_system == "Windows"
twisted-iocpsupport ~= 1.0; platform_system == "Windows"

@graingert graingert closed this Oct 21, 2020
@graingert graingert reopened this Oct 21, 2020
Copy link
Member

@adiroiban adiroiban left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Let's merge this.

Have you executed blank on setup.py ?

@graingert
Copy link
Member Author

Have you executed blank on setup.py ?

nope

@graingert graingert merged commit 30c1315 into twisted:trunk Oct 21, 2020
@graingert graingert deleted the move-iocpsupport-to-external-dist branch October 21, 2020 14:33
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 this pull request may close these issues.

None yet

2 participants