回复: [BUG]: Can not save anyt hing on IDLE since v3.8.4!!

Eason Zhang <[email protected]> Thu, 23 Jul 2020 10:53:23 +0000
Newsgroups gmane.comp.python.idle
Message-ID <HK0PR01MB18925741E66BFCFB1245D49AFB760@HK0PR01MB1892.apcprd01.prod.exchangelabs.com>
--===============8290706988492121164==
Content-Language: zh-CN
Content-Type: multipart/alternative;
	boundary="_000_HK0PR01MB18925741E66BFCFB1245D49AFB760HK0PR01MB1892apcp_"

--_000_HK0PR01MB18925741E66BFCFB1245D49AFB760HK0PR01MB1892apcp_
Content-Type: text/plain; charset="gb2312"
Content-Transfer-Encoding: base64

SGkgVGVycnksDQoNClRoYW5rcyBmb3IgcmVzcG9uc2UgYWdhaW4uDQoNCkkgdHJpZWQgdG8gY3Jl
YXRlIGEgbmV3IGZpbGUgd2l0aCAiRmlsZSA9PiBOZXciICBvbiAzLjguNS4gSXQncyB0cnVlIHRo
YXQgY2FuIGJlIHNhdmVkIGFzIHVzdWFsLiBJIHdpbGwgdGFrZSB0aGlzIGFkdmljZSBmb3IgdGVt
cG9yYXJpbHkuDQoNClNvcnJ5IGZvciB0aGUgaW5jb252ZW5pZW5jZSBhcyB5b3UgZG9uJ3Qga25v
dyBDaGluZXNlLiBJIGp1c3QgdXNlZCBudW1iZXJzLCBFbmdsaXNoIGNoYXJhY3RlcnMgYW5kIENo
aW5lc2UgY2hhcmFjdGVycyB0byB0ZXN0IHByaW50LiBJdCdzIHByb3ZlZCB0aGF0IHdoYXRldmVy
IGNoYXJhY3RlcnMgYXJlIGFsbCBjYW5ub3QgYmUgc2F2ZWQuDQoNCkFzIHlvdSBtZW50aW9uZWQg
dGhhdCB0aGlzIGZpeCB3aWxsIGJlIHJlbGVhc2VkIG9uIDMuOS4wIG9yIGxhdGVyIHZlcnNpb24s
IGlzbid0IGl0ID8NCg0KUmVnYXJkcywNCkVhc29uDQpfX19fX19fX19fX19fX19fX19fX19fX19f
X19fX19fXw0Kt6K8/sjLOiBUZXJyeSBSZWVkeS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hhbmdlIHRoZSBjb25kaXRpb24gb24gdGhlIHByZXZpb3VzIGxpbmUsDQppb21lbnUu
cHksIGxpbmUgMjUxLg0KICAgICAgICAgaWYgc2VsZi5lb2xfY29udmVudGlvbiBub3QgaW4gKE5v
bmUsICcnLCAiXG4iKToNClRoaXMgb3IgYSBiZXR0ZXIgZml4IHNob3VsZCBiZSBpbiB0aGUgbmV4
dCByZWxlYXNlLCBsaWtlbHkgMy45LjByYzEuDQoNCkEgbmV3IGZpbGUgY3JlYXRlZCB3aXRoIEZp
bGUgPT4gTmV3IGNhbiBiZSBzYXZlZCBhcyB1c3VhbC4NCg0KLS0NClRlcnJ5IEphbiBSZWVkeQ0K
DQo=

--_000_HK0PR01MB18925741E66BFCFB1245D49AFB760HK0PR01MB1892apcp_
Content-Type: text/html; charset="gb2312"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dgb2312">
<style type=3D"text/css" style=3D"display:none;"> P {margin-top:0;margin-bo=
ttom:0;} </style>
</head>
<body dir=3D"ltr">
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
Hi Terry,</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
Thanks for response again.</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style=3D""><font color=3D"#000000" face=3D"Calibri, Arial, Helvetica, =
sans-serif"><span style=3D"font-size: 12pt;">I tried to&nbsp;</span></font>=
<span style=3D"color: rgb(0, 0, 0); font-family: &quot;Microsoft Yahei UI&q=
uot;, Verdana, Simsun, &quot;Segoe UI&quot;, -apple-system, BlinkMacSystemF=
ont, Roboto, &quot;Helvetica Neue&quot;, sans-serif; font-size: 14.6667px; =
background-color: rgb(255, 255, 255); display: inline !important;"><span st=
yle=3D"font-family: &quot;Microsoft Yahei UI&quot;, Verdana, Simsun, &quot;=
Segoe UI&quot;, -apple-system, BlinkMacSystemFont, Roboto, &quot;Helvetica =
Neue&quot;, sans-serif; background-color: rgb(255, 255, 255); display: inli=
ne !important">create
 a&nbsp;</span>new file with &quot;File =3D&gt; New&quot;&nbsp; on 3.8.5. I=
