Ticket #5913 enhancement closed fixed

Opened 9 months ago

Last modified 9 months ago

Port qual, safe_repr and safe_str (from twisted.python.reflect) to Python 3

Reported by: itamar Owned by: itamar
Priority: normal Milestone: Python 3.3 Minimal
Component: core Keywords:
Cc: Branch: branches/reflect-python3-5913-2
Author: itamarst Launchpad Bug:

Description

qual, safe_repr and safe_str are used by twisted.python.failure and twisted.python.log, so it would be useful to port them to Python 3.

Change History

1

Changed 9 months ago by itamarst

  • branch set to branches/reflect-python3-5913
  • branch_author set to itamarst

(In [35452]) Branching to 'reflect-python3-5913'

2

Changed 9 months ago by itamar

  • keywords review added
  • owner set to exarkun

3

Changed 9 months ago by exarkun

  • keywords review removed
  • owner changed from exarkun to itamar
  1. Argh StringIO/BytesIO. If you think it's a good idea, perhaps twisted.python.compat.NativeStringIO? Or we could wait until we need this check again, I guess, and refactor then.
  2. Explicit documentation about the return type of safe_str and safe_repr would probably be good at this point.
  3. The docstring for unsignedID says it is mostly only necessary before Python 2.5. I guess keeping the existing implementation doesn't hurt, though.

Otherwise good. Fix at least point 2 and then merge, thanks.

4

Changed 9 months ago by itamar

  1. Opened #5930.
  2. Done.
  3. Yeah, I noticed that too late. Plus probably Python 3.5 will make negative ids again, so can't hurt.

5

Changed 9 months ago by itamarst

  • branch changed from branches/reflect-python3-5913 to branches/reflect-python3-5913-2

(In [35463]) Branching to 'reflect-python3-5913-2'

6

Changed 9 months ago by itamarst

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

(In [35466]) Merge reflect-python3-5913-2

Author: itamar Review: exarkun Fixes: #5913

More functions from twisted.python.reflect ported to Python 3.

Note: See TracTickets for help on using tickets.