File: 0027-cctbx-add-__getstate_manages_dict__-for-Python-3.11.patch

package info (click to toggle)
cctbx 2022.9%2Bds2%2B~3.11.2%2Bds1-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 130,052 kB
  • sloc: python: 815,067; cpp: 289,996; ansic: 22,472; fortran: 18,268; javascript: 1,852; sh: 1,145; sql: 632; csh: 519; java: 368; makefile: 316; xml: 25
file content (23 lines) | stat: -rw-r--r-- 886 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
From: "Billy K. Poon" <bkpoon@lbl.gov>
Date: Thu, 10 Nov 2022 14:07:13 -0800
Subject: cctbx: add __getstate_manages_dict__ for Python 3.11

- binner class defines __getstate__ and a non-empty __dict__

Origin: upstream, https://github.com/cctbx/cctbx_project/commit/4ccdb45f1e0797e764c010261d39506c70a68568
---
 cctbx/miller/__init__.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/cctbx/miller/__init__.py b/cctbx/miller/__init__.py
index 0240408..394f0c8 100644
--- a/cctbx/miller/__init__.py
+++ b/cctbx/miller/__init__.py
@@ -49,6 +49,7 @@ class binner(ext.binner):
 
   def __init__(self, binning, miller_set):
     ext.binner.__init__(self, binning, miller_set.indices())
+    self.__getstate_manages_dict__ = True
     self.space_group_info = miller_set.space_group_info()
     self.anomalous_flag = miller_set.anomalous_flag()
     if (miller_set.indices().size() == 0):