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

Python3.9 Support #174

Merged
merged 15 commits into from
Oct 8, 2020
Merged

Python3.9 Support #174

merged 15 commits into from
Oct 8, 2020

Conversation

yunhaoling
Copy link
Contributor

No description provided.

@yunhaoling
Copy link
Contributor Author

yunhaoling commented Sep 25, 2020

The following issue is with cython==0.28.5:
3.9 MacOS is reporting: /cython/Cython/Plex/Scanners.c:8518:46: error: no member named 'tp_print' in 'struct _typeobject'

python 3.9 has removed tp_print: https://bugzilla.redhat.com/show_bug.cgi?id=1791745
this could be a cython issue, need more investigation.

note
after updating cython==0.29.21, macos can build the wheel (cython made a fix for python3.9 compatibility)

@scbedd
Copy link
Member

scbedd commented Sep 29, 2020

@yunhaoling this is absolutely the same issue I saw with my pr.

Overall, this is a really nice addition, the support just isn't there.

@yunhaoling
Copy link
Contributor Author

yunhaoling commented Oct 1, 2020

windows building fails with latest cython 0.29.21 (and 3.0a6)
Python 3.9.0rc2 and installed packages are:

astroid==2.4.2
atomicwrites==1.4.0
attrs==20.2.0
colorama==0.4.3
Cython==0.29.21
docutils==0.16
isort==4.3.21
lazy-object-proxy==1.4.3
mccabe==0.6.1
more-itertools==8.5.0
packaging==20.4
pluggy==0.13.1
py==1.9.0
Pygments==2.7.1
pylint==2.3.1
pyparsing==2.4.7
pytest==5.4.1
pytest-asyncio==0.10.0
six==1.15.0
wcwidth==0.2.5
wrapt==1.12.1
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I.\src\vendor\inc -I./src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/pal/inc -I./src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc -I./src/vendor/azure-uamqp-c/inc -I./src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/pal/windows -ID:\Develop\Python\uamqpenv39\include -ID:\Develop\Python\Python39-64\include -ID:\Develop\Python\Python39-64\include -IC:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt /Tcuamqp/c_uamqp.c /Fobuild\temp.win-amd64-3.9\Release\uamqp/c_uamqp.obj
c_uamqp.c
uamqp/c_uamqp.c(5842): warning C4244: '=': conversion from 'Py_ssize_t' to 'uint32_t', possible loss of data
uamqp/c_uamqp.c(10583): warning C4133: 'function': incompatible types - from 'PyObject *' to 'STRING_HANDLE'
uamqp/c_uamqp.c(18866): warning C4133: 'function': incompatible types - from 'int *' to 'bool *'
uamqp/c_uamqp.c(23640): warning C4244: '=': conversion from 'Py_ssize_t' to 'uint32_t', possible loss of data
uamqp/c_uamqp.c(41683): warning C4312: 'type cast': conversion from 'unsigned int' to 'void *' of greater size
uamqp/c_uamqp.c(43878): warning C4312: 'type cast': conversion from 'uint32_t' to 'void *' of greater size
uamqp/c_uamqp.c(44394): warning C4312: 'type cast': conversion from 'milliseconds' to 'void *' of greater size
uamqp/c_uamqp.c(44905): warning C4312: 'type cast': conversion from 'uint32_t' to 'void *' of greater size
uamqp/c_uamqp.c(48252): warning C4312: 'type cast': conversion from 'uint32_t' to 'void *' of greater size
uamqp/c_uamqp.c(48477): warning C4312: 'type cast': conversion from 'milliseconds' to 'void *' of greater size
uamqp/c_uamqp.c(48692): warning C4133: 'function': incompatible types - from 'int *' to 'bool *'
uamqp/c_uamqp.c(48702): warning C4312: 'type cast': conversion from 'int' to 'void *' of greater size
uamqp/c_uamqp.c(48917): warning C4133: 'function': incompatible types - from 'int *' to 'bool *'
uamqp/c_uamqp.c(48927): warning C4312: 'type cast': conversion from 'int' to 'void *' of greater size
uamqp/c_uamqp.c(64178): warning C4090: 'function': different 'const' qualifiers
uamqp/c_uamqp.c(64178): warning C4028: formal parameter 1 different from declaration
uamqp/c_uamqp.c(68798): warning C4244: 'function': conversion from 'tickcounter_ms_t' to 'uint_fast32_t', possible loss of data
uamqp/c_uamqp.c(70359): warning C4090: 'function': different 'const' qualifiers
uamqp/c_uamqp.c(72057): warning C4267: '=': conversion from 'size_t' to 'uint32_t', possible loss of data
uamqp/c_uamqp.c(74364): warning C4312: 'type cast': conversion from 'sequence_no' to 'void *' of greater size
uamqp/c_uamqp.c(74950): warning C4090: 'function': different 'const' qualifiers
uamqp/c_uamqp.c(75047): warning C4090: '=': different 'const' qualifiers
uamqp/c_uamqp.c(75197): warning C4090: '=': different 'const' qualifiers
uamqp/c_uamqp.c(81094): warning C4312: 'type cast': conversion from 'terminus_durability' to 'void *' of greater size
uamqp/c_uamqp.c(81534): warning C4312: 'type cast': conversion from 'seconds' to 'void *' of greater size
uamqp/c_uamqp.c(81721): warning C4133: 'function': incompatible types - from 'int *' to 'bool *'
uamqp/c_uamqp.c(81754): warning C4312: 'type cast': conversion from 'int' to 'void *' of greater size
uamqp/c_uamqp.c(83679): warning C4312: 'type cast': conversion from 'terminus_durability' to 'void *' of greater size
uamqp/c_uamqp.c(84119): warning C4312: 'type cast': conversion from 'seconds' to 'void *' of greater size
uamqp/c_uamqp.c(84306): warning C4133: 'function': incompatible types - from 'int *' to 'bool *'
uamqp/c_uamqp.c(84339): warning C4312: 'type cast': conversion from 'int' to 'void *' of greater size
uamqp/c_uamqp.c(87181): warning C4090: 'function': different 'const' qualifiers
uamqp/c_uamqp.c(87497): warning C4090: 'function': different 'const' qualifiers
uamqp/c_uamqp.c(101780): error C2039: 'tp_print': is not a member of '_typeobject'
d:\develop\python\python39-64\include\cpython/object.h(193): note: see declaration of '_typeobject'
uamqp/c_uamqp.c(101799): error C2039: 'tp_print': is not a member of '_typeobject'
d:\develop\python\python39-64\include\cpython/object.h(193): note: see declaration of '_typeobject'
uamqp/c_uamqp.c(101816): error C2039: 'tp_print': is not a member of '_typeobject'
d:\develop\python\python39-64\include\cpython/object.h(193): note: see declaration of '_typeobject'
....
d:\develop\python\python39-64\include\cpython/object.h(193): note: see declaration of '_typeobject'
uamqp/c_uamqp.c(102552): error C2039: 'tp_print': is not a member of '_typeobject'
d:\develop\python\python39-64\include\cpython/object.h(193): note: see declaration of '_typeobject'
uamqp/c_uamqp.c(106616): warning C4996: '_PyUnicode_get_wstr_length': deprecated in 3.3
d:\develop\python\python39-64\include\cpython/unicodeobject.h(446): note: see declaration of '_PyUnicode_get_wstr_length'
uamqp/c_uamqp.c(106632): warning C4996: '_PyUnicode_get_wstr_length': deprecated in 3.3
d:\develop\python\python39-64\include\cpython/unicodeobject.h(446): note: see declaration of '_PyUnicode_get_wstr_length'
uamqp/c_uamqp.c(106865): warning C4996: 'PyUnicode_FromUnicode': deprecated in 3.3
d:\develop\python\python39-64\include\cpython/unicodeobject.h(551): note: see declaration of 'PyUnicode_FromUnicode'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2

