Crash on exiting with Python 3.6 #10112

pfmoore opened this Issue Dec 30, 2016 · 9 comments


None yet

3 participants

pfmoore commented Dec 30, 2016

I've just installed:

  1. The release version of Python 3.6.0 (Windows 64-bit, from the executable installer)
  2. IPython, via pip install ipython (plus some other packages at the same time)

Now, if I start IPython via ipython and immediately use Ctrl-D to exit, I get the "Do you really want to exit" prompt, and when I choose "y", I get "Python has stopped working".

Event Viewer doesn't show much useful in the way of details, but in case it helps, what I can see is:


  - Provider 

   [ Name]  Application Error 
  - EventID 1000 

   [ Qualifiers]  0 
   Level 2 
   Task 100 
   Keywords 0x80000000000000 
  - TimeCreated 

   [ SystemTime]  2016-12-30T12:06:32.000000000Z 
   EventRecordID 138677 
   Channel Application 
   Computer mypc 

- EventData 

pfmoore commented Dec 30, 2016

This appears to be due to the use of win-unicode-console which is no longer needed for Python 3.6 (as Python supports Unicode directly in the console now). The crash comes when disabling win-unicode-console. I would suggest simply not using the module in 3.6+.

As a simple test, I modified IPython/terminal/ as follows:

    def enable_win_unicode_console(self):
        # Add the following 2 lines
        if sys.version_info >= (3, 6):

and this stopped the crash.

pfmoore commented Dec 30, 2016

Ah, didn't think to check the github version, sorry. I have 5.1.0.

pfmoore commented Dec 30, 2016

... and yes, that precise check is in github. Please return the keys to Guido's time machine when you're finished with it :-)

pfmoore commented Jan 1, 2017

@xoviat I'm not sure how your comment relates to the current issue, but the pypiwin32 project is simply rebuilds of the pywin32 project, which is hosted on Sourceforge and does not provide wheels. Pywin32 provides wininst installers for 3.6, which can be converted to wheels using wheel convert or Christoph Gohlke hosts wheels on his site.

The pypiwin32 project was set up by glyph to offer a source for pywin32 wheels which were usable from pip. His original builds were rebuilds, and I added some extra builds generated via wheel convert.

I don't see much advantage in a Github organisation - requests against pywin32 should be directed to their project infrastructure at sourceforge. I do not want to try to offer support for pypiwin32 independently of pywin32 (I can't speak for the other maintainers on this, though). What I might do is try to find some time to wheel convert the pywin32 220 builds from sourceforge and add them to the pypiwin32 project, though. No promises, though - IIRC glyph had some concerns about simple conversion, so I'll need to check with him as to whether he'd be OK with that.

pfmoore commented Jan 1, 2017

OK, well IMO these issues need to be addressed with the pywin32 project, not with pypiwin32, which is nothing more than a repackaging. Anyway, this issue is not the right place to discuss this - I suggest picking it up on the pywin32 support channels.

minrk commented Jan 2, 2017

#9946 is the fix, currently in master and marked for 5.2. @takluyver since this is needed for Python 3.6 on Windows, should we make a 5.1.1 with just this? If so, any others for a 5.1.1?


+1 to doing a release soon with that fix, whether it's 5.1.1 or 5.2.

@takluyver takluyver modified the milestone: 5.2 Jan 12, 2017

Closing as this is fixed in master. I'm trying to push towards a 5.2 release.

@takluyver takluyver closed this Jan 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment