[issue41378] IDLE EOL convention not set on a empty file

2020-07-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is a duplicate of issue41373 (and the problem is not only with empty files). -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> IDLE: edit/save files created by Windows Explorer

[issue41377] memoryview of str (unicode)

2020-07-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I concur with Raymond. Also, it could not help to caught bugs when you get a string instead expected bytes object. It may "work" in tests while string is ASCII, but fail miserably on real-world non-ASCII data. -- nosy: +serhiy.storchaka

[issue41378] IDLE EOL convention not set on a empty file

2020-07-23 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +lukasz.langa ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41378] IDLE EOL convention not set on a empty file

2020-07-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: This may have been caused by https://github.com/python/cpython/commit/c3fa7534c7173d338880a1727f17795670518610 for https://bugs.python.org/issue41378 -- ___ Python tracker

[issue41378] IDLE EOL convention not set on a empty file

2020-07-23 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41378] IDLE EOL convention not set on a empty file

2020-07-23 Thread Emmanuel Arias
Emmanuel Arias added the comment: Hello everybody! When a new file is loaded, the current loadfile read for the newline to set the eol_convention. As does not exist for a empty file a None is saved and for that reason the exception is raised If you consider that this patch is correct I cant

[issue41378] IDLE EOL convention not set on a empty file

2020-07-23 Thread Raymond Hettinger
New submission from Raymond Hettinger : I think this is a new bug, present in Python 3.8.5 but not present in 3.8.3. Steps to reproduce: * $ touch xyzpdq.py # Creates new file, zero bytes in length * $ python3.8 -m idlelib.idle xyzdpq.py * Enter text: print('hello

[issue41377] memoryview of str (unicode)

2020-07-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: I think we can close this. AFAICT, if we exposed the raw internal object with a memory view, there would be no practical way to use the data without a user having to substantially recreate the logic already present in encode() and the other string

[issue41377] memoryview of str (unicode)

2020-07-23 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +skrah ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41182] DefaultSelector fails to detect selector on VMware ESXi

2020-07-23 Thread Guido van Rossum
Guido van Rossum added the comment: Łukasz, what do you think of backporting this to 3.9? -- nosy: +gvanrossum, lukasz.langa ___ Python tracker ___

[issue41377] memoryview of str (unicode)

2020-07-23 Thread Eric V. Smith
Eric V. Smith added the comment: I don't think there's a python-level api to find out the "kind", but I can't say I've looked closely. And there are no doubt problems with doing so and alternate implementations other than CPython. I'm not sure we want to expose this implementation detail,

[issue41350] Use of zipfile.Path causes attempt to write after ZipFile is closed

2020-07-23 Thread Jeffrey Kintscher
Jeffrey Kintscher added the comment: It looks like a copy of the zip_file object is getting created, probably by the Path constructor: zip_path = Path(zip_file, "file-a") When return is invoked, the copy still has a reference to the now closed bytes_io object which causes the

[issue40841] Provide mimetypes.sniff API as stdlib

2020-07-23 Thread Guido van Rossum
Guido van Rossum added the comment: This looks like a useful addition. I hope someone will take up the review! -- nosy: +gvanrossum ___ Python tracker ___

[issue41377] memoryview of str (unicode)

2020-07-23 Thread jakirkham
jakirkham added the comment: Thanks for the clarification, Eric! :) Is this the sort of thing that we could capture in the `format`[1] field (like with `"B"`, `"H"`, and `"I"`[2]) or are there potential issues there? [1]: https://docs.python.org/3/c-api/buffer.html#c.Py_buffer.format [2]:

[issue41377] memoryview of str (unicode)

2020-07-23 Thread Eric V. Smith
Eric V. Smith added the comment: > AIUI (though I could be misunderstanding things) `str` objects do use some > kind of typed array of unicode characters (either 16-bit narrow or 32-bit > wide). It's somewhat more complicated. The string data is stored differently depending on the maximum

[issue41377] memoryview of str (unicode)

2020-07-23 Thread jakirkham
New submission from jakirkham : When working with lower level C/C++ code, the Python Buffer Protocol[1] has been immensely useful as it allows common Python `bytes`-like objects to expose the underlying memory buffer in a pointer that C/C++ code can easily work with zero-copy. In fact

[issue41317] sock_accept() does not remove server socket reader on cancellation

2020-07-23 Thread miss-islington
miss-islington added the comment: New changeset 4ff8e5ba4fef7f7d0fc1b1872ccb91bc3fd1294d by Miss Islington (bot) in branch '3.9': bpo-41317: Remove reader on cancellation in asyncio.loop.sock_accept() (GH-21595)

[issue41317] sock_accept() does not remove server socket reader on cancellation

