Skip to content

Conversation

@CJCombrink
Copy link
Contributor

@CJCombrink CJCombrink commented Nov 5, 2025

Fix issues as picked up by the MSVC build

Note: The disabling of the shared lib is done due to THRIFT-5898 and should be fixed by #3226 whereby the build will be changed again

  • Did you create an Apache Jira ticket? THRIFT-5899
  • If a ticket exists: Does your pull request title follow the pattern "THRIFT-NNNN: describe my issue"?
  • Did you squash your changes to a single commit? (not required, but preferred)
  • Did you do your best to avoid breaking changes? If one was needed, did you label the Jira ticket with "Breaking-Change"?
  • If your change does not involve any code, include [skip ci] anywhere in the commit message to free up build resources.

- PR#2929 called out that the changes breaks Python 3.5 since types came in in 3.6
- Python 3.6 errors out with 'from __future__ import annotations' since it looks like it was only added in 3.7
- Getting `raise TApplicationException(TApplicationException.MISSING_RESULT, "testEnum failed: unknown result"` error
- PR#2825 state it is a breaking change, not sure why and for what version of Python
- Appveyor error: ` AttributeError: module 'ssl' has no attribute 'PROTOCOL_TLS_CLIENT'`
@CJCombrink CJCombrink marked this pull request as ready for review November 5, 2025 13:20
CALL win_showenv.bat || EXIT /B
MKDIR "%WIN3P%" || EXIT /B

@ECHO ON
Copy link
Member

Choose a reason for hiding this comment

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

do we intend to leave this line in the code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will remove it.
I added it because for some reason the @ECHO ON at the top of the page got disabled and I wanted to check why the DISABLED_TESTS did not take affect. Still no idea but not needed any more

Comment on lines +50 to +52
if sys.version_info < (3, 6):
_default_protocol = ssl.PROTOCOL_SSLv23 if _has_ssl_context else \
ssl.PROTOCOL_TLSv1
Copy link
Member

@fishy fishy Nov 5, 2025

Choose a reason for hiding this comment

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

I do wish appveyor can use an actual supported version of python 😞

can you link some doc explaining that on python <3.6 we can only use ssl v2/v3 over tls? (similar to the ipv6 one below but in comment form)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I do wish appveyor can use an actual supported version of python 😞

Yes since there is no way to actually know if my changes now broken in newer versions of Python. The github action only test the lib and does not run the full test suite nor is python cross tested.

Would it make sense to try and add a new github action/pipeline for Windows builds to replicate what is done in Appveyor or should one look at adding a new Appveyor config? Not sure if there is a roadmap or task for something like this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

can you link some doc explaining that on python <3.6 we can only use ssl v2/v3 over tls? (similar to the ipv6 one below but in comment form)

I can try to add something that makes sense

Copy link
Contributor Author

@CJCombrink CJCombrink Nov 6, 2025

Choose a reason for hiding this comment

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

Digging a bit (and not just trying to get the build green) I am lead to believe that one would require Python 3.10 and OpenSSL 1.1.1 for the new TLS support: https://docs.python.org/3/library/ssl.html and https://docs.python.org/3.11/library/ssl.html#ssl.SSLContext

From the build output OpenSSL 1.0.2u is used.

I am not sure how to proceed here: Should I update my check to check for 3.10 instead and link to the ssl page?

@CJCombrink
Copy link
Contributor Author

CJCombrink commented Nov 6, 2025

@Jens-G @fishy

I have just logged https://issues.apache.org/jira/browse/THRIFT-5900, will try to see if I can do something to get past it without trying to upgrade python. Don't want to now have to mix this PR with also upgrading to Python 3.14

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.

2 participants