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

Tests not compatible with python3 #3289

Closed
infinnovation-dev opened this Issue Nov 18, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@infinnovation-dev
Copy link

infinnovation-dev commented Nov 18, 2018

This does not affect end-users of curl/libcurl. It is relevant only to people who build from source and run the regression tests.

Python2 is slated for end-of-life in January 2020 - see PEP 373. Python is used by the test suite to provide a few servers against which curl is tested. Of these, dictserver.py and negtelnetserver.py are already compatible with python2 and python3. However, smbserver is still python2 only, due to its dependency on (a locally latched subset of) the impacket package for which there is not yet a python3-compatible version released.

@infinnovation-dev

This comment has been minimized.

Copy link
Author

infinnovation-dev commented Nov 18, 2018

There is a python36 branch of impacket but it is not clear how mature / well-tested it is. I will investigate if we can use that.

@bagder

This comment has been minimized.

Copy link
Member

bagder commented Nov 25, 2018

I think we all acknowledge that this is so, but since we use a third-party library for this I think we just wait until they have it fixed and then import that. Until then I think developers can still use python2.7 if they want to run the full test suite.

@infinnovation-dev

This comment has been minimized.

Copy link
Author

infinnovation-dev commented Nov 27, 2018

Porting of impacket to python3 is being actively being worked on, but it looks like there is a way to go yet. So yes, let's leave things as they are in curl for the time being.

To aid a future update, I'll note here that when pulling in the impacket modules, the following modifications were/should be made:

  • in smb.py, replace importation of KRB5_AP_REQ with an inline definition (to avoid requiring the Cryptodome dependency)
  • in smbserver.py, delete SimpleSMBServer and its preceding helper classes (again, to avoid pulling in uncessary code and dependencies)

Note also that smb3.py is not currently used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment