libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From panlinux <...@git.apache.org>
Subject [GitHub] libcloud pull request #1235: Rename 'async' to 'async_'
Date Mon, 27 Aug 2018 14:03:23 GMT
GitHub user panlinux opened a pull request:

    https://github.com/apache/libcloud/pull/1235

    Rename 'async' to 'async_'

    ## Rename 'async', it's a reserved keyword with py3.7
    
    ### Description
    
    This is a simple change that just renames 'async' to 'async_'. Starting with python 3.7,
async became a reserved keyword and without this change we see errors like these:
    ```
      File "/usr/lib/python3/dist-packages/libcloud/compute/drivers/azure.py", line 1438
        def _perform_post(self, path, body, response_type=None, async=False):
                                                                    ^
                                                                    SyntaxError: invalid syntax
    ```
    In https://github.com/apache/libcloud/pull/1227#issuecomment-405817214, it was suggested
to remove this argument entirely, but I'm not familiar enough with the code to do that, and
this seems like a simpler fix to get things going.
    
    ### Status
    
    - done, ready for review
    
    ### Checklist (tick everything that applies)
    
    - [ ] [Code linting](http://libcloud.readthedocs.org/en/latest/development.html#code-style-guide)
(required, can be done after the PR checks)
    - [ ] Documentation
    - [x] [Tests](http://libcloud.readthedocs.org/en/latest/testing.html)
    - [ ] [ICLA](http://libcloud.readthedocs.org/en/latest/development.html#contributing-bigger-changes)
(required for bigger changes)


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/panlinux/libcloud rename-async-keyword-py37

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/libcloud/pull/1235.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1235
    
----
commit 5930e3e37f6791e0c0b8f5b1c41760093759ba7f
Author: Andreas Hasenack <andreas@...>
Date:   2018-08-27T13:42:34Z

    Rename 'async' to 'async_', as the former is a reserved keyword starting with
    python 3.7.

----


---

Mime
View raw message