Crash on exiting with Python 3.6 #10112

Closed
pfmoore opened this Issue Dec 30, 2016 · 9 comments

Projects

None yet

3 participants

@pfmoore
Contributor
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:

System 

  - 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 
 
   Security 
 

- EventData 

   python.exe 
   3.6.150.1013 
   585cdba5 
   ntdll.dll 
   6.1.7601.23569 
   57f7c06e 
   c0000374 
   00000000000bf3e2 
   205c 
   01d2629525cb1311 
   c:\users\uk03306\appdata\local\programs\python\python36\python.exe 
   C:\Windows\SYSTEM32\ntdll.dll 
   66c4cfea-ce88-11e6-813a-5ce0c5b8d4cb 
@pfmoore
Contributor
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/interactiveshell.py as follows:

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

and this stopped the crash.

@takluyver
Member
@pfmoore
Contributor
pfmoore commented Dec 30, 2016

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

@pfmoore
Contributor
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
Contributor
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
Contributor
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
Member
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?

@takluyver
Member

+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
@takluyver
Member

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