vmware / vsphere-automation-sdk-python

Python samples, language bindings, and API reference documentation for vSphere, VMC, and NSX-T using the VMware REST API
MIT License
739 stars 308 forks source link

Possible problem with Python 3.12? #407

Closed mariolenz closed 2 weeks ago

mariolenz commented 6 months ago

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)
kunal-pmj commented 6 months ago

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

mariolenz commented 6 months ago

@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?

kunal-pmj commented 6 months ago

@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

mariolenz commented 4 months ago

@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?

shwetapurohit commented 4 months ago

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.

mariolenz commented 4 months ago

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.

kunalpmj commented 4 months ago

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

Thanks Kunal

kunalpmj commented 2 weeks ago

This issue has been fixed with 8.0U3

mariolenz commented 2 weeks ago

@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 commented 2 weeks ago

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!