t's true that can be saved as usual. I will take this advice for&nbsp;tempo=
rarily.</span><span style=3D"display: inline !important;"></span></div>
<div style=3D""><span style=3D"color: rgb(0, 0, 0); font-family: &quot;Micr=
osoft Yahei UI&quot;, Verdana, Simsun, &quot;Segoe UI&quot;, -apple-system,=
 BlinkMacSystemFont, Roboto, &quot;Helvetica Neue&quot;, sans-serif; font-s=
ize: 14.6667px; background-color: rgb(255, 255, 255); display: inline !impo=
rtant;"><br>
</span></div>
<div style=3D""><span style=3D"color: rgb(0, 0, 0); font-family: &quot;Micr=
osoft Yahei UI&quot;, Verdana, Simsun, &quot;Segoe UI&quot;, -apple-system,=
 BlinkMacSystemFont, Roboto, &quot;Helvetica Neue&quot;, sans-serif; font-s=
ize: 14.6667px; background-color: rgb(255, 255, 255); display: inline !impo=
rtant;">Sorry
 for the inconvenience as you don't know Chinese. I just used numbers, Engl=
ish characters and Chinese characters to test print. It's&nbsp;proved that =
whatever&nbsp;<span style=3D"font-family: &quot;Microsoft Yahei UI&quot;, V=
erdana, Simsun, &quot;Segoe UI&quot;, -apple-system, BlinkMacSystemFont, Ro=
boto, &quot;Helvetica Neue&quot;, sans-serif; background-color: rgb(255, 25=
5, 255); display: inline !important">c</span><span style=3D"font-family: &q=
uot;Microsoft Yahei UI&quot;, Verdana, Simsun, &quot;Segoe UI&quot;, -apple=
-system, BlinkMacSystemFont, Roboto, &quot;Helvetica Neue&quot;, sans-serif=
; background-color: rgb(255, 255, 255); display: inline !important">haracte=
rs
 are all cannot be saved.</span><br>
</span></div>
<div style=3D""><span style=3D"color: rgb(0, 0, 0); font-family: &quot;Micr=
osoft Yahei UI&quot;, Verdana, Simsun, &quot;Segoe UI&quot;, -apple-system,=
 BlinkMacSystemFont, Roboto, &quot;Helvetica Neue&quot;, sans-serif; font-s=
ize: 14.6667px; background-color: rgb(255, 255, 255); display: inline !impo=
rtant;"><span style=3D"font-family: &quot;Microsoft Yahei UI&quot;, Verdana=
, Simsun, &quot;Segoe UI&quot;, -apple-system, BlinkMacSystemFont, Roboto, =
&quot;Helvetica Neue&quot;, sans-serif; background-color: rgb(255, 255, 255=
); display: inline !important"><br>
</span></span></div>
<div style=3D""><span style=3D"color: rgb(0, 0, 0); font-family: &quot;Micr=
osoft Yahei UI&quot;, Verdana, Simsun, &quot;Segoe UI&quot;, -apple-system,=
 BlinkMacSystemFont, Roboto, &quot;Helvetica Neue&quot;, sans-serif; font-s=
ize: 14.6667px; background-color: rgb(255, 255, 255); display: inline !impo=
rtant;"><span style=3D"font-family: &quot;Microsoft Yahei UI&quot;, Verdana=
, Simsun, &quot;Segoe UI&quot;, -apple-system, BlinkMacSystemFont, Roboto, =
&quot;Helvetica Neue&quot;, sans-serif; background-color: rgb(255, 255, 255=
); display: inline !important">As
 you mentioned that this fix will be released on 3.9.0 or&nbsp;later versio=
n, isn't it ?</span></span></div>
<div style=3D""><span style=3D"color: rgb(0, 0, 0); font-family: &quot;Micr=
osoft Yahei UI&quot;, Verdana, Simsun, &quot;Segoe UI&quot;, -apple-system,=
 BlinkMacSystemFont, Roboto, &quot;Helvetica Neue&quot;, sans-serif; font-s=
ize: 14.6667px; background-color: rgb(255, 255, 255); display: inline !impo=
rtant;"><span style=3D"font-family: &quot;Microsoft Yahei UI&quot;, Verdana=
, Simsun, &quot;Segoe UI&quot;, -apple-system, BlinkMacSystemFont, Roboto, =
&quot;Helvetica Neue&quot;, sans-serif; background-color: rgb(255, 255, 255=
); display: inline !important"><br>
</span></span></div>
<div style=3D""><font color=3D"#000000"><span style=3D"font-size: 14.6667px=
;">Regards,</span></font></div>
<div style=3D""><font color=3D"#000000"><span style=3D"font-size: 14.6667px=
;">Eason</span></font></div>
<div id=3D"appendonsend"></div>
<hr style=3D"display:inline-block;width:98%" tabindex=3D"-1">
<div id=3D"divRplyFwdMsg" dir=3D"ltr"><font face=3D"Calibri, sans-serif" st=
yle=3D"font-size:11pt" color=3D"#000000"><b>=B7=A2=BC=FE=C8=CB:</b> Terry R=
eedy &lt;[email protected]&gt;<br>
<b>=B7=A2=CB=CD=CA=B1=BC=E4:</b> 2020=C4=EA7=D4=C223=C8=D5 12:08<br>
<b>=CA=D5=BC=FE=C8=CB:</b> Eason Zhang &lt;[email protected]&gt;;=
 [email protected] &lt;[email protected]&gt;<br>
<b>=D6=F7=CC=E2:</b> Re: [BUG]: Can not save anything on IDLE since v3.8.4!=
!</font>
<div>&nbsp;</div>
</div>
<div class=3D"BodyFragment"><font size=3D"2"><span style=3D"font-size:11pt;=
">
<div class=3D"PlainText">On 7/22/2020 6:51 AM, Eason Zhang wrote:<br>
&gt; Hello,<br>
&gt; <br>
&gt; I created a new py file that can be saved and run on IDLE v3.8.3.<br>
&gt; I also created a new py file on IDLE v3.8.4&nbsp;but it can NOT be sav=
ed!<br>
&gt; Tried to edited an old version(e.g. v3.8.3) created py file on IDLE <b=
r>
&gt; v3.8.4 , it can be saved! That's so strange!<br>
&gt; <br>
&gt; It still cannot save on current latest version v3.8.5!! I tested this =
<br>
&gt; function both on 32-bits and 64-bits and they are all CANNOT work!!<br=
>
<br>
In response to my response about missing 'import io' and the fix on <br>
3.8.5/3.9.0b5, Eason privately sent me<br>
QUOTE&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quo=
t;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&=
quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quo=
t;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;<br>
Video1 (No bug on v3.8.3): <br>
<a href=3D"https://www.screencast.com/users/lonlon29/folders/Default/media/=
a0626e93-2c1c-4921-9560-955eb6111466">https://www.screencast.com/users/lonl=
on29/folders/Default/media/a0626e93-2c1c-4921-9560-955eb6111466</a><br>
<br>
Video2(Bug was found on v3.8.5):<br>
<a href=3D"https://www.screencast.com/t/xrbA7bQpRbuZ">https://www.screencas=
t.com/t/xrbA7bQpRbuZ</a><br>
<br>
System environment:<br>
Windows 8.1 64-bits OS and Windows 7 64-bits OS.<br>
&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&qu=
ot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;=
&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&qu=
ot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;<br>
<br>
System has Chinese set as its language.&nbsp; Video2 shows existing <br>
C:/Users/Administrators/Documents/test.py<br>
containing Chinese characters being edited, saved, and run multiple <br>
times with 3.8.5.&nbsp; So he is not running into the 3.8.4 no non-ascii <b=
r>
chars bug.<br>
<br>
In my response, I said Eason might be running into another issue. <br>
Videa2 continues with Windows 7/8.1 File Explorer &gt; Create New &gt; Text=
 <br>
file* &gt; name 385.py &gt; right click &gt; Edit with IDLE 3.8. (*I cannot=
 read <br>
Chinese but recognize positions of clicks. 'Edit ...' is the English <br>
installed by the python Windows installer.)<br>
<br>
I did the same with 'Edit with IDLE 3.9' as for some reason my <br>
installation of 3.8 did not add 'Edit with IDLE 3.8'.&nbsp; I had the same =
<br>
no-save problem.&nbsp; When I tried editing the file from a command line wi=
th<br>
C:\Users\Terry&gt;py -3.8 -m idlelib f:/python/a/385.py<br>
I got a traceback in Command Prompt ending with<br>
<br>
&nbsp;&nbsp; File &quot;C:\Programs\Python38\lib\idlelib\iomenu.py&quot;, l=
ine 252, in <br>
fixnewlines<br>
&nbsp;&nbsp;&nbsp;&nbsp; text =3D text.replace(&quot;\n&quot;, self.eol_con=
vention)<br>
TypeError: replace() argument 2 must be str, not None<br>
<br>
I suspect that this is only a Windows issue.&nbsp; Someone with *nix or Mac=
 <br>
could check.<br>
<br>
An immediate fix is to change the condition on the previous line, <br>
iomenu.py, line 251.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if self.eol_convention not=
 in (None, '', &quot;\n&quot;):<br>
This or a better fix should be in the next release, likely 3.9.0rc1.<br>
<br>
A new file created with File =3D&gt; New can be saved as usual.<br>
<br>
-- <br>
Terry Jan Reedy<br>
<br>
</div>
</span></font></div>
</body>
</html>

--_000_HK0PR01MB18925741E66BFCFB1245D49AFB760HK0PR01MB1892apcp_--

--===============8290706988492121164==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
IDLE-dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/idle-dev

--===============8290706988492121164==--