Skip to content

fix twisted 22.10.0 incompability #1604

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

Merged
merged 3 commits into from
Dec 18, 2022
Merged

Conversation

Mic92
Copy link
Contributor

@Mic92 Mic92 commented Dec 11, 2022

No description provided.

@Mic92 Mic92 marked this pull request as draft December 11, 2022 18:26
@Mic92 Mic92 force-pushed the fix-twisted-compat branch 2 times, most recently from ec64fe7 to ffe679f Compare December 11, 2022 18:42
Copy link

@lopsided98 lopsided98 left a comment

Choose a reason for hiding this comment

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

@Mic92 Mic92 force-pushed the fix-twisted-compat branch from ffe679f to 84f00ec Compare December 11, 2022 19:35
@@ -100,7 +105,7 @@ def getChildWithDefault(self, name, request):
"""
This resource cannot have children, hence this will always fail.
"""
return NoResource("No such child resource.")
return notFound(message="No such child resource.")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now both and old code should be better aligned...

@Mic92 Mic92 marked this pull request as ready for review December 11, 2022 19:37
@oberstet
Copy link
Contributor

thanks for contributing! fwiw, I think the check CI step is failing due no a regression with CPy 311 - which the check step seems to use - and this is unrelated to the PR here (which looks good btw)

seems to be a thing a couple of project run into, google for "cannot import name 'getargspec' from 'inspect'" ..

I haven't dug further, but likely some import needs a fix, or the check CI step should use a fixed CPy, not CPy 3.x ...

@oberstet
Copy link
Contributor

oberstet commented Dec 11, 2022

the failing 2 steps (check and docs) in

https://github.com/crossbario/autobahn-python/blob/master/.github/workflows/main.yml

are failing since the steps use "open ended" python version

python-version: '3.x'

which runs into issues unrelated to the PR.

we might change those 2 location from "3.x" to "3.10".

and we should also expand

python-version: ['3.7', '3.10', 'pypy-3.8']

to ['3.7', '3.11', 'pypy-3.8'] ... if we are brave, maybe ['3.7', '3.11', 'pypy-3.9'] .. should work


with those changes to main.yaml, this PR should run fully green and could be merged

note: I just merged another PR already a couple of weeks old - which now runs red on check/docs after merging due to the same unrelated issue. so after above, everything should be green again;)

@Mic92
Copy link
Contributor Author

Mic92 commented Dec 11, 2022

done.

@oberstet
Copy link
Contributor

oberstet commented Dec 11, 2022

alright, thanks, that "fixed" (circumvents) the problem on check/docs step. unfortunately, the enabling of 3.11 for the main tests uncovers another issue:

/internet/test/fake_CAs
        running build_ext
        building 'twisted.test.raiser' extension
        creating build/temp.linux-x86_64-cpython-311
        creating build/temp.linux-x86_64-cpython-311/src
        creating build/temp.linux-x86_64-cpython-311/src/twisted
        creating build/temp.linux-x86_64-cpython-311/src/twisted/test
        gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/home/runner/work/autobahn-python/autobahn-python/.tox/tw1910/include -I/opt/hostedtoolcache/Python/3.11.0/x64/include/python3.11 -c src/twisted/test/raiser.c -o build/temp.linux-x86_64-cpython-311/src/twisted/test/raiser.o
        src/twisted/test/raiser.c:198:12: fatal error: longintrepr.h: No such file or directory
          198 |   #include "longintrepr.h"
              |            ^~~~~~~~~~~~~~~
        compilation terminated.
        error: command '/usr/bin/gcc' failed with exit code 1
        [end of output]
    
    note: This error originates from a subprocess, and is likely not a problem with pip.
  error: legacy-install-failure
  
  × Encountered error while trying to install package.
  ╰─> twisted

other project are running into this as well cython/cython#4428

googling for "twisted python 3.11 longintrepr.h" doesn't seem to return anything specific twisted related, so this might be a new twisted issue (on 3.11)


obviously, this is unrelated to this PR, and hence, you could change this PR again back to ['3.7', '3.10', 'pypy-3.8'] and we could merge this PR - well, unless you have a fix for twisted that is;)

as a consequence: we can't bump autobahn to fully support py 3.11, at least because of the remaining twisted issue .. sorry for the hassles! OSS maintenance real-world;)

@oberstet oberstet merged commit 392e198 into crossbario:master Dec 18, 2022
@Mic92 Mic92 deleted the fix-twisted-compat branch December 18, 2022 19:32
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.

3 participants