[issue41373] IDLE: edit/save files created by Windows Explorer

2020-07-26 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41373] IDLE: edit/save files created by Windows Explorer

2020-07-24 Thread miss-islington


miss-islington  added the comment:


New changeset 15fdbb7145ee99abd98b4968307d4b89dd71a988 by Miss Islington (bot) 
in branch '3.9':
bpo-41373: IDLE: Fix saving files loaded with no newlines or mixed newlines 
(GH-21597)
https://github.com/python/cpython/commit/15fdbb7145ee99abd98b4968307d4b89dd71a988


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41373] IDLE: edit/save files created by Windows Explorer

2020-07-24 Thread miss-islington


miss-islington  added the comment:


New changeset 1c562ced2123f4d5a250fe9072ac93504cc41967 by Miss Islington (bot) 
in branch '3.8':
bpo-41373: IDLE: Fix saving files loaded with no newlines or mixed newlines 
(GH-21597)
https://github.com/python/cpython/commit/1c562ced2123f4d5a250fe9072ac93504cc41967


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41373] IDLE: edit/save files created by Windows Explorer

2020-07-24 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 0dd463c8a4269137ebed7cc29605c555030df94f by Serhiy Storchaka in 
branch 'master':
bpo-41373: IDLE: Fix saving files loaded with no newlines or mixed newlines 
(GH-21597)
https://github.com/python/cpython/commit/0dd463c8a4269137ebed7cc29605c555030df94f


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41373] IDLE: edit/save files created by Windows Explorer

2020-07-24 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20753
pull_request: https://github.com/python/cpython/pull/21611

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41373] IDLE: edit/save files created by Windows Explorer

2020-07-24 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +20752
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/21610

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41373] IDLE: edit/save files created by Windows Explorer

2020-07-24 Thread Emmanuel Arias


Change by Emmanuel Arias :


--
nosy: +eamanu

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41373] IDLE: edit/save files created by Windows Explorer

2020-07-24 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Raymond, I tested patch today and expect to apply it (without unittests yet) 
tomorrow, so will be in 3.9.0rc1 abd 3.8.6.  In the meanwhile, either create 
new files within IDLE (File=>NEW) or add "isinstance(self.eol_convention, str) 
and " after 'if' on line 251 of idlelib/iomenu.py, just before the line in the 
traceback.

The added check will be put elsewhere by the patch, but it should work on 251.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41373] IDLE: edit/save files created by Windows Explorer

2020-07-24 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Bumping-up the priority.  Today, I and a (virtual) room full of engineers 
simultaneously hit this problem and we all lost work.  See issue41378

--
nosy: +rhettinger
priority: normal -> high

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41373] IDLE: edit/save files created by Windows Explorer

2020-07-23 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

So loading an externally created blank file (on any system) results in None.  
File=>New must set eol_convention, I presume to the same default.  Before I got 
the traceback, I though it might be an issue with the Windows utf-8 BOM being 
added.

3.9.0rc1 is due August 10.  It should have fix and new tests.

--
stage: patch review -> test needed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41373] IDLE: edit/save files created by Windows Explorer

2020-07-23 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
keywords: +patch
pull_requests: +20736
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/21597

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41373] IDLE: edit/save files created by Windows Explorer

2020-07-23 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I missed that the file's attribute newlines can be None if no line separators 
were read. It can also be a tuple if mixed newlines are used. I think that 
eol_convention should be set to the default value os.linesep in these cases.

I am currently not able to test this since IDLE does not work on my computer 
after upgrading to Ubuntu 20.04.

--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41373] IDLE: edit/save files created by Windows Explorer

2020-07-22 Thread Terry J. Reedy


New submission from Terry J. Reedy :

#41300 fixed one bug in the patch for #41158.  A user reported another on on 
idle-dev list.  Create a file in Windows Explorer.  Leave as .txt or rename to 
.py.  Right click and Edit with IDLE 3.8 (.4/.5 or 3.9.0b4 or 5).  Edit works, 
Save (or Run) does not.  Open the same file from Command Prompt, change it, and 
trying to save produces

Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Programs\Python38\lib\tkinter\__init__.py", line 1883, in __call__
return self.func(*args)
  File "C:\Programs\Python38\lib\idlelib\multicall.py", line 176, in handler
r = l[i](event)
  File "C:\Programs\Python38\lib\idlelib\iomenu.py", line 200, in save
if self.writefile(self.filename):
  File "C:\Programs\Python38\lib\idlelib\iomenu.py", line 232, in writefile
text = self.fixnewlines()
  File "C:\Programs\Python38\lib\idlelib\iomenu.py", line 252, in fixnewlines
text = text.replace("\n", self.eol_convention)
TypeError: replace() argument 2 must be str, not None

The replacement line is guarded with
if self.eol_convention != "\n":
Either the condition should be include 'and self.eol_convention is not None' or 
the setting of the attribute should be changed.  I will look into how it was 
set before the #41158 patch.

--
messages: 374119
nosy: terry.reedy
priority: normal
severity: normal
stage: test needed
status: open
title: IDLE: edit/save files created by Windows Explorer
type: behavior
versions: Python 3.10, Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com