dongjoon-hyun commented on code in PR #38987:
URL: https://github.com/apache/spark/pull/38987#discussion_r1043911454
##########
python/pyspark/shuffle.py:
##########
@@ -78,9 +78,12 @@ def _get_local_dirs(sub):
path = os.environ.get("SPARK_LOCAL_DIRS", "/tmp")
dirs = path.split(",")
if len(dirs) > 1:
- # different order in different processes and instances
- rnd = random.Random(os.getpid() + id(dirs))
- random.shuffle(dirs, rnd.random)
+ if sys.version_info < (3, 11):
+ # different order in different processes and instances
+ rnd = random.Random(os.getpid() + id(dirs))
+ random.shuffle(dirs, rnd.random)
Review Comment:
This is deprecated at 3.9 and removed at 3.11.
- https://bugs.python.org/issue40465
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]