mirror of
https://github.com/rdkit/rdkit.git
synced 2026-06-03 21:44:30 +08:00
Support Python 3.11 (#5994)
* remove some more deprecated numpy stuff * workaround for changes to random.shuffle in python 3.11 * fix pickling of rdkit mols in python 3.11 * add py311 build to CI * update py311 CI * remove qt for py311 for the moment * only use the new code with pyversion >=3.11 * use the new logic for all pickle_suites * need to work with older py too
This commit is contained in:
@@ -48,7 +48,7 @@ ScaffoldNetwork::ScaffoldNetworkParams *getBRICSParams() {
|
||||
} // namespace
|
||||
|
||||
#ifdef RDK_USE_BOOST_SERIALIZATION
|
||||
struct scaffoldnetwork_pickle_suite : python::pickle_suite {
|
||||
struct scaffoldnetwork_pickle_suite : rdkit_pickle_suite {
|
||||
static python::tuple getinitargs(
|
||||
const RDKit::ScaffoldNetwork::ScaffoldNetwork &self) {
|
||||
std::stringstream oss;
|
||||
@@ -60,7 +60,7 @@ struct scaffoldnetwork_pickle_suite : python::pickle_suite {
|
||||
};
|
||||
};
|
||||
#else
|
||||
struct scaffoldnetwork_pickle_suite : python::pickle_suite {
|
||||
struct scaffoldnetwork_pickle_suite : rdkit_pickle_suite {
|
||||
static python::tuple getinitargs(
|
||||
const RDKit::ScaffoldNetwork::ScaffoldNetwork &self) {
|
||||
throw_runtime_error("Pickling of ScaffoldNetwork instances is not enabled");
|
||||
|
||||
Reference in New Issue
Block a user