mirror of
https://github.com/python/cpython
synced 2024-07-21 02:05:18 +00:00
Purged Berkeley code of references to the long-obsolete whrandom.
This commit is contained in:
parent
60395120f4
commit
95334a5d1e
|
@ -21,7 +21,7 @@
|
|||
import sys
|
||||
import copy
|
||||
import xdrlib
|
||||
import whrandom
|
||||
import random
|
||||
from types import ListType, StringType
|
||||
import cPickle as pickle
|
||||
|
||||
|
@ -354,8 +354,8 @@ def __new_rowid(self, table, txn) :
|
|||
# (note: this code has <64 bits of randomness
|
||||
# but it's plenty for our database id needs!)
|
||||
p = xdrlib.Packer()
|
||||
p.pack_int(int(whrandom.random()*2147483647))
|
||||
p.pack_int(int(whrandom.random()*2147483647))
|
||||
p.pack_int(int(random.random()*2147483647))
|
||||
p.pack_int(int(random.random()*2147483647))
|
||||
newid = p.get_buffer()
|
||||
|
||||
# Guarantee uniqueness by adding this key to the database
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
import tempfile
|
||||
import time
|
||||
from pprint import pprint
|
||||
from whrandom import random
|
||||
|
||||
try:
|
||||
from threading import Thread, currentThread
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
import shutil
|
||||
import tempfile
|
||||
from pprint import pprint
|
||||
from whrandom import random
|
||||
from random import random
|
||||
|
||||
try:
|
||||
True, False
|
||||
|
|
Loading…
Reference in a new issue