Browse Source

dist: Disable _bootlocale injection for Python 3.10+

Python 3.10 removed the _bootlocale module (see bpo-42208)

[skip ci]
rdb 3 years ago
parent
commit
cafcdede5f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      direct/src/dist/commands.py

+ 1 - 1
direct/src/dist/commands.py

@@ -157,7 +157,7 @@ from _frozen_importlib import _imp, FrozenImporter
 
 sys.frozen = True
 
-if sys.platform == 'win32':
+if sys.platform == 'win32' and sys.version_info < (3, 10):
     # Make sure the preferred encoding is something we actually support.
     import _bootlocale
     enc = _bootlocale.getpreferredencoding().lower()