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 mhammond
Recipients brett.cannon, eryksun, mhammond, nnemkin, paul.moore, steve.dower, tim.golden, zach.ware
Date 2016-07-01.01:11:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1467335463.18.0.797035172678.issue27417@psf.upfronthosting.co.za>
In-reply-to
Content
> > This may well break things like pythonwin until they also grow support
> > for the new param 

> I expect that, which is why I'm only proposing it for 3.6 onwards. While
> adding support for a new major version of Python should be fairly cheap,
> it isn't entirely free and so it's the right time to add new complications.

My point with that is that pythonwin is a GUI app rarely started by the command-line. It isn't that adding the cmdline support is difficult, more that it's difficult for users to specify it. This will be true for any GUI installed into the start menu (eg, idle)

> Nikita:
> > COM should be initialized on demand by C modules that need it. They might need STA or
> > MTA, it's their choice to make.

> And if the C module is the core interpreter (see issue26137 for an example of where
> this would be necessary)? If we require user code to initialize COM, this whole
> proposal is moot as that is the current state of the world and it does not require
> any changes to achieve.

I'd be surprised if issue26137 ended up unconditionally doing a malware scan on everything Python ever executes. Thus, I don't see why "I'd like to enable calling CoInitializeEx on Python startup for 3.6" is necessary - just attempting to initialize it immediately before that feature is invoked would be fine and may sidestep the entire issue. Instead of command-line flags to control COM initialization we should add new flags to disable these new features that require COM (and thus also implicitly control whether COM is initialized or not.)

IOW, I think it makes sense for the core to initialize COM immediately before it needs to use COM, under the assumption that executing "python" or "python myscript.py" isn't going to need to do that by default. I think initializing COM by default at process startup on the off-chance that some COM-using feature will be invoked is more problematic.
History
Date User Action Args
2016-07-01 01:11:03mhammondsetrecipients: + mhammond, brett.cannon, paul.moore, tim.golden, zach.ware, eryksun, steve.dower, nnemkin
2016-07-01 01:11:03mhammondsetmessageid: <1467335463.18.0.797035172678.issue27417@psf.upfronthosting.co.za>
2016-07-01 01:11:03mhammondlinkissue27417 messages
2016-07-01 01:11:00mhammondcreate