@zooba
Copy link
Member

zooba commented Oct 1, 2020

uamqp/c_uamqp.c(101780): error C2039: 'tp_print': is not a member of '_typeobject'

This has definitely been fixed in Cython - I suspect your build script is not regenerating the file correctly.

@yunhaoling
Copy link
Contributor Author

thanks Steve @zooba , it's indeed my fault that I didn't clean up previously-built files leading to the compile failure.
Things are good on windows.

@yunhaoling yunhaoling marked this pull request as ready for review October 7, 2020 20:39
@yunhaoling
Copy link
Contributor Author

post-release issue: #178

  • update travis.yml to use python 3.9 instead python 3.9-dev when it's available on travis
  • update test/client.yml file use to python 3.9 instead of python 3.9.0 after python 3.9 is available on host agents

Copy link
Member

@annatisch annatisch left a comment

Choose a reason for hiding this comment

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

LGTM - thanks! :)


installer_folder = os.path.normpath(os.path.abspath(installer_folder))
if not os.path.exists(installer_folder):
os.mkdir(installer_folder)
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 want to handle any permissions issues on the installation directory? Or just let them raise?

Copy link
Contributor Author

@yunhaoling yunhaoling Oct 7, 2020

Choose a reason for hiding this comment

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

I don't know the answer, the scripts are provided by Scott. (to be more precise, scripts are here in our mono repo: Azure/azure-sdk-for-python#14160)
but I think he should have already taken it into account :P cc @scbedd

@yunhaoling yunhaoling merged commit 6b42bfa into Azure:master Oct 8, 2020
@yunhaoling yunhaoling deleted the python39support branch September 28, 2021 23:55
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.

4 participants