2020-07-23 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset 0dd98c2d00a75efbec19c2ed942923981bc06683 by Alex Grönholm in branch 'master': bpo-41317: Remove reader on cancellation in asyncio.loop.sock_accept() (#21595) https://github.com/python/cpython/commit/0dd98c2d00a75efbec19c2ed942923981bc06683

[issue41317] sock_accept() does not remove server socket reader on cancellation

2020-07-23 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +20742 pull_request: https://github.com/python/cpython/pull/21603 ___ Python tracker

[issue41374] socket.TCP_* no longer available with cygwin 3.1.6+

2020-07-23 Thread Christoph Reiter
Change by Christoph Reiter : -- nosy: +erik.bray ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41375] `mode` security concern

2020-07-23 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> not a bug ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41375] `mode` security concern

2020-07-23 Thread YoSTEALTH
YoSTEALTH added the comment: I am closing this as its not a issue anymore... I was trying to solve a problem that has become a core feature! -- stage: -> resolved status: open -> closed ___ Python tracker

[issue38946] IDLE on macOS 10.15 Catalina does not open double-clicked files if app already launched

2020-07-23 Thread Ned Deily
Ned Deily added the comment: Ramon, I am not sure why you closed this issue. Perhaps it may no longer be a problem for you, but it has not yet been resolved for users of the python.org macOS installers. -- stage: resolved -> status: closed -> open

[issue41375] `mode` security concern

2020-07-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is expected behavior on Posix system. See https://pubs.opengroup.org/onlinepubs/9699919799/functions/umask.html What is the problem? -- nosy: +serhiy.storchaka ___ Python tracker

[issue38946] IDLE on macOS 10.15 Catalina does not open double-clicked files if app already launched

2020-07-23 Thread Ramon
Change by Ramon : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue41358] Unable to uninstall Python launcher using command line

2020-07-23 Thread William Pickard
William Pickard added the comment: I think on Windows, the Python Launcher is a separate install entity. You can verify this under Control Panel -> Uninstall Program and Features. -- nosy: +WildCard65 ___ Python tracker

[issue41376] site.getusersitepackages() incorrectly claims that PYTHONNOUSERSITE is respected

2020-07-23 Thread Phil Elson
Change by Phil Elson : -- keywords: +patch pull_requests: +20740 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21602 ___ Python tracker ___

[issue41376] site.getusersitepackages() incorrectly claims that PYTHONNOUSERSITE is respected

2020-07-23 Thread Phil Elson
New submission from Phil Elson : The documentation for site.getusersitepackages() states at https://docs.python.org/3.10/library/site.html#site.getusersitepackages: Return the path of the user-specific site-packages directory, USER_SITE. If it is not initialized yet, this function will also

[issue41375] `mode` security concern

2020-07-23 Thread YoSTEALTH
New submission from YoSTEALTH : import os import stat import os.path def problem(tmp_path): # result: # --- # check: False # mode: 416 # create temp file fd = os.open(tmp_path, os.O_CREAT, 0o660) os.close(fd) # Directory is effected as well #

[issue41335] free(): invalid pointer in list_ass_item() in Python 3.7.3

2020-07-23 Thread Christian Heimes
Christian Heimes added the comment: Correction, _int_free() is an internal function of malloc(). small_ints.lto_priv+72 looks like deallocation of an integer object at location +72. This is either int 4 (on 64bit platforms) or int 13 (on 32bit platforms): >>> NSMALLNEGINTS = 5 >>> (4 +

[issue41335] free(): invalid pointer in list_ass_item() in Python 3.7.3

2020-07-23 Thread Christian Heimes
Christian Heimes added the comment: int_free() and small_ints in the traceback likely point to a reference counting issue for small integers in range of -5 to +256. These integers are cached and should never get freed in the middle of a process. -- nosy: +christian.heimes

[issue41365] Python Launcher is sorry to say... No pyvenv.cfg file

2020-07-23 Thread Eryk Sun
Eryk Sun added the comment: > The default association should go to pyw.exe, which is likely in > your C:\Windows directory. However, don't browse for pyw.exe. That will create a new progid that doesn't support command-line arguments or a shell drop handler. You should select the Python app

[issue41367] Popen Timeout raised on 3.6 but not on 3.8

2020-07-23 Thread Steve Stagg
Steve Stagg added the comment: Joan, is that your *actual* password in the example code? If so, I'd recommend changing it wherever you've used it. -- nosy: +stestagg ___ Python tracker

[issue41335] free(): invalid pointer in list_ass_item() in Python 3.7.3

2020-07-23 Thread Steve Stagg
Steve Stagg added the comment: It's possible that RPi.GPIO (or another C extension) is mis-managing reference counts, resulting in it freeing or trying to free an object at the wrong time. If that object is a common value, or the branch that causes the refcount issue is uncommon, it may

[issue41366] sign-conversion warning in 3.9 beta

2020-07-23 Thread Inada Naoki
Inada Naoki added the comment: Thank you. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue41366] sign-conversion warning in 3.9 beta

