mirror of
https://github.com/rdkit/rdkit.git
synced 2026-06-03 21:44:30 +08:00
Remove a bunch of Python2-related warts (#2315)
* remove all of the "from __future__" imports * remove the first batch of rdkit.six imports/uses * next step of rdkit.six removal * removing xrange, range, and some maps * next round of removals * next round of cleanups * fix inchi test * last bits of "from rdkit.six" are gone * and the last of the six stuff is gone * strange importlib problem
This commit is contained in:
committed by
Brian Kelley
parent
84c1ea5e7a
commit
24f1737839
@@ -1,4 +1,4 @@
|
||||
from __future__ import print_function
|
||||
|
||||
import pyRXP
|
||||
import sys
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
# which is included in the file license.txt, found at the root
|
||||
# of the RDKit source tree.
|
||||
#
|
||||
from __future__ import print_function
|
||||
|
||||
|
||||
import unittest, os, csv
|
||||
from rdkit import Chem, RDConfig
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
from __future__ import print_function
|
||||
|
||||
from rdkit import Chem
|
||||
from rdkit import RDConfig
|
||||
import time, sys, gzip
|
||||
from rdkit.six.moves import cPickle
|
||||
import pickle
|
||||
from rdkit.RDLogger import logger
|
||||
logger = logger()
|
||||
|
||||
@@ -21,11 +21,11 @@ for line in file(RDConfig.RDDataDir + '/SmartsLib/RLewis_smarts.txt', 'r').readl
|
||||
qs.append(p)
|
||||
|
||||
logger.info('reading target counts')
|
||||
refFps = cPickle.loads(gzip.open('fps.1000.counts.pkl.gz', 'rb').read())
|
||||
refFps = pickle.loads(gzip.open('fps.1000.counts.pkl.gz', 'rb').read())
|
||||
|
||||
fps = []
|
||||
logger.info('reading mols:')
|
||||
ms = cPickle.loads(gzip.open('mols.1000.pkl.gz', 'rb').read())
|
||||
ms = pickle.loads(gzip.open('mols.1000.pkl.gz', 'rb').read())
|
||||
t1 = time.time()
|
||||
nFail = 0
|
||||
for i, m in enumerate(ms):
|
||||
@@ -44,7 +44,7 @@ for i, m in enumerate(ms):
|
||||
t2 = time.time()
|
||||
print('%.2f' % (t2 - t1))
|
||||
|
||||
#cPickle.dump(fps,file('fps.1000.counts.pkl','wb+'))
|
||||
#pickle.dump(fps,file('fps.1000.counts.pkl','wb+'))
|
||||
nFail = 0
|
||||
for i, fp in enumerate(fps):
|
||||
if fp != refFps[i]:
|
||||
|
||||
Reference in New Issue
Block a user