<p>I am using a Kubernetes python client package for hitting Kubernetes APIs: <a href="https://github.com/kubernetes-client/python" rel="nofollow noreferrer">https://github.com/kubernetes-client/python</a></p>

<p>Till now i was using Python 3.6 and this package was working. Now our environment is changed from Python 3.6 to Python 3.7 and while using the same package, i am getting below error while importing this client:</p>

<pre><code>    from kubernetes import client
  File "/usr/local/lib/python3.7/site-packages/kubernetes/__init__.py", line 19, in &lt;module&gt;
    import kubernetes.client
  File "/usr/local/lib/python3.7/site-packages/kubernetes/client/__init__.py", line 540, in &lt;module&gt;
    from .apis.admissionregistration_api import AdmissionregistrationApi
  File "/usr/local/lib/python3.7/site-packages/kubernetes/client/apis/__init__.py", line 4, in &lt;module&gt;
    from .admissionregistration_api import AdmissionregistrationApi
  File "/usr/local/lib/python3.7/site-packages/kubernetes/client/apis/admissionregistration_api.py", line 120
    async=params.get('async'),
        ^
SyntaxError: invalid syntax
</code></pre>

<p>Is it possible to resolve this with any workaround?</p>

Varun Chadha
<p><code>async</code> has become a keyword in Python 3.7, and it's not possible to assign to keywords and use them as variable names in general.</p>
<p>Quote from <a href="https://docs.python.org/3/whatsnew/3.7.html" rel="nofollow noreferrer">the docs</a>:</p>
<blockquote>
<p>Backwards incompatible syntax changes:</p>
<ul>
<li><code>async</code> and <code>await</code> are now reserved keywords.</li>
</ul>
</blockquote>
<p>You'll have to use a lower version of Python where it's not a keyword yet. You can also file a bug report to the devs of the library.</p>
