stompest
stompest copied to clipboard
stompest.async will be unusable on python 3.7+
This is a drive-by bug report, I don't use this lib, but I noticed that it will be impossible to use on 3.7+ since async
becomes a real keyword then. Ref https://www.python.org/dev/peps/pep-0492/
Thank you. That's a breaking change indeed.
Does anyone have a suggestion for an alternative to the pair of names sync/async?
thanks @cdunklau for reporting on behalf. i ended up using the sync version instead :(
@nikipore you intend to port the package to support python async? in that case you could follow the convention followed by similar async packages with aiostomp
.
@arjunv: I am no longer using stompest
actively, because I have moved on inside the enterprise —
who still uses stompest
in production but has no-one with both the skill and time to maintain it — to a non-coding strategic/leadership position. Therefore, it is more of a hobby, and I have to rebuild my testing and building environment from scratch every few months which rather sucks.
A few random thoughts:
- I still do accept (and test) pull requests and bugfixes, but the Python 3 port was my last big effort for stompest.
- I believe that the (half-complete) SSL/TLS capability is the most urgent improvement because I see
stompest
pretty much feature complete and stable up to Python 3.6; it displays a very low rate of found bugs indeed. - For Python 3.7, the
stompest.async
package should be renamedstompest.twisted
. If someone creates a pull request, I'll test it and rename the PyPI package accordingly. - A port to
asyncio
would make a lot of sense. If someone creates a pull request, I'll test it and create a new PyPI package. - If someone wants to take over the project, please let me know. I would actively consult as an éminence grise.
@arjunv it looks like you misunderstood this bug report. In case that's true, I'll be explicit:
while it appears that stompest.async
should work on versions of Python 3 that Twisted supports (3.3 - 3.6), the problem I reported is that it will just not work on 3.7+ due to the PEP 492-required change.
@cdunklau Actually you cannot import the package from within an async function, as I had attempted to do, which had caused the bug in my code, in the first place. This would be true for python > 3.5 and not just 3.7+. (Of course you can globally import, but I was using a custom module to install and import external packages in runtime [for a client who can't even be bothered with installing packages], which forced me to do import within an async function).
Python 3.6.4 (default, Dec 23 2017, 19:07:07)
>>> async def function():
... from stompest.async import Stomp
File "<stdin>", line 2
from stompest.async import Stomp
^
SyntaxError: invalid syntax
Bump, has any managed to rewrite this yet? Py3.7 is installed by default now.
Bump, it has been a while. I would hate to have to use an entirely differently library due to a naming issue like this.
https://github.com/nikipore/stompest/pull/54#issuecomment-466560631
I've renamed stompest.async to stompest.twisted as it was proposed, also had to update activemq user credentials for unit tests as it didn't work with the default empty user/pass.
I've checked the unit tests - all stompest.twisted tests have passed, but one test in stompest.core fails (test_5_integration_stomp_1_1_heartbeat).
https://github.com/sergey-sobolev/stompest/tree/develop
Anybody willing to test?