2020-07-23 Thread miss-islington
miss-islington added the comment: New changeset e8dda907fbeb957436d2662714d993b073be55bb by Miss Islington (bot) in branch '3.9': bpo-41366: Fix clang warning for sign conversion (GH-21592) https://github.com/python/cpython/commit/e8dda907fbeb957436d2662714d993b073be55bb --

[issue41366] sign-conversion warning in 3.9 beta

2020-07-23 Thread Inada Naoki
Inada Naoki added the comment: New changeset 680254a8dc64e3ada00f88a7c42d41eb02108353 by Henry Schreiner in branch 'master': bpo-41366: Fix clang warning for sign conversion (GH-21592) https://github.com/python/cpython/commit/680254a8dc64e3ada00f88a7c42d41eb02108353 -- nosy:

[issue41366] sign-conversion warning in 3.9 beta

2020-07-23 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +20739 pull_request: https://github.com/python/cpython/pull/21600 ___ Python tracker

[issue41365] Python Launcher is sorry to say... No pyvenv.cfg file

2020-07-23 Thread Steve Dower
Steve Dower added the comment: > it fails with this error means you're running a virtual-environment launcher > instead of a base Python executable. Exactly. It sounds like you probably searched for pythonw.exe and found the one in Lib/venv/scripts/nt instead of the actual one. The default

[issue4630] IDLE: add cursor noblink option

2020-07-23 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10 -Python 3.6, Python 3.7 ___ Python tracker ___

[issue4630] IDLE: add cursor noblink option

2020-07-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 29df301a9236cbae06762d9569e56197d3f5e6ee by Terry Jan Reedy in branch '3.8': [3.8] bpo-4630: Fix errors in Lib/idlelib/NEWS.txt (GH-21594) https://github.com/python/cpython/commit/29df301a9236cbae06762d9569e56197d3f5e6ee --

[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

[issue41374] socket.TCP_* no longer available with cygwin 3.1.6+

2020-07-23 Thread Christoph Reiter
New submission from Christoph Reiter : The TCP macros are provided by netinet/tcp.h, which for some reason is skipped here: https://github.com/python/cpython/blob/592527f3ee59616eca2bd1da771f7c14cee808d5/Modules/socketmodule.h#L11 Until cygwin 3.1.6 these macros were also provided by

[issue4630] IDLE: add cursor noblink option

2020-07-23 Thread Terry J. Reedy
Change by Terry J. Reedy : -- pull_requests: +20738 pull_request: https://github.com/python/cpython/pull/21599 ___ Python tracker ___

[issue41350] Use of zipfile.Path causes attempt to write after ZipFile is closed

2020-07-23 Thread Jeffrey Kintscher
Change by Jeffrey Kintscher : -- nosy: +Jeffrey.Kintscher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue4630] IDLE: add cursor noblink option

2020-07-23 Thread miss-islington
miss-islington added the comment: New changeset 4cf7afcefcd1eb1ab233ed4523eb2b3bbf599c81 by Miss Islington (bot) in branch '3.9': bpo-4630: Fix errors in Lib/idlelib/NEWS.txt (GH-21594) https://github.com/python/cpython/commit/4cf7afcefcd1eb1ab233ed4523eb2b3bbf599c81 --

[issue37095] [Feature Request]: Add zstd support in tarfile

2020-07-23 Thread Jeffrey Kintscher
Change by Jeffrey Kintscher : -- nosy: +Jeffrey.Kintscher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41368] Allow compiling Python with llvm-clang on Windows.

2020-07-23 Thread Jeffrey Kintscher
Change by Jeffrey Kintscher : -- nosy: +Jeffrey.Kintscher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41300] IDLE: add missing import io in iomenu.py

2020-07-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: #41373 is about another issue with the new iomenu code. I will close this and add tests there. -- resolution: -> fixed stage: test needed -> resolved status: open -> closed versions: +Python 3.5 -Python 3.10, Python 3.8, Python 3.9

[issue37095] [Feature Request]: Add zstd support in tarfile

2020-07-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The tarfile module supports arbitrary compressions by using the stream mode. You only need to use a third-party library which provides zstd support. Recent versions of the tar utility has options to explicit support of new compressions: --lzip, --lzma,

[issue4630] IDLE: add cursor noblink option

2020-07-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 592527f3ee59616eca2bd1da771f7c14cee808d5 by Zackery Spytz in branch 'master': bpo-4630: Fix errors in Lib/idlelib/NEWS.txt (GH-21594) https://github.com/python/cpython/commit/592527f3ee59616eca2bd1da771f7c14cee808d5 --

[issue4630] IDLE: add cursor noblink option

2020-07-23 Thread miss-islington
Change by miss-islington : -- pull_requests: +20737 pull_request: https://github.com/python/cpython/pull/21598 ___ Python tracker ___

[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

[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