Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ftplib.FTP.makeport() bug #48161

Closed
giampaolo opened this issue Sep 19, 2008 · 7 comments
Closed

ftplib.FTP.makeport() bug #48161

giampaolo opened this issue Sep 19, 2008 · 7 comments
Labels
release-blocker stdlib Python modules in the Lib dir

Comments

@giampaolo
Copy link
Contributor

BPO 3911
Nosy @giampaolo, @benjaminp
Files
  • ftplib.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2008-09-27.22:04:39.325>
    created_at = <Date 2008-09-19.18:08:01.709>
    labels = ['library', 'release-blocker']
    title = 'ftplib.FTP.makeport() bug'
    updated_at = <Date 2008-09-27.22:04:39.324>
    user = 'https://github.com/giampaolo'

    bugs.python.org fields:

    activity = <Date 2008-09-27.22:04:39.324>
    actor = 'benjamin.peterson'
    assignee = 'none'
    closed = True
    closed_date = <Date 2008-09-27.22:04:39.325>
    closer = 'benjamin.peterson'
    components = ['Library (Lib)']
    creation = <Date 2008-09-19.18:08:01.709>
    creator = 'giampaolo.rodola'
    dependencies = []
    files = ['11527']
    hgrepos = []
    issue_num = 3911
    keywords = ['patch']
    message_count = 7.0
    messages = ['73435', '73444', '73445', '73446', '73470', '73606', '73942']
    nosy_count = 2.0
    nosy_names = ['giampaolo.rodola', 'benjamin.peterson']
    pr_nums = []
    priority = 'release blocker'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue3911'
    versions = ['Python 3.0']

    @giampaolo
    Copy link
    Contributor Author

    Python 3.0rc1 (r30rc1:66507, Sep 18 2008, 14:47:08) [MSC v.1500 32 bit
    (Intel)] on win32
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import ftplib
    >>> f = ftplib.FTP()
    >>> f.connect('mirrors.kernel.org')
    '220 Welcome to mirrors.kernel.org.'
    >>> f.login()
    '230 Login successful.'
    >>> f.debugging = 1
    >>> f.makeport()
    *cmd* 'PORT 10,0,0,1,18.21875,56'
    *resp* '500 Illegal PORT command.'
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "C:\python30\lib\ftplib.py", line 300, in makeport
        resp = self.sendport(host, port)
      File "C:\python30\lib\ftplib.py", line 260, in sendport
        return self.voidcmd(cmd)
      File "C:\python30\lib\ftplib.py", line 249, in voidcmd
        return self.voidresp()
      File "C:\python30\lib\ftplib.py", line 224, in voidresp
        resp = self.getresp()
      File "C:\python30\lib\ftplib.py", line 219, in getresp
        raise error_perm(resp)
    ftplib.error_perm: 500 Illegal PORT command.
    >>>

    Path in attachment.

    @giampaolo giampaolo added the stdlib Python modules in the Lib dir label Sep 19, 2008
    @benjaminp
    Copy link
    Contributor

    Why not just use floor divide (//)?

    @giampaolo
    Copy link
    Contributor Author

    At your discretion. I was thinking that it's not encouraging that such
    an outstanding bug has passed silently until RC1. IMHO, a minimal test
    suite for the ftplib module would be really necessary.

    A dummy FTP server returning fixed response codes could be arranged and
    used to test the basic FTP class methods.

    @benjaminp
    Copy link
    Contributor

    On Fri, Sep 19, 2008 at 6:23 PM, Giampaolo Rodola'
    <report@bugs.python.org> wrote:

    Giampaolo Rodola' <billiejoex@users.sourceforge.net> added the comment:

    At your discretion. I was thinking that it's not encouraging that such
    an outstanding bug has passed silently until RC1. IMHO, a minimal test
    suite for the ftplib module would be really necessary.

    Yes, testing of some of these modules is quite sad.

    A dummy FTP server returning fixed response codes could be arranged and
    used to test the basic FTP class methods.

    Would you like to contribute a patch?


    Python tracker <report@bugs.python.org>
    <http://bugs.python.org/issue3911\>


    @giampaolo
    Copy link
    Contributor Author

    Would you like to contribute a patch?

    Ok.
    I started working on a patch which implements a dummy asyncore-based FTP
    server including tests for all basic FTP() class methods.
    I'll contribute a patch as soon as I'll wrote IPv6 tests.

    @giampaolo
    Copy link
    Contributor Author

    Would you like to contribute a patch?

    Done in issue bpo-3939.

    @benjaminp
    Copy link
    Contributor

    Fixed in r66656.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    release-blocker stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants