This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vpjtqwv0101
Recipients vpjtqwv0101
Date 2021-07-30.23:34:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1627688040.44.0.389798708985.issue44788@roundup.psfhosted.org>
In-reply-to
Content
I think all that's needed is to add new parameter port in __init__ and then add it to self.connect() as argument:
    def __init__(self, host='', port=0, user='', passwd='', acct='',
                 timeout=_GLOBAL_DEFAULT_TIMEOUT, source_address=None, *,
				 encoding='utf-8'):
		self.encoding = encoding
        self.source_address = source_address
        self.timeout = timeout
        if host:
            self.connect(host, port)
            if user:
                self.login(user, passwd, acct)


Currently if I need to specify port, I have to do it like this:
with FTP() as ftp:
	ftp.connect(host, port)
	ftp.login(user, password)
	# my actions

I the port parameter would be added, I could use it like this:
with FTP(host, port, user, password) as ftp:
	# my actions

Thank you.
History
Date User Action Args
2021-07-30 23:34:00vpjtqwv0101setrecipients: + vpjtqwv0101
2021-07-30 23:34:00vpjtqwv0101setmessageid: <1627688040.44.0.389798708985.issue44788@roundup.psfhosted.org>
2021-07-30 23:34:00vpjtqwv0101linkissue44788 messages
2021-07-30 23:34:00vpjtqwv0101create