[issue34995] functools.cached_property does not maintain the wrapped method's __isabstractmethod__

2018-11-19 Thread INADA Naoki
INADA Naoki added the comment: I worried about people think we recommend it when we support it, while this is just a request from one person, not recommendation after wide discussion. But it doesn't affect to static tools than I suspected. Tools like autocompletion should support

[issue31601] Availability of utimensat, futimens not checked correctly on macOS

2018-11-19 Thread Peter Petrik
Peter Petrik added the comment: This issue blocks QGIS distribution on MacOS for 10.11 and 10.12 releases, https://github.com/lutraconsulting/qgis-mac-packager/issues/22 I would like to know how much work is involved to fix the issue, possible whether there is a plan to fix it. Also we

[issue35273] 'eval' in generator expression behave different in dict from list

2018-11-19 Thread Windson Yang
Windson Yang added the comment: I get NameError for both versions in both 3.4.4, 3.5.2, 3.6.4, 3.7.1 -- nosy: +Windson Yang ___ Python tracker ___

[issue35251] FTPHandler.ftp_open documentation error

2018-11-19 Thread Windson Yang
Change by Windson Yang : -- assignee: -> docs@python components: +Documentation -Library (Lib) nosy: +docs@python ___ Python tracker ___

[issue35271] venv creates pyvenv.cfg with wrong home

2018-11-19 Thread Eric V. Smith
Change by Eric V. Smith : -- status: open -> pending ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35200] Make the half-open range behaviour easier to teach

2018-11-19 Thread Steven D'Aprano
Steven D'Aprano added the comment: Raymond: > I'm in agreement with the comments that the proposed __str__ revision is > confusing. In what way is it "confusing"? I'm especially perplexed that Julien apparently thinks it is confusing when emitted by str(), but educational and useful when

[issue35251] FTPHandler.ftp_open documentation error

2018-11-19 Thread Lysandros Nikolaou
Lysandros Nikolaou added the comment: Yeah, I am not currently working on this, so feel free to make a PR anytime you want. -- ___ Python tracker ___

[issue22121] IDLE should start with HOME as the initial working directory

2018-11-19 Thread Steve Dower
Steve Dower added the comment: AFAICT, the best logic is this: if os.path.normcase(os.getcwd()) == os.path.normcase(sys.prefix): os.chdir(get_default_location(sys.platform)) The only complexity is likely to be that "Documents" is localized on Windows, and SHGetFolderPathW [1] requires

[issue35276] Document thread safety

2018-11-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: One idea is that you could author a threading HOWTO document that covers atomicity, locks, queues, reentrancy, etc. This is a thorny topic and it would be nice to have the principles and techniques collected in one place. Ideally, it would include

[issue35221] Enhance venv activate commands readability

2018-11-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur with Lisa that this is something the people need to learn (that is why they're taking a class). FWIW, I've seen people copy square brackets for optional arguments, "mypow(base[, exp])" and angle brackets for syntax, " if else ". We also see

[issue33944] Deprecate and remove pth files

2018-11-19 Thread Jason R. Coombs
Jason R. Coombs added the comment: Regarding other uses of .pth files, the project [future-fstrings](https://github.com/asottile/future-fstrings) relies on .pth files to enable its at-startup behavior. I'm also +1 to remove .pth files, but I also believe it's not viable today due to

[issue35221] Enhance venv activate commands readability

2018-11-19 Thread Julien Palard
Change by Julien Palard : -- keywords: +patch pull_requests: +9847 stage: -> patch review ___ Python tracker ___ ___

[issue28401] Don't support the PEP384 stable ABI in pydebug builds

2018-11-19 Thread Brett Cannon
Change by Brett Cannon : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___

[issue35200] Make the half-open range behaviour easier to teach

2018-11-19 Thread Julien Palard
Julien Palard added the comment: Hi Raymond, I agree, there exist other means of teaching half closed range, but I was more concerned by self-taught students, alone facing the current range repr than students well accompanied. I also agree, let's not change the current repr (for backward

[issue35131] Cannot access to customized paths within .pth file

2018-11-19 Thread Brett Cannon
Brett Cannon added the comment: There is not "find best encoding" code, hence why so much code out there uses chardet. :) This might also tie into issue #33944 and the idea of rethinking .pth files. -- nosy: +brett.cannon ___ Python tracker

[issue35200] Make the half-open range behaviour easier to teach

2018-11-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: After more thought, I'm in agreement with the comments that the proposed __str__ revision is confusing. After teaching another Python intro course last week, I'm now thinking that no change should be made. There are other effective ways to teach

[issue35281] Allow access to unittest.TestSuite tests

2018-11-19 Thread Lihu
Change by Lihu : -- nosy: +ezio.melotti, michael.foord, rbcollins ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue35281] Allow access to unittest.TestSuite tests

2018-11-19 Thread Lihu
New submission from Lihu : I would like to have access to the list of tests in a TestSuite object. Currently there are two ways of doing this: I can access the protected attribute `_tests`, or I can iterate over the TestSuite and re-create data that I already have. The former option isn't

[issue35276] Document thread safety

2018-11-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: The general rule in Python is that nothing can be considered atomic unless specifically documented as atomic (such as the queue module or lru_cache which have internal locks). The only safe action is to put locks around all accesses to shared resources.

[issue18859] README.valgrind should mention --with-valgrind

2018-11-19 Thread Sanyam Khurana
Sanyam Khurana added the comment: Patch added in PR: https://github.com/python/cpython/pull/10591 -- nosy: +CuriousLearner ___ Python tracker ___

[issue22121] IDLE should start with HOME as the initial working directory

2018-11-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: ISTM, the start directory needs to be a configuration option. The problem is that most users start IDLE using an icon rather than from the command-line (the latter is already challenging on Windows because they would have to put Python on the PATH just

[issue22121] IDLE should start with HOME as the initial working directory

2018-11-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: Eryk: If one wants a shortcut on the desktop, I believe the one in a directory has to be copied. I was also trying to cover the case where IDLE is installed for all users and a particular user wants a customized shortcut. Steve: Microsoft's effort to keep

[issue35267] reproducible deadlock with multiprocessing.Pool

2018-11-19 Thread Neil Conway
Change by Neil Conway : -- nosy: +nconway ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35274] Running print("\x98") then freeze in Interpreter

2018-11-19 Thread pmpp
pmpp added the comment: anything not using "libvte" is fine i suggest you try "mlterm" a very good multilingual terminal -- ___ Python tracker ___

[issue35274] Running print("\x98") then freeze in Interpreter

2018-11-19 Thread STINNER Victor
STINNER Victor added the comment: I can reproduce the issue on Fedora 29 in gnome-terminal. Python is not blocked at all. It's just your terminal which stops displaying new strings. Try: import time print("\x98") with open("x", "w") as fp: fp.write("done\n") fp.flush() print("wait")

[issue35274] Running print("\x98") then freeze in Interpreter

2018-11-19 Thread pmpp
pmpp added the comment: LC_ALL=en_US.UTF-8 on the ssh line is the culprit unset LC_ALL , gives same lockup result. but: LC_ALL=C give sames results as vnc, where no locale was set. -- ___ Python tracker

[issue35280] Interactive shell overwrites history

2018-11-19 Thread dingens
New submission from dingens : When opening two shells at the same time, history from the one that is closed first gets lost. Steps to reproduce: - let's call the contents of the history before this experiment `z` - open two interactive shells called A and B - execute commands in them, say `a`

[issue35274] Running print("\x98") then freeze in Interpreter

2018-11-19 Thread pmpp
pmpp added the comment: hi i can reproduce with a ubuntu bionic or mint19 client toward a python3.4.3 reached via ssh server: - via mate-terminal or terminator : same behaviour as OP report - meanwhile using the same python3 directly via vnc + xterm gives : pm / # python3 Python

[issue35279] asyncio uses too many threads by default

2018-11-19 Thread Vojtěch Boček
New submission from Vojtěch Boček : By default, asyncio spawns as many as os.cpu_count() * 5 threads to run I/O on. When combined with beefy machines (e.g. kubernetes servers) with, says, 56 cores, it results in very high memory usage. This is amplified by the fact that the

[issue35278] [security] directory traversal in tempfile prefix

2018-11-19 Thread STINNER Victor
Change by STINNER Victor : -- title: directory traversal in tempfile prefix -> [security] directory traversal in tempfile prefix ___ Python tracker ___

[issue35278] directory traversal in tempfile prefix

2018-11-19 Thread STINNER Victor
STINNER Victor added the comment: Ruby handled this issue as a vulnerability: https://www.ruby-lang.org/en/news/2018/03/28/unintentional-file-and-directory-creation-with-directory-traversal-cve-2018-6914/ The doc of "gettempprefix" says "This does not contain the directory component", so it

[issue26660] tempfile.TemporaryDirectory() cleanup exception if nonwriteable or non-searchable files or directories created

2018-11-19 Thread Ryan Zoeller
Change by Ryan Zoeller : -- nosy: +rtzoeller ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35277] Upgrade bundled pip/setuptools

2018-11-19 Thread Donald Stufft
Donald Stufft added the comment: It doesn't bother me if you want to make that change, I don't currently have the time to do it. I just figured I'd throw the update PRs up since I can do it quickly. -- ___ Python tracker

[issue35277] Upgrade bundled pip/setuptools

2018-11-19 Thread miss-islington
Change by miss-islington : -- pull_requests: +9844 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35277] Upgrade bundled pip/setuptools

2018-11-19 Thread miss-islington
Change by miss-islington : -- pull_requests: +9845 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35277] Upgrade bundled pip/setuptools

2018-11-19 Thread miss-islington
Change by miss-islington : -- pull_requests: +9846 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35277] Upgrade bundled pip/setuptools

2018-11-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It would be better to not add the bundle in the git repository, but add an external dependency like for Tcl/Tk on Windows. Every new release of pip+setuptools increases the size of the git repository by around 2 MiB. This will be the fourth update in

[issue35278] directory traversal in tempfile prefix

