-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Get rid of asynchat_25.py, asyncore_25.py and loggers.py #109
Comments
In Python 2.6, asyncore changed in incompatible ways. We brought this up on python-dev. It became necessary for us to bundle these modules to add support for Python 2.6 while still supporting the earlier versions. Today, Supervisor still supports down to Python 2.4.
A few years back, we did extensive profiling throughout Supervisor, and this resulted in various performance improvements. We thought we were spending an unacceptable amount of time in logging, so we rolled our own.
No, not at this time. It's possible we might change it in a later version but there's no incentive right now. Medusa has worked well for Supervisor for years and users of Supervisor are not exposed to it. |
I understand the reasoning of keeping supervisor compatible with Python 2.4, but I think that time is come to leave this old version behind and create a new non-backward-compatible version of supervisor. (This does not mean that a Py24-compatible (=today's) version cannot be made available for interested people in a separate fork) IMHO leaving those old dependencies would improve supervisors code quality and increase the project's attractiveness. |
We are not going to create two different versions of Supervisor at this time. Supervisor supported Python 2.3 until a few months ago. It will remain compatible with Python |
Can we reopen this? Support for 2.5 is no longer a concern. |
The incompatibilities mentioned make it non-trivial to swap out the bundled versions for the standard library versions. |
I'm fairly convinced that medusa is at the root of a lot of the Python 3 porting issues. The package itself was written for Python 2, and we're trying to use it mostly as-is but with text_socket.py faking strings into and out of sockets, which breaks Python 3's |
In the case that we decide to stick with medusa, here's my take on the steps needed if we were to properly port it to Python 3:
1 and 2 are needed before any of this code is touched, and 3-7 all have somewhat interleaved dependencies on each other. Given the amount of work this would take, it seems more sensible to me to replace medusa entirely. Either way this is more work than I'm willing to do at this stage, but hopefully this is of use to anyone else wanting to help out. |
I think the above comments by @evanunderscore have nailed it - the use of Note that python-dev has deprecated Barry Warsaw said in another Python issue that
which seems to the point. |
I also suspect that |
I think a new approach is needed. I think the following steps should be attempted:
Thoughts? |
That approach sounds good to me if you're able to make it work. I tried, but gave up because medusa doesn't appear to have any tests (other than the bits that are tested indirectly by other things), and the interactions between |
I've more or less got it working as regards the existing issues labelled "python 3" - that's to say, simple smoke tests work. Looking at adding some tests to cover these specific issues. All the unit tests pass on 2.x and 3.x with my changes, which isn't perhaps saying all that much.The changes are not in my fix-638 branch, because I thought I would start anew with the approach I described above. See this Gist for the current working diff. You might want to try applying to current master and having a play with it to see if you can flush out any problems. The tests have needed a lot of changes because of their fine granularity - they are useful but ultimately not as useful as functional tests, which are a bit thin on the ground here. I've had to do quite a bit of |
Nice! How difficult do you think it will be to include those test cases in the automated test suite? |
I tried for one or two, using Also, interacting with the |
Perhaps |
This gist turns one of your examples into a
Note that it fails in Python 2 because of an actual bug. |
I was just trying to avoid adding a dependency ... but as it's only for test, that shouldn't be too problematic ... |
Re. the missing Re. the end-to-end test failure on Python 2.x - that's more involved. It hinges on code in Fun and games! I think it's better not to make |
I've updated the Gist to add your end-to-end tests and the others, too, with their fixture data. At the moment I get consistent failures on 2.x and 3.x for |
I forgot about the For why you're getting failures - it's a timing problem. In |
D'Oh! Thanks for pointing out what I should have seen on the |
Thanks, you too! |
Is there a special reason why supervisor/medusa is using asynchat_25.py, asyncore_25.py and loggers.py instead of their equivalent modules shipped with any standard python release? (asynchat, asyncore and logging)
Is it due to a lack of time of the supervisor developers that these are used or is there any other special reason?
My guess is that nobody wants to venture a too deep trip into medusa?!
BTW: Are there any plans to get rid of (or better: replace) medusa? This project seems quite dead?
The text was updated successfully, but these errors were encountered: