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 berker.peksag
Recipients berker.peksag, dstufft, eric.araujo, serhiy.storchaka, vstinner
Date 2017-11-28.15:23:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1511882609.02.0.213398074469.issue32155@psf.upfronthosting.co.za>
In-reply-to
Content
I don't think distutils changes are correct.

    ('realm', self.DEFAULT_REALM)

'realm' is the config name and 'self.DEFAULT_REALM' is its default value. In the 'for key, default in ...:' loop,

1. It checks if it's already set in the config file
2. Sets its value to 'current' if it does
3. If it doesn't, uses self.DEFAULT_REALM

distutils sets default values for undefined options via 'finalize_options' methods and there is the following command in 'PyPIRCCommand.finalize_options()' method:

    if self.realm is None:
        self.realm = self.DEFAULT_REALM

So unless there is a user set value for the 'realm' option (see the 'upload' and 'register' commands), 'self.realm' equals to 'self.DEFAULT_REALM'.

I'd remove the following code instead:

    realm = self.realm or self.DEFAULT_REALM
History
Date User Action Args
2017-11-28 15:23:29berker.peksagsetrecipients: + berker.peksag, vstinner, eric.araujo, serhiy.storchaka, dstufft
2017-11-28 15:23:29berker.peksagsetmessageid: <1511882609.02.0.213398074469.issue32155@psf.upfronthosting.co.za>
2017-11-28 15:23:29berker.peksaglinkissue32155 messages
2017-11-28 15:23:28berker.peksagcreate