vsphere-automation-sdk-python icon indicating copy to clipboard operation
vsphere-automation-sdk-python copied to clipboard

Possible problem with Python 3.12?

Open mariolenz opened this issue 1 year ago • 7 comments

Describe the bug

I've tried to run our CI for the ansible community collection community.vmware with Python 3.12: ansible-collections/community.vmware#1974

This might be a bug in our CI or in the collection, but I'm not sure at the moment. It would be great if you could have a look.

The question is: Did you test with Python 3.12 and it works? If so, I have to dig deeper into our CI, tests, the collection and whatever else.

Reproduction steps

  1. from com.vmware.vapi.std_client import DynamicID

Expected behavior

works

Additional context

2024-01-21 15:06:16.297415 | controller |   File "/home/zuul/venv/lib/python3.12/site-packages/com/vmware/vapi/std_client.py", line 22, in <module>
2024-01-21 15:06:16.297418 | controller |     from vmware.vapi.bindings import type
2024-01-21 15:06:16.297421 | controller |   File "/home/zuul/venv/lib/python3.12/site-packages/vmware/vapi/bindings/type.py", line 9, in <module>
2024-01-21 15:06:16.297424 | controller |     from vmware.vapi.data.definition import (
2024-01-21 15:06:16.297426 | controller |   File "/home/zuul/venv/lib/python3.12/site-packages/vmware/vapi/data/definition.py", line 10, in <module>
2024-01-21 15:06:16.297431 | controller |     from vmware.vapi.data.value import data_value_factory, StructValue
2024-01-21 15:06:16.297434 | controller |   File "/home/zuul/venv/lib/python3.12/site-packages/vmware/vapi/data/value.py", line 14, in <module>
2024-01-21 15:06:16.297437 | controller |     from vmware.vapi.l10n.runtime import message_factory
2024-01-21 15:06:16.297439 | controller |   File "/home/zuul/venv/lib/python3.12/site-packages/vmware/vapi/l10n/runtime.py", line 28, in <module>
2024-01-21 15:06:16.297442 | controller |     message_factory = get_runtime_message_factory()
2024-01-21 15:06:16.297445 | controller |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-01-21 15:06:16.297448 | controller |   File "/home/zuul/venv/lib/python3.12/site-packages/vmware/vapi/l10n/runtime.py", line 22, in get_runtime_message_factory
2024-01-21 15:06:16.297451 | controller |     msg_bundle = PropertiesResourceBundle(
2024-01-21 15:06:16.297454 | controller |                  ^^^^^^^^^^^^^^^^^^^^^^^^^
2024-01-21 15:06:16.297456 | controller |   File "/home/zuul/venv/lib/python3.12/site-packages/vmware/vapi/l10n/bundle.py", line 59, in __init__
2024-01-21 15:06:16.297459 | controller |     from pkg_resources import resource_string
2024-01-21 15:06:16.297462 | controller |   File "/home/zuul/venv/lib/python3.12/site-packages/pkg_resources/__init__.py", line 57, in <module>
2024-01-21 15:06:16.297465 | controller |     from pkg_resources.extern import six
2024-01-21 15:06:16.297468 | controller | ImportError: cannot import name 'six' from 'pkg_resources.extern' (/home/zuul/venv/lib/python3.12/site-packages/pkg_resources/extern/__init__.py)

mariolenz avatar Jan 21 '24 16:01 mariolenz

hi @mariolenz This issue is same #400

Python 3.12.0 (v3.12.0:0fb18b02c8, Oct 2 2023, 09:45:56) [Clang 13.0.0 (clang-1300.0.29.30)] on darwin Type "help", "copyright", "credits" or "license" for more information.

from com.vmware.vapi.std_client import DynamicID :1: SyntaxWarning: invalid escape sequence '[' :1: SyntaxWarning: invalid escape sequence '['

It will be addressed with next SDK release

kunal-pmj avatar Jan 23 '24 10:01 kunal-pmj

@kunal-pmj Are you sure? I don't see six mentioned in #400.

I suggest to keep this issue open for now. When you've released a new version where you've fixed #400 I'll test again. Then we'll see if this is really a duplicate. If the new release fixes my issue, I'll close it.

Would this be OK?

mariolenz avatar Jan 23 '24 17:01 mariolenz

@mariolenz The ticket will remain open till the SDK release. I can be closed after the issues reported here are verified by us with Python 3.12

kunal-pmj avatar Jan 29 '24 05:01 kunal-pmj

@kunal-pmj Any ETA for the next SDK release? Or will you wait until vSphere 8.0 U3 is released where AFAIK there's no official ETA?

mariolenz avatar Mar 15 '24 18:03 mariolenz

Hi @mariolenz The exact release dates are still tentative and could be between July and September. Please keep the ticket open; if the dates are confirmed, we will update the ticket.

shwetapurohit avatar Mar 19 '24 07:03 shwetapurohit

The exact release dates are still tentative and could be between July and September.

Thanks @shwetapurohit!

Please keep the ticket open; if the dates are confirmed, we will update the ticket.

Sure, it's not fixed yet. I won't close it, if nothing else as a reminder to myself to have another look at the issue ;-)

BTW if you think it's fixed in your master branch (even without it being released yet), feel free to ping me here and I'll try to find the time to test it.

mariolenz avatar Mar 19 '24 17:03 mariolenz

@mariolenz the master branch will be updated few days before the release.

Thanks Kunal

kunalpmj avatar Mar 20 '24 07:03 kunalpmj

This issue has been fixed with 8.0U3

kunalpmj avatar Jul 08 '24 12:07 kunalpmj

@kunalpmj Hey! I thought the deal was that I close this issue once I've verified that it's either fixed or that the problem really lies on our side! Why did you close it it? :angry:

mariolenz avatar Jul 08 '24 17:07 mariolenz

I'm still seeing errors in our CI pipeline, but I'm nearly sure that the problem is on our side. I'll try to find out what's going wrong there. In case it turns out that it still might be a problem on the VMware SDK side, I'll open a new issue.

Thanks all!

mariolenz avatar Jul 09 '24 14:07 mariolenz