[prev in list] [next in list] [prev in thread] [next in thread]
List: opensuse-factory
Subject: Re: Syntax problems with Python 3.4
From: Matt Williams <matt () milliams ! com>
Date: 2023-12-14 9:27:14
Message-ID: CAF3HMhm-WF5YFUqg3UW7yGB+gw+CbW3-kO0wkP6v9G=YVLBD3g () mail ! gmail ! com
[Download RAW message or body]
Hi Adrian,
There are two problems here. One is that type hints (the `: Any` and `->
Callable[[Callable[P, T]], Callable[P, T]]` bits) were not added until
Python 3.5 (https://docs.python.org/3/whatsnew/3.5.html#pep-484-type-hints).
The second is that Python 3.4 has been out of support since March 2019 (
https://devguide.python.org/versions/#unsupported-versions), modulo any
extended SuSE support for SLE releases.
Cheers,
Matt
On Thu, 14 Dec 2023 at 09:18, John Paul Adrian Glaubitz via openSUSE
Factory <factory@lists.opensuse.org> wrote:
> Hi!
>
> I am working on providing updates for a few Azure-related Python packages
> and
> ran into a piece of Python code which is not compatible with Python 3.4
> [1]:
>
> @overload
> def distributed_trace( # pylint:disable=function-redefined
>
>
> **kwargs: Any, # pylint:disable=unused-argument
>
>
> ) -> Callable[[Callable[P, T]], Callable[P, T]]:
> pass
>
> Upon loading azure.mgmt.rdbms, I am getting the following error:
>
> Error loading command module 'rdbms': invalid syntax (decorator.py,
> line 47)
>
> Can someone with more Python experience tell me what the syntax problem is?
>
> Thanks,
> Adrian
>
> > [1]
> https://github.com/Azure/azure-sdk-for-python/blob/azure-core_1.23.1/sdk/core/azure-core/azure/core/tracing/decorator.py#L47
>
[Attachment #3 (text/html)]
<div dir="ltr"><div>Hi Adrian,</div><div><br></div><div>There are two problems here. \
One is that type hints (the `: Any` and `-> Callable[[Callable[P, T]], Callable[P, \
T]]` bits) were not added until Python 3.5 (<a \
href="https://docs.python.org/3/whatsnew/3.5.html#pep-484-type-hints">https://docs.python.org/3/whatsnew/3.5.html#pep-484-type-hints</a>). \
The second is that Python 3.4 has been out of support since March 2019 (<a \
href="https://devguide.python.org/versions/#unsupported-versions">https://devguide.python.org/versions/#unsupported-versions</a>), \
modulo any extended SuSE support for SLE \
releases.</div><div><br></div><div>Cheers,</div><div>Matt<br></div></div><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 14 Dec 2023 at 09:18, \
John Paul Adrian Glaubitz via openSUSE Factory <<a \
href="mailto:factory@lists.opensuse.org">factory@lists.opensuse.org</a>> \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi!<br> <br>
I am working on providing updates for a few Azure-related Python packages and<br>
ran into a piece of Python code which is not compatible with Python 3.4 [1]:<br>
<br>
@overload<br>
def distributed_trace( # pylint:disable=function-redefined \
<br>
**kwargs: Any, # pylint:disable=unused-argument \
<br> ) -> Callable[[Callable[P, T]], Callable[P, T]]:<br>
pass<br>
<br>
Upon loading azure.mgmt.rdbms, I am getting the following error:<br>
<br>
Error loading command module 'rdbms': invalid syntax (decorator.py, \
line 47)<br> <br>
Can someone with more Python experience tell me what the syntax problem is?<br>
<br>
Thanks,<br>
Adrian<br>
<br>
> [1] <a href="https://github.com/Azure/azure-sdk-for-python/blob/azure-core_1.23.1/sdk/core/azure-core/azure/core/tracing/decorator.py#L47" \
rel="noreferrer" target="_blank">https://github.com/Azure/azure-sdk-for-python/blob/azure-core_1.23.1/sdk/core/azure-core/azure/core/tracing/decorator.py#L47</a><br>
</blockquote></div>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic