Ticket #6061 enhancement closed fixed

Opened 8 months ago

Last modified 8 months ago

Port twisted.python.randbytes to Python 3

Reported by: exarkun Owned by: exarkun
Priority: normal Milestone: Python 3.3 Minimal
Component: core Keywords:
Cc: Branch: branches/randbytes-py3-6061
Author: exarkun Launchpad Bug:

Description

This is needed by twisted.names.dns.

Change History

1

Changed 8 months ago by exarkun

  • branch set to branches/randbytes-py3-6061
  • branch_author set to exarkun

(In [35956]) Branching to 'randbytes-py3-6061'

2

Changed 8 months ago by exarkun

  • owner changed from exarkun to itamar
  • keywords review added

Okay, worse than I thought, and the module is somewhat useless now that its alternative-selection features have been deleted. Oh well, I did it anyway, and I wish it had been easier and more useful. Build started:  http://buildbot.twistedmatrix.com/boxes-supported?branch=/branches/randbytes-py3-6061

3

Changed 8 months ago by itamar

I was actually going to suggest (in a new ticket) the use of randrange elsewhere in twisted.names.dns be switched to something secure based on inputs from os.urandom. Probably randbytes would be a reasonable place to add that sort of thing, so might be worth keeping around.

4

Changed 8 months ago by exarkun

What do you mean "switched to something secure"? That's the point of twisted.python.randbytes.secureRandom, which is what twisted.names.dns currently uses.

5

Changed 8 months ago by itamar

DNSMixin.__init__ uses randrange; not sure if that id has any meaning or use though.

6

Changed 8 months ago by exarkun

Ah. Good catch! That id looks unused to me. Perhaps I'll delete it.

7

Changed 8 months ago by itamar

  • owner changed from itamar to exarkun
  • keywords review removed

Looks good, please merge.

(We should keep our eye out and see if we want to make a twisted.python.compat.bytechr if this comes up again.)

8

Changed 8 months ago by exarkun

  • status changed from new to closed
  • resolution set to fixed

(In [35963]) Merge randbytes-py3-6061

Author: exarkun Reviewer: itamarst Fixes: #6061

Port twisted.python.randbytes to Python 3.

Note: See TracTickets for help on using tickets.