2018-11-19 Thread Yusuke Endoh
New submission from Yusuke Endoh : Hello, The tempfile library does not check the prefix argument, which can be exploited to create files outside tmpdir by using directory traversal. ``` >>> import tempfile >>> tempfile.gettempprefix() 'tmp' >>> f =

[issue35277] Upgrade bundled pip/setuptools

2018-11-19 Thread Donald Stufft
Change by Donald Stufft : -- keywords: +patch pull_requests: +9843 stage: -> patch review ___ Python tracker ___ ___

[issue35277] Upgrade bundled pip/setuptools

2018-11-19 Thread Donald Stufft
New submission from Donald Stufft : Upgrade the bundled pip/setuptools to the latest version. Making this issue because blurb gets mad at me if I try to add a news entry without a bpo issue. -- assignee: dstufft components: Library (Lib) messages: 330096 nosy: dstufft priority:

[issue35276] Document thread safety

2018-11-19 Thread STINNER Victor
STINNER Victor added the comment: "Proces-wide" vs "thread-safe" is one thing. Another interesting property is "reentrant", but maybe that's too wide? Somehow related, iterating on a container and modify it may or may not work depending on the container type and the kind of modifications.

[issue35275] Reading umask (thread-safe)

2018-11-19 Thread STINNER Victor
STINNER Victor added the comment: Ok, let's move to bpo-35276: "Document thread safety". -- ___ Python tracker ___ ___

[issue35276] Document thread safety

2018-11-19 Thread STINNER Victor
New submission from STINNER Victor : Many developers only discover that a Python function/module is not thread safe because they have a bug in production... Some examples: * bpo-7672: ssl * bpo-8865: select.poll is not thread safe * bpo-539175, bpo-21216: socket.gethostbyname() * bpo-7980:

[issue22121] IDLE should start with HOME as the initial working directory

2018-11-19 Thread Steve Dower
Steve Dower added the comment: I still think the best option is a command line flag like "--open-in-homedir" that causes Idle to do a chdir to the user's documents folder. This way we can put a static option in the start menu item in the installer and not worry about the limitations of MSI,

[issue30082] hide command prompt when using subprocess.Popen with shell=False on Windows

2018-11-19 Thread Steve Dower
Steve Dower added the comment: Looks like it's available. It will be a new subprocess option to not create a new window. The underlying issue is that some applications always request a console, and if your own application doesn't have one then Windows will create it. Normally you would fix

[issue35268] Windows asyncio reading continously stdin and stdout Stockfish

2018-11-19 Thread Steve Dower
Steve Dower added the comment: Are you awaiting those calls (and the write())? I can't tell at first glance whether you need to, but it seems like missing await there would cause your problem. -- ___ Python tracker

[issue8987] Distutils doesn't quote Windows command lines properly

2018-11-19 Thread Steve Dower
Steve Dower added the comment: There's been progress in terms of setuptools eventually adopting distutils, so that looks likely and we're basically planning on it. Adding this as an enhancement to setuptools is going to be a better approach than adding it to distutils in my opinion.

[issue35274] Running print("\x98") then freeze in Interpreter

2018-11-19 Thread otst
otst added the comment: I used GNOME Terminal 3.28.2. I tried advised code Gnome Terminal and LXTerminal 0.3.1. but stop after first time() function. results: 1542621412.508629 (stop. Control+D later)˜ 1542621412.5086305 1542621412.5087285 >>> KeyboardInterrupt >>> Tried change '\x98' to

[issue35275] Reading umask (thread-safe)

2018-11-19 Thread STINNER Victor
STINNER Victor added the comment: My own (incomplete) list of "process-wide states": https://vstinner.readthedocs.io/threads.html#process-wide -- ___ Python tracker ___

[issue35244] Allow to setup Clang as default compiler for modules build

2018-11-19 Thread Steve Dower
Steve Dower added the comment: You might consider adding this support to setuptools rather than CPython. The distutils module is basically closed to non-essential enhancements like this, and will eventually be deprecated for public use (which means totally unused on Windows and only used to

[issue35275] Reading umask (thread-safe)

2018-11-19 Thread STINNER Victor
STINNER Victor added the comment: Maybe the Python documentation can be enhanced to document functions which are known to have a side-effect "process-wide" vs "thread-safe" functions. For example, signal.pthread_sigmark() affects the current thread, wheras locale.setlocale() is

[issue35275] Reading umask (thread-safe)

2018-11-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is no thread way to read the umask in C as well. The os module provides thin wrappers to the POSIX API. os.umask() acts exactly as a C function umask(). If thread safe method be added in the POSIX API we can expose it in the os module. --

[issue35275] Reading umask (thread-safe)

2018-11-19 Thread Thomas Guettler
New submission from Thomas Guettler : Up to now there is no thread way to read the umask in Python https://stackoverflow.com/questions/53227072/reading-umask-thread-safe You can use this pattern: current_umask = os.umask(0) # line1 os.umask(current_umask) # line2 return current_umask

[issue25083] Python can sometimes create incorrect .pyc files

2018-11-19 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> fixed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35200] Make the half-open range behaviour easier to teach

2018-11-19 Thread Steven D'Aprano
Steven D'Aprano added the comment: On Sun, Nov 18, 2018 at 10:27:11PM +, Julien Palard wrote: > > Julien Palard added the comment: > > If I understand correctly, you'd like str(range(10)) to return " [1, 2, ..., 8, 9]>"? Exactly the same as you suggested for repr(range(10)) to return,

[issue35233] _PyMainInterpreterConfig_Copy() doesn't copy install_signal_handlers

2018-11-19 Thread STINNER Victor
STINNER Victor added the comment: New changeset 0e1312c959dcfd0193ed0c7ab3fd45d440da6d78 by Victor Stinner in branch '3.7': bpo-35233: test_embed: fix filesystem encoding (GH-10597) https://github.com/python/cpython/commit/0e1312c959dcfd0193ed0c7ab3fd45d440da6d78 --

[issue35233] _PyMainInterpreterConfig_Copy() doesn't copy install_signal_handlers

2018-11-19 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +9842 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35244] Allow to setup Clang as default compiler for modules build

2018-11-19 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Of course you can, good luck, if you need help ping us. -- ___ Python tracker ___ ___

[issue35244] Allow to setup Clang as default compiler for modules build

2018-11-19 Thread Dong-hee Na
Dong-hee Na added the comment: @matrixise Hi, Stéphane Can I take a look at this issue if no one works on it? I have contributed to CPython, but it seems to be a good opportunity to contribute to a larger module. One more thing, It would be a good guide if you let me know what I should pay

[issue35274] Running print("\x98") then freeze in Interpreter

2018-11-19 Thread Steven D'Aprano
Steven D'Aprano added the comment: I'm afraid I can't reproduce that in Python 3.5.2 or 3.6.4. Can you try this? from time import time print(time(), '\x98', time()); print(time()) and copy and paste the results. What terminal/console are you using? If you change to a different console,

[issue25988] collections.abc.Indexable

2018-11-19 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +9841 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: