[
https://issues.apache.org/jira/browse/BEAM-7372?focusedWorklogId=551652&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-551652
]
ASF GitHub Bot logged work on BEAM-7372:
----------------------------------------
Author: ASF GitHub Bot
Created on: 12/Feb/21 02:43
Start Date: 12/Feb/21 02:43
Worklog Time Spent: 10m
Work Description: tvalentyn commented on a change in pull request #13913:
URL: https://github.com/apache/beam/pull/13913#discussion_r574959908
##########
File path: sdks/python/apache_beam/internal/pickler.py
##########
@@ -55,13 +55,9 @@ def __exit__(self, *unused_exc_info):
pass
-if sys.version_info[0] > 2:
- # Pickling, especially unpickling, causes broken module imports on Python 3
- # if executed concurrently, see: BEAM-8651,
http://bugs.python.org/issue38884.
- _pickle_lock_unless_py2 = threading.RLock()
-else:
- # Avoid slow reentrant locks on Py2. See: https://bugs.python.org/issue3001.
- _pickle_lock_unless_py2 = _NoOpContextManager()
+# Pickling, especially unpickling, causes broken module imports on Python 3
+# if executed concurrently, see: BEAM-8651, http://bugs.python.org/issue38884.
+_pickle_lock_unless_py2 = threading.RLock()
Review comment:
we could call it _pickle_lock now
----------------------------------------------------------------
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:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 551652)
Time Spent: 21.5h (was: 21h 20m)
> Clean up Python 2 codepaths once Beam no longer supports Python 2.
> ------------------------------------------------------------------
>
> Key: BEAM-7372
> URL: https://issues.apache.org/jira/browse/BEAM-7372
> Project: Beam
> Issue Type: Sub-task
> Components: sdk-py-core
> Reporter: Valentyn Tymofieiev
> Priority: P3
> Labels: P3
> Time Spent: 21.5h
> Remaining Estimate: 0h
>
> There are several places in Beam where we branch based on Python version.
> Once Python 2 is no longer supported, we can remove Py2 parts of the branch.
> To find places to clean up, we can search for "Python 2", "Python 3", "Py2",
> "sys.version_info", BEAM-8371, etc.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)