about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMartin Weinelt <mweinelt@users.noreply.github.com>2024-03-22 03:40:42 +0100
committerGitHub <noreply@github.com>2024-03-22 03:40:42 +0100
commitebde006977bd37c6efd931b8a55510b5086028c7 (patch)
treefbe111953ad2754dc64d0dcdd3ca14cba221cc39
parent6e147dce88054c47dd90c0be8c33500e023f8261 (diff)
parent8837f2fef288bf04e54f1d6fd6a777e6cae8c00b (diff)
Merge pull request #289190 from mweinelt/python-3.13.0a4
python313: 3.13.0a3 -> 3.13.0a5
-rw-r--r--pkgs/development/interpreters/python/cpython/3.13/virtualenv-permissions.patch12
-rw-r--r--pkgs/development/interpreters/python/cpython/default.nix7
-rw-r--r--pkgs/development/interpreters/python/default.nix4
3 files changed, 21 insertions, 2 deletions
diff --git a/pkgs/development/interpreters/python/cpython/3.13/virtualenv-permissions.patch b/pkgs/development/interpreters/python/cpython/3.13/virtualenv-permissions.patch
new file mode 100644
index 0000000000000..8099eefc88d0b
--- /dev/null
+++ b/pkgs/development/interpreters/python/cpython/3.13/virtualenv-permissions.patch
@@ -0,0 +1,12 @@
+diff --git a/Lib/venv/__init__.py b/Lib/venv/__init__.py
+index 4856594755..6769ab8026 100644
+--- a/Lib/venv/__init__.py
++++ b/Lib/venv/__init__.py
+@@ -522,6 +522,7 @@ def skip_file(f):
+                     with open(dstfile, 'wb') as f:
+                         f.write(new_data)
+                     shutil.copymode(srcfile, dstfile)
++                os.chmod(dstfile, 0o644)
+ 
+     def upgrade_dependencies(self, context):
+         logger.debug(
diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix
index 0191517aa9ef7..4a0533536c84a 100644
--- a/pkgs/development/interpreters/python/cpython/default.nix
+++ b/pkgs/development/interpreters/python/cpython/default.nix
@@ -60,6 +60,7 @@
 , static ? stdenv.hostPlatform.isStatic
 , enableFramework ? false
 , noldconfigPatch ? ./. + "/${sourceVersion.major}.${sourceVersion.minor}/no-ldconfig.patch"
+, enableGIL ? true
 
 # pgo (not reproducible) + -fno-semantic-interposition
 # https://docs.python.org/3/using/configure.html#cmdoption-enable-optimizations
@@ -111,6 +112,7 @@ let
   inherit (lib)
     concatMapStringsSep
     concatStringsSep
+    enableFeature
     getDev
     getLib
     optionals
@@ -304,7 +306,10 @@ in with passthru; stdenv.mkDerivation (finalAttrs: {
     # Make sure that the virtualenv activation scripts are
     # owner-writable, so venvs can be recreated without permission
     # errors.
+  ] ++ optionals (pythonOlder "3.13") [
     ./virtualenv-permissions.patch
+  ] ++ optionals (pythonAtLeast "3.13") [
+    ./3.13/virtualenv-permissions.patch
   ] ++ optionals mimetypesSupport [
     # Make the mimetypes module refer to the right file
     ./mimetypes.patch
@@ -399,6 +404,8 @@ in with passthru; stdenv.mkDerivation (finalAttrs: {
     "--enable-shared"
   ] ++ optionals enableFramework [
     "--enable-framework=${placeholder "out"}/Library/Frameworks"
+  ] ++ optionals (pythonAtLeast "3.13") [
+    (enableFeature enableGIL "gil")
   ] ++ optionals enableOptimizations [
     "--enable-optimizations"
   ] ++ optionals (sqlite != null) [
diff --git a/pkgs/development/interpreters/python/default.nix b/pkgs/development/interpreters/python/default.nix
index 12050f319fc0b..5d4ae21171469 100644
--- a/pkgs/development/interpreters/python/default.nix
+++ b/pkgs/development/interpreters/python/default.nix
@@ -93,9 +93,9 @@ in {
       major = "3";
       minor = "13";
       patch = "0";
-      suffix = "a3";
+      suffix = "a5";
     };
-    hash = "sha256-IHhMgwTrHGnID5ZuvfB3W+LjfiPfO2JGHuwSqF3Pfq0=";
+    hash = "sha256-Hom1NVGD58iYpaAbL2AXKP5J/bidnJeB8TNghHqu+mI=";
     inherit (darwin) configd;
     inherit passthruFun;
   };