You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/05/04 21:52:43 UTC

[GitHub] [airflow] jhtimmins opened a new pull request #8711: Fix multiprocessing Connection import error on OSX

jhtimmins opened a new pull request #8711:
URL: https://github.com/apache/airflow/pull/8711


   Currently, dag_processing.py imports the `multiprocessing` library, and uses `multiprocessing.connection.Connection` to declare a `Connection` type for the `DagFileProcessorManager` class. This causes an import error on OS X. 
   
   This happens because the `multiprocessing` package does not expose the `.connection`module by default. To access this behavior, you need to call [`multiprocessing.allow_connection_pickling()`](https://github.com/python/cpython/blob/17a5588740b3d126d546ad1a13bdac4e028e6d50/Lib/multiprocessing/context.py#L164)  first. 
   
   Alternatively, instead of importing `multiprocessing` calling `multiprocessing.connection.Connection` in your code, you can import the Connection class directly:
   ```
   from multiprocessing.connection import Connection
   ```
   
   This PR makes that update.Presumably, this distinction matters bc of weird rules in Python's import code.
   
   
   ---
   Make sure to mark the boxes below before creating PR: [x]
   
   - [x] Description above provides context of the change
   - [x] Unit tests coverage for changes (not needed for documentation changes)
   - [x] Target Github ISSUE in description if exists
   - [x] Commits follow "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)"
   - [x] Relevant documentation is updated including usage instructions.
   - [x] I will engage committers as explained in [Contribution Workflow Example](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#contribution-workflow-example).
   
   ---
   In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.md).
   Read the [Pull Request Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines) for more information.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] kaxil edited a comment on pull request #8711: Fix multiprocessing Connection import error on OSX

Posted by GitBox <gi...@apache.org>.
kaxil edited a comment on pull request #8711:
URL: https://github.com/apache/airflow/pull/8711#issuecomment-623737050


   Most likely was introduced in **Python 3.7.7**


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] kaxil commented on pull request #8711: Fix multiprocessing Connection import error on OSX

Posted by GitBox <gi...@apache.org>.
kaxil commented on pull request #8711:
URL: https://github.com/apache/airflow/pull/8711#issuecomment-623736554


   Makes me wonder, what changed !!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] kaxil commented on pull request #8711: Fix multiprocessing Connection import error on OSX

Posted by GitBox <gi...@apache.org>.
kaxil commented on pull request #8711:
URL: https://github.com/apache/airflow/pull/8711#issuecomment-623737050


   Most likely was introduced in Python 3.7


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] kaxil commented on pull request #8711: Fix multiprocessing Connection import error on OSX

Posted by GitBox <gi...@apache.org>.
kaxil commented on pull request #8711:
URL: https://github.com/apache/airflow/pull/8711#issuecomment-623738082


   Similar issues: 
   
   - https://github.com/docker-library/python/issues/461
   - https://github.com/awslabs/aws-data-wrangler/issues/151
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ashb commented on pull request #8711: Fix multiprocessing Connection import error on OSX

Posted by GitBox <gi...@apache.org>.
ashb commented on pull request #8711:
URL: https://github.com/apache/airflow/pull/8711#issuecomment-623729015


   This only affects Py3.8+ right?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] jhtimmins commented on pull request #8711: Fix multiprocessing Connection import error on OSX

Posted by GitBox <gi...@apache.org>.
jhtimmins commented on pull request #8711:
URL: https://github.com/apache/airflow/pull/8711#issuecomment-623732850


   @ashb No, it comes up in (at least) 3.7.7 as well. 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org