Skip to content
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
Closed

Tests not compatible with python3 #3289

infinnovation-dev opened this issue Nov 18, 2018 · 3 comments
Labels

Comments

@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
Copy link
Author

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
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
Copy link
Author

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.

@bagder bagder closed this as completed in 458e898 Jan 21, 2019
bagder pushed a commit that referenced this issue Apr 6, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jul 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

2 participants