Opened 7 years ago

Closed 6 months ago

#4998 enhancement closed duplicate (duplicate)

replace call to functions from the string module in t.protocols.socks

Reported by: Juan A. Diaz Owned by:
Priority: normal Milestone: Python-3.x
Component: core Keywords:
Cc: Branch: branches/str-methods-protocols-4998
branch-diff, diff-cov, branch-cov, buildbot
Author: lvh

Description

To make the port to python 3k more easy, I'm replacing all the calls to functions from the string module, for their equivalent from the str type object or calling directly to the built-in method of the string variable.

Attachments (1)

protocols.patch (1.6 KB) - added by Juan A. Diaz 7 years ago.
patch

Download all attachments as: .zip

Change History (11)

Changed 7 years ago by Juan A. Diaz

Attachment: protocols.patch added

patch

comment:1 Changed 7 years ago by Juan A. Diaz

Keywords: py3k, reviewpy3k review

comment:2 Changed 7 years ago by lvh

Owner: set to lvh
Status: newassigned

comment:3 Changed 7 years ago by lvh

Author: lvh
Branch: branches/str-methods-protocols-4998

(In [31457]) Branching to 'str-methods-protocols-4998'

comment:4 Changed 7 years ago by lvh

Keywords: review removed
Owner: changed from lvh to Juan A. Diaz
Status: assignednew

Like all of the other ones looks pretty good :-) One minor point of review though:

In twisted/protocols/finger.py, line 21, with the rfind, why isn't that just:

user, host = user.rsplit("@", 1)

Using the maxsplit argument (why that isn't a kwarg I will never know)?

As with one of the previous tickets in this series maybe we should wait for glyph or jp to say if we're letting these through faster because they help the py3k effort *right now*.

Otherwise looks good to me.

comment:5 Changed 7 years ago by lvh

Owner: changed from Juan A. Diaz to lvh
Status: newassigned

Apparently this is not the place for that kind of review, so I will create a new ticket for that module, perhaps. Ignore my previous review then :-)

comment:6 Changed 7 years ago by Jean-Paul Calderone

The change to socks.py modifies code not executed by the test suite.

comment:7 Changed 7 years ago by lvh

Owner: changed from lvh to Juan A. Diaz
Status: assignednew

What JP said. Reassigning to nueces -- if you'd rather not write the relevant tests, please unassign yourself.

comment:8 Changed 6 years ago by Thijs Triemstra

Milestone: Python-3.x
Summary: replace call to functions from the string module in protocolsreplace call to functions from the string module in t.protocols.socks

#5321 took care of the finger part of this ticket.

comment:9 Changed 5 years ago by Thijs Triemstra

Owner: Juan A. Diaz deleted

comment:10 Changed 6 months ago by Craig Rodrigues

Keywords: py3k removed
Resolution: duplicate
Status: newclosed

Duplicate of ticket:5231

Note: See TracTickets for help on using tickets.