Opened 18 years ago
Closed 18 years ago
#3007 closed defect (fixed)
[patch] random.getrandbits only available in python 2.4
Reported by: | raman | Owned by: | Adrian Holovaty |
---|---|---|---|
Component: | Core (Other) | Version: | dev |
Severity: | major | Keywords: | random mail |
Cc: | gary.wilson@… | Triage Stage: | Unreviewed |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Changeset 4051* introduced "getrandbits"* from the "random" module.
This method is only available in python 2.4.
Django installation docs say django runs on python 2.3+. (Noticed this when a page crashed on a python 2.3 django site I was working on ...)
thanks,
raman
Attachments (1)
Change History (4)
by , 18 years ago
Attachment: | messageid.patch added |
---|
comment:1 by , 18 years ago
Summary: | random.getrandbits only available in python 2.4 → [patch] random.getrandbits only available in python 2.4 |
---|
socket.getfqdn()
can be mightily slow in some cases so I've changed the code so it caches the hostname. If you didn't want to slow startup down any more, it could alternatively be lazily loaded.
comment:2 by , 18 years ago
Cc: | added |
---|
comment:3 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Fallback for Python 2.3 (and caching of server name)