You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "exceptionfactory (via GitHub)" <gi...@apache.org> on 2024/04/12 23:00:01 UTC

[PR] NIFI-13042 Support Python 3.12 for Python Processors [nifi]

exceptionfactory opened a new pull request, #8644:
URL: https://github.com/apache/nifi/pull/8644

   # Summary
   
   [NIFI-13042](https://issues.apache.org/jira/browse/NIFI-13042) Updates `Controller.py` and `ExtensionManager.py` to provide framework compatibility with Python 3.12.
   
   Updates to `Controller.py` include joining to non-daemon threads at the conclusion of the `main` function, avoiding a `RuntimeError` thrown in Python 3.12 as a result of increased protections against spawning new child threads after finalization of the main process. This approach follows the recommendation from [CPython Issue 115533](https://github.com/python/cpython/issues/115533#issuecomment-1959143451). This is necessary for the NiFi `Controller.py` because the `main` function otherwise completes, but Py4J socket threads must continue running.
   
   Updates to `ExtensionManager.py` include replacing the deprecated [find_module](https://docs.python.org/3.10/library/importlib.html#importlib.machinery.PathFinder.find_module) method with the recommend [find_spec](https://docs.python.org/3.10/library/importlib.html#importlib.machinery.PathFinder.find_spec) method. The `find_spec` method was added in Python 3.4 and `find_module` was removed in Python 3.12.
   
   # Tracking
   
   Please complete the following tracking steps prior to pull request creation.
   
   ### Issue Tracking
   
   - [X] [Apache NiFi Jira](https://issues.apache.org/jira/browse/NIFI) issue created
   
   ### Pull Request Tracking
   
   - [X] Pull Request title starts with Apache NiFi Jira issue number, such as `NIFI-00000`
   - [X] Pull Request commit message starts with Apache NiFi Jira issue number, as such `NIFI-00000`
   
   ### Pull Request Formatting
   
   - [X] Pull Request based on current revision of the `main` branch
   - [X] Pull Request refers to a feature branch with one commit containing changes
   
   # Verification
   
   Please indicate the verification steps performed prior to pull request creation.
   
   ### Build
   
   - [X] Build completed using `mvn clean install -P contrib-check`
     - [X] JDK 21
   
   ### Licensing
   
   - [ ] New dependencies are compatible with the [Apache License 2.0](https://apache.org/licenses/LICENSE-2.0) according to the [License Policy](https://www.apache.org/legal/resolved.html)
   - [ ] New dependencies are documented in applicable `LICENSE` and `NOTICE` files
   
   ### Documentation
   
   - [ ] Documentation formatting appears as expected in rendered files
   


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

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


Re: [PR] NIFI-13042 Support Python 3.12 for Python Processors [nifi]

Posted by "joewitt (via GitHub)" <gi...@apache.org>.
joewitt commented on PR #8644:
URL: https://github.com/apache/nifi/pull/8644#issuecomment-2054807843

   +1.   Great find/fix @exceptionfactory !  Thanks


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

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


Re: [PR] NIFI-13042 Support Python 3.12 for Python Processors [nifi]

Posted by "asfgit (via GitHub)" <gi...@apache.org>.
asfgit closed pull request #8644: NIFI-13042 Support Python 3.12 for Python Processors
URL: https://github.com/apache/nifi/pull/8644


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

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