[issue34699] allow path-like objects in program arguments in Windows

2018-11-09 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list m

[issue33173] GzipFile's .seekable() returns True even if underlying buffer is not seekable

2018-11-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I share Martin's opinion that this is a misfeature. User code can check seekable() and use seek() if it returns True or cache necessary data in memory if it returns False, because it is expected that seek() is more efficient. But in case of GzipFile it is

[issue33173] GzipFile's .seekable() returns True even if underlying buffer is not seekable

2018-11-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: And I share Martin's concern about fast-forward with an unseekable underlying file. If this works in current code, we can't simply return break it. This may mean that we can't change the implementation of GzipFile.seekable() at all, even if it lies in some

[issue35196] IDLE text squeezer is too aggressive and is slow

2018-11-09 Thread Raymond Hettinger
New submission from Raymond Hettinger : The squeezed text is impairing IDLE's usability for teaching purposes. Typing help() on any built-in type such as str immediately results in a squeeze-button rather than displaying help. The same is true for showing lines from a file read or from a UR

[issue35194] A typo in a constant in cp932 codec

2018-11-09 Thread STINNER Victor
STINNER Victor added the comment: > Maybe add asserts in OUTBYTE1() and similar macros to prevent similar errors > in future? I like the idea. Make sure that: 0 <= ch <= 255? -- ___ Python tracker

[issue35196] IDLE text squeezer is too aggressive and is slow

2018-11-09 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +taleinat ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https

[issue35081] Move internal headers to Include/internal/

2018-11-09 Thread STINNER Victor
STINNER Victor added the comment: New changeset 130893debfd97c70e3a89d9ba49892f53e6b9d79 by Victor Stinner in branch 'master': bpo-35081: Internal headers require Py_BUILD_CORE (GH-10363) https://github.com/python/cpython/commit/130893debfd97c70e3a89d9ba49892f53e6b9d79 -- _

[issue35034] Add closing and iteration to threading.Queue

2018-11-09 Thread Vladimir Filipović
Vladimir Filipović added the comment: Hi Raymond! Thanks for the attention you've given this and for the words of encouragement. I'll try to make something like this for PyPI. I do feel I should critique your metaphor of Queues as email. (Please don't take this as a request to re-evaluate any

[issue33878] Doc: Assignment statement to tuple or list: case missing.

2018-11-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think that the fact that `(a) = 42` is accepted is rather an implementation detail, and the consequence of limitations of the grammar parser. It accepts arbitrary expression at the left hand side of assignment. After transforming CST to AST unsuitable ta

[issue20596] Support for alternate wcstok syntax for Windows compilers

2018-11-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: wcstok_s is an optional part of C11 and can be available in other compilers. http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf#%5B%7B%22num%22%3A1401%2C%22gen%22%3A0%7D%2C%7B%22name%22%3A%22XYZ%22%7D%2C0%2C792%2C0%5D -- versions: +Python 3.8

[issue35196] IDLE text squeezer is too aggressive and is slow

2018-11-09 Thread Tal Einat
Tal Einat added the comment: > The squeezed text is impairing IDLE's usability for teaching purposes. I sincerely hoped it would achieve the opposite! I'm happy to do any work necessary to improve its usability in this context. The auto-squeezing can be "disabled" easily by setting the minim

[issue35194] A typo in a constant in cp932 codec

2018-11-09 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- pull_requests: +9706 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue35194] A typo in a constant in cp932 codec

2018-11-09 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: I've added 'assert' to macros. Since 'typeof' seems to be disallowed in Python, I've used 'unsigned int' as the type of an intermediate variable. Another alternative is 'assert(0 <= (c) && (c) <= 255)', but 'c' will be evaluated several times. --

[issue35194] A typo in a constant in cp932 codec

2018-11-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Converting to unsigned int can unnecessary widen the value or truncate higher bits. On other side, testing "0 <= (c)" can emit a compiler warning if c is unsigned. Maybe test "Py_CHARMASK(c) == (c)"? -- ___ Pyt

[issue35194] A typo in a constant in cp932 codec

2018-11-09 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: > Maybe test "Py_CHARMASK(c) == (c)"? This is a good alternative if multiple evaluation of 'c' is acceptable. Though I'd prefer '(unsigned char)c == c' for this style of fixing because it is bit closer to what happens in '((*outbuf)[i]) = c'. -- _

[issue35197] graminit.h defines very generic names like 'stmt' or 'test'

2018-11-09 Thread STINNER Victor
New submission from STINNER Victor : graminit.h is an header file associating Grammar entities to their values, example: #define stmt 269 Problem: defines symbols have no prefix and cause compilation issues on regular C code depending where graminit.h is included. Example with ast.c: static

[issue35194] A typo in a constant in cp932 codec

2018-11-09 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- pull_requests: +9707 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue35197] graminit.h defines very generic names like 'stmt' or 'test'

2018-11-09 Thread STINNER Victor
STINNER Victor added the comment: > Note: "static const int single_input = 305;" cause a complation error on > "case single_input": "case label does not reduce to an integer constant". Ah! A friend gave me another solution, define an enum. Example: enum { single_input = 256, ... };

[issue35197] graminit.h defines very generic names like 'stmt' or 'test'

2018-11-09 Thread STINNER Victor
STINNER Victor added the comment: Current workaround in ast.c: /* This is done here, so defines like "test" don't interfere with AST use above. */ #include "grammar.h" #include "parsetok.h" #include "graminit.h" This code is in the "middle" of ast.c. --

[issue35194] A typo in a constant in cp932 codec

2018-11-09 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: I've checked than other macros in Modules/cjkcodecs/cjkcodecs.h don't avoid multiple argument evaluation (e.g. OUTCHAR2, _TRYMAP_ENC), so I've changed 'assert' to a variant of what Serhiy suggested. -- ___ Python

[issue35194] A typo in a constant in cp932 codec

2018-11-09 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: OUTCHAR2 is a wrong example. Other examples are NEXT_IN, NEXT_OUT. -- ___ Python tracker ___ ___

[issue35197] graminit.h defines very generic names like 'stmt' or 'test'

2018-11-09 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: +pablogsal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue35198] Build issue while compiling cpp files in AIX

2018-11-09 Thread Ayappan
New submission from Ayappan : I am trying to build pandas-0.23.4 using python3 in AIX. Everything goes fine till it encounters a cpp file. Below is the compile error output. building 'pandas._libs.window' extension gcc -fPIC -maix64 -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -I/u

[issue35199] Convert PyTuple_GET_ITEM() macro to a function call with additional checks in debug mode

2018-11-09 Thread STINNER Victor
New submission from STINNER Victor : Currently, even when Python is compiled in debug mode, PyTuple_GET_ITEM() doesn't check that the first argument is a tuple objet and that the second argument is valid index. It can lead to a crash and Python doesn't help debugging. I propose to convert th

[issue35199] Convert PyTuple_GET_ITEM() macro to a function call with additional checks in debug mode

2018-11-09 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +9708 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-l

[issue35197] graminit.h defines very generic names like 'stmt' or 'test'

2018-11-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think it would be better to exclude graminit.h from the set of distributed headers. It is internal generated file, it should not be used by any user code. Some constants are duplicated as a part of public API in compile.h. -- nosy: +serhiy.storch

[issue35199] Convert PyTuple_GET_ITEM() macro to a function call with additional checks in debug mode

2018-11-09 Thread STINNER Victor
STINNER Victor added the comment: Currently, PyTuple_GET_ITEM() can be used with &PyTuple_GET_ITEM(). If we convert PyTuple_GET_ITEM() to a function returning PyObject*, it's no longer possible. My PR 10434 prepares the code for that. -- ___ Pytho

[issue35197] graminit.h defines very generic names like 'stmt' or 'test'

2018-11-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: graminit.h is included in few files, and not always its inclusion is necessary. Here is a patch that minimizes its inclusion. It is not ready for merging, it is just a demo. -- keywords: +patch Added file: https://bugs.python.org/file47916/include-

[issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions

2018-11-09 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I am collecting information on how different compilers behave with the `static inline`. I am checking the following compilers: ARM GCC AVR GCC CLANG X86_64 CLANG RISC-V ELLCC GCC X86_64 ICC x86_64 MIPS GCC MSP GCC POWERPC GCC AIX Compiler (xlc) SunPro

[issue35197] graminit.h defines very generic names like 'stmt' or 'test'

2018-11-09 Thread STINNER Victor
STINNER Victor added the comment: > I think it would be better to exclude graminit.h from the set of distributed > headers. It is internal generated file, it should not be used by any user > code. I'm fine with moving it to Include/internal/. Do you know if it's used outside CPython? -

[issue35199] Convert PyTuple_GET_ITEM() macro to a function call with additional checks in debug mode

2018-11-09 Thread STINNER Victor
STINNER Victor added the comment: New changeset d17a693fa08ce9f2d35acbb1f76e20bdae3e01da by Victor Stinner in branch 'master': bpo-35199: Add an internal _PyTuple_ITEMS() macro (GH-10434) https://github.com/python/cpython/commit/d17a693fa08ce9f2d35acbb1f76e20bdae3e01da -- _

[issue35199] Convert PyTuple_GET_ITEM() macro to a function call with additional checks in debug mode

2018-11-09 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +9709 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue35199] Convert PyTuple_GET_ITEM() macro to a function call with additional checks in debug mode

2018-11-09 Thread STINNER Victor
STINNER Victor added the comment: Copy of my comment: https://github.com/python/cpython/pull/10435#issuecomment-437405620 This change breaks the backward compatibility when a C extension is compiled with Py_DEBUG. So I'm not sure that it should be merged into Python 3.8. Maybe we should add

[issue35200] Range repr could be better

2018-11-09 Thread Julien Palard
New submission from Julien Palard : This morning I was teaching Python (again and again), and again I was thinking we could do better about the representation of ranges. Typically in the current repr of ranges we do not see that the end is excluded: >>> range(10) range(0, 10) However it has

[issue35200] Range repr could be better

2018-11-09 Thread Julien Palard
Change by Julien Palard : -- keywords: +patch pull_requests: +9710 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-li

[issue35200] Range repr could be better

2018-11-09 Thread Lasne
Lasne added the comment: Sounds like a great idea to me, hence I never really understood how range worked -- nosy: +seluj78 ___ Python tracker ___

[issue35197] graminit.h defines very generic names like 'stmt' or 'test'

2018-11-09 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: >Do you know if it's used outside CPython? Although not a complete view, all of the mentions I can find in GitHub is in copies of CPython/forks/vendoring of Cpython: https://github.com/search?l=C&p=13&q=graminit.h&type=Code -- __

[issue31625] stop using ranlib

2018-11-09 Thread Kevin
Kevin added the comment: AIX supports the -s flag: https://www.ibm.com/support/knowledgecenter/en/ssw_aix_71/com.ibm.aix.cmds1/ar.htm#ar__row-d3e27561 -- nosy: +kadler ___ Python tracker ___

[issue35200] Range repr could be better

2018-11-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: The current repr is awkward for teaching but does have the virtue of being able to round-trip. When that is possible, it is what the language usually chooses. FWIW, you can show ranges with print() and *-unpacking: >>> print(*range(1000, 2000, 100))

[issue35199] Convert PyTuple_GET_ITEM() macro to a function call with additional checks in debug mode

2018-11-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: I don't think this should be merged. A lot of code of uses PyTuple_GET_ITEM(). Also, the "problem" your solving doesn't seem to exist in practice. Further, I worry that a compiler may choose not to inline on occasion, leading to performance regressions

[issue35201] Recursive '**' matches non-existent directories.

2018-11-09 Thread Daniel Israel
New submission from Daniel Israel : In the following case, when there is no file or directory 'a', glob will still return it: >>> glob.glob("a/**", recursive=True) [ 'a/' ] Note that this is inconsistent with the '*' pattern: >>> glob.glob("a/*", recursive=True) [] -- components: Li

[issue35196] IDLE text squeezer is too aggressive and is slow

2018-11-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: > The auto-squeezing can be "disabled" easily by setting > the minimum # lines to a high number in the config dialog. When I teach Python, it is unreasonable to have to have every learner reconfigure IDLE away from usable defaults. The squeezing is some

[issue35201] Recursive '**' matches non-existent directories.

2018-11-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is expected behavior, and it matches the behavior of Bash. $ mkdir empty $ shopt -s globstar failglob $ echo empty/* bash: no match: empty/* $ echo empty/** empty/ "**" matches zero or more path components. In this case case it matches zero. -

[issue35200] Range repr could be better

2018-11-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Or just >>> *range(1000, 2000, 100), (1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900) -- nosy: +serhiy.storchaka ___ Python tracker __

[issue35197] graminit.h defines very generic names like 'stmt' or 'test'

2018-11-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It can be used by the code that works directly with CST instead of AST: these constants are used as values of the n_type field of the node structure. -- ___ Python tracker __

[issue35200] Range repr could be better

2018-11-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If possible, I prefer to get the repr in the form of Python expression rather of cryptic angled form. The former is often shorter, that is important if it is a part of the repr of more complex object. You can just copy, paste and edit it. -- _

[issue35196] IDLE text squeezer is too aggressive and is slow

2018-11-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: * Squeezing doesn't triggered by outputting a lot of short lines. * If you write to stdout by small chunks, it adds a large overhead to every write() call. -- nosy: +serhiy.storchaka ___ Python tracker

[issue35193] Off by one error in peephole call to find_op on case RETURN_VALUE

2018-11-09 Thread Gregory P. Smith
Gregory P. Smith added the comment: I'm working on getting a memory-sanitizer buildbot setup. I'm so happy it made finding and debugging this relatively easy. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Pyth

[issue35195] Pandas read_csv() is 3.5X Slower on Python 3.7.1 vs Python 3.6.7 & 3.5.2 On Windows 10

2018-11-09 Thread Dragoljub
Dragoljub added the comment: After some more benchmarks I'm seeing this line of code called in Python 3.7 but not in Python 3.5: {built-in method _thread.allocate_lock} -- ___ Python tracker __

[issue35196] IDLE text squeezer is too aggressive and is slow

2018-11-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: [I wrote the following after Tal's first response, before reading Raymond's second post in response to Tal.] The October releases were deficient in only documenting Squeezer in the IDLE section of "What's New in Python X.Y" and a News entry (copied to Help =>

[issue35198] Build issue while compiling cpp files in AIX

2018-11-09 Thread Kevin
Change by Kevin : -- keywords: +patch pull_requests: +9711 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list maili

[issue20596] Support for alternate wcstok syntax for Windows compilers

2018-11-09 Thread Erik Janssens
Erik Janssens added the comment: @serhiy.storchaka Are you suggesting the discrimination should be based on compiler specific defines, or rather that it should go through configuration (a HAVE_WCSTOK_S pyconfig.h) ? -- ___ Python tracker

[issue34373] test_time errors on AIX

2018-11-09 Thread Kevin
Change by Kevin : -- nosy: +kadler ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/ma

[issue35198] Build issue while compiling cpp files in AIX

2018-11-09 Thread Ned Deily
Change by Ned Deily : -- nosy: +David.Edelsohn, Michael.Felt ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35202] Remove unused imports in standard library

2018-11-09 Thread శ్రీనివాస్ రెడ్డి తాటిపర్తి
New submission from Srinivas Reddy Thatiparthy(శ్రీనివాస్ రెడ్డి తాటిపర్తి) : Please find the modules where we need to remove. codecs.py:1105:5: F401 'encodings' imported but unused code.py:298:13: F401 'readline' imported but unused platform.py:118:1: F401 'warnings' imported but unused plat

[issue35202] Remove unused imports in standard library

2018-11-09 Thread శ్రీనివాస్ రెడ్డి తాటిపర్తి
Change by Srinivas Reddy Thatiparthy(శ్రీనివాస్ రెడ్డి తాటిపర్తి) : -- keywords: +patch pull_requests: +9712 stage: -> patch review ___ Python tracker ___ ___

[issue34628] urllib.request.urlopen fails when userinfo is present in URL

2018-11-09 Thread Niklas Sombert
Niklas Sombert added the comment: Another month has passed, just saying. -- ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue35203] Windows Installer Ignores Launcher Installer Options Where The Python Launcher Is Already Present

2018-11-09 Thread Dexter
New submission from Dexter : When installing Python 3.7 from the Windows Installer in a restricted environment the installer appears to ignore the InstallLauncherAllUsers=0 and Include_launcher=0 flags if the launcher is already present from a previous install. I am on a machine where the sy

[issue32485] Multiprocessing dict sharing between forked processes

2018-11-09 Thread Ned Deily
Change by Ned Deily : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.or

[issue20596] Support for alternate wcstok syntax for Windows compilers

2018-11-09 Thread Jeffrey Armstrong
Change by Jeffrey Armstrong : -- nosy: -Jeffrey.Armstrong ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue32281] bdist_rpm v.s. the Macintosh

2018-11-09 Thread Ned Deily
Ned Deily added the comment: Rather than searching a few hard-coded paths, I would think this would be a good case for using distutils.spawn find_executable like test_bdist_rpm.py does :) If someone (@bhyde) were willing to create a PR with that change, this issue will have a much better ch

[issue32281] bdist_rpm fails if no rpm command and rpmbuild is not in /usr/bin or /bin

2018-11-09 Thread Ned Deily
Change by Ned Deily : -- keywords: +easy stage: -> needs patch title: bdist_rpm v.s. the Macintosh -> bdist_rpm fails if no rpm command and rpmbuild is not in /usr/bin or /bin versions: +Python 3.8 -Python 2.7 ___ Python tracker

[issue35202] Remove unused imports in standard library

2018-11-09 Thread శ్రీనివాస్ రెడ్డి తాటిపర్తి
Change by Srinivas Reddy Thatiparthy(శ్రీనివాస్ రెడ్డి తాటిపర్తి) : -- pull_requests: -9712 ___ Python tracker ___ ___ Python-bugs

[issue32485] Multiprocessing dict sharing between forked processes

2018-11-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: Gus, dict don't have a has_key() method in Python 3. multiprocessing objects are generally not fork-safe: multiprocessing has its own mechanisms to duplicate objects between processes, but you cannot assume that after calling fork() yourself, objects will st

[issue35202] Remove unused imports in standard library

2018-11-09 Thread శ్రీనివాస్ రెడ్డి తాటిపర్తి
Srinivas Reddy Thatiparthy(శ్రీనివాస్ రెడ్డి తాటిపర్తి) added the comment: I have raised a partial PR here - https://github.com/python/cpython/pull/10438; if it is merged please take up the rest of the changes mentioned in the issue description. -- __

[issue33878] Doc: Assignment statement to tuple or list: case missing.

2018-11-09 Thread Guido van Rossum
Guido van Rossum added the comment: I would like to see this fixed. On Fri, Nov 9, 2018 at 4:27 AM Serhiy Storchaka wrote: > > Serhiy Storchaka added the comment: > > I think that the fact that `(a) = 42` is accepted is rather an > implementation detail, and the consequence of limitations o

[issue35203] Windows Installer Ignores Launcher Installer Options Where The Python Launcher Is Already Present

2018-11-09 Thread Max Bowsher
Change by Max Bowsher : -- nosy: +Max Bowsher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue35196] IDLE text squeezer is too aggressive and is slow

2018-11-09 Thread Tal Einat
Tal Einat added the comment: > If you write to stdout by small chunks, it adds a large overhead to every > write() call. While I agree that there is great room for optimization in Squeezer's interception of write(), it doesn't appear to have a noticeable effect in such cases, e.g. in the ex

[issue22393] multiprocessing.Pool shouldn't hang forever if a worker process dies unexpectedly

2018-11-09 Thread Oscar Esteban
Change by Oscar Esteban : -- pull_requests: +9713 stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bugs-list mai

[issue35196] IDLE text squeezer is too aggressive and is slow

2018-11-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: On my machine, 2.7.15 (without squeezing) and 3.7.1 (with squeezing) IDLE results (average seconds). from timeit import timeit timeit("print('nnn '*500)", number=10) # Exp1: .0357, .0355 timeit("for i in range(500): print(i)", number=4) # Exp2: 1.45, 1.70 t

[issue35196] IDLE text squeezer is too aggressive and is slow

2018-11-09 Thread Tal Einat
Tal Einat added the comment: > Serhiy's first comment is about 500 very short lines (experiment 2) not being > squeezed. This surprised me. Tal? Indeed, this is not currently supported. This is possible, it would just complicate the write() interceptor and require the new ability to updat

[issue35196] IDLE text squeezer is too aggressive and is slow

2018-11-09 Thread Tal Einat
Tal Einat added the comment: > On my machine, 2.7.15 (without squeezing) and 3.7.1 (with squeezing) IDLE > results (average seconds). > > from timeit import timeit > timeit("print('nnn '*500)", number=10) # Exp1: .0357, .0355 > timeit("for i in range(500): print(i)", number=4) # Exp2: 1.45,

[issue35196] IDLE text squeezer is too aggressive and is slow

2018-11-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Adding to what Tal said: IDLE's calltips replace some uses > of help() in standard interactive Python. For the rest, I > think being able to move hundreds of lines out of the > REPL and into a separate persistent window, which that can > be moved at l

[issue35196] IDLE text squeezer is too aggressive and is slow

2018-11-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: * In the File Save dialog, the suggested filename should be "untitled.py" rather than "Untitled.py". This would reflect our modern module naming conventions. Ideally, it should warn against unimportable names like "Intro Lesson -- Wednesday.py" * For M

[issue35204] Disable thread and memory sanitizers for address_in_range()

2018-11-09 Thread Alexey Izbyshev
New submission from Alexey Izbyshev : address_in_range() in Objects/obmalloc.c may access memory that is mapped but is considered free by the underlying libc allocator. In #18596, address sanitizing was disabled for this function. But thread and memory sanitizers similarly trip on this functi

[issue35204] Disable thread and memory sanitizers for address_in_range()

2018-11-09 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- keywords: +patch pull_requests: +9714 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-

[issue35204] Disable thread and memory sanitizers for address_in_range()

2018-11-09 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: I've submitted a PR which implements the change with additional cleanups. GCC introduced TSan together with ASan in 4.8[1], but didn't provide a macro to test for -fsanitize=thread option until 7[2,3]. [1] https://gcc.gnu.org/gcc-4.8/changes.html [2] https

[issue35202] Remove unused imports in standard library

2018-11-09 Thread Eric V. Smith
Eric V. Smith added the comment: I think we can remove these in 3.8. My understanding of the policy (which I cannot find: the search terms are too generic) is that if a module defines __all__, and the symbol we want to remove isn't in it, then we can remove the symbol in the next feature rel

[issue35202] Remove unused imports in standard library

2018-11-09 Thread Eric V. Smith
Eric V. Smith added the comment: Let me restate that: I think we can remove these in 3.8 if they're not in the module's __all__. I haven't checked that, although it would surprise me if any of them were in __all__. -- ___ Python tracker

[issue35200] Range repr could be better

2018-11-09 Thread Steven D'Aprano
Steven D'Aprano added the comment: Not everyone knows the '...' convention. At least according to Google's predictive search, if I type "what does three dots" I get common searches such as "what does three dots mean at the end of a sentence" and similar. How does your proposed repr look for

[issue35200] Range repr could be better

2018-11-09 Thread Jules Lasne
Jules Lasne added the comment: As you can see in his PR (https://github.com/python/cpython/pull/10436), he added multiple display types based on the size of the range. This is easily represented in the dumb_range_repr function: https://github.com/python/cpython/pull/10436/files#diff-95a46658

[issue35202] Remove unused imports in standard library

2018-11-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: There's a few that should be discussed with the module maintainers first. A patch for IDLE should go through Terry Reedy. The "java.lang" in platform isn't a normal import and may have something to do with Jython. The "abc" in typing.py might be there

[issue35200] Range repr could be better

2018-11-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: One other thought, since the current repr round-trips, it can be eval'd. So changing it might break some code. -- ___ Python tracker ___

[issue35200] Range repr could be better

2018-11-09 Thread Steven D'Aprano
Steven D'Aprano added the comment: With the proposed design, any two empty range objects have the same repr: repr(range(0)) == repr(range(2, 2)) == repr(range(1, 5, -1)) etc. Between this loss of information, and the loss of round-tripping through eval, I'm against this proposal. But I'd per

[issue35202] Remove unused imports in standard library

2018-11-09 Thread శ్రీనివాస్ రెడ్డి తాటిపర్తి
Change by Srinivas Reddy Thatiparthy(శ్రీనివాస్ రెడ్డి తాటిపర్తి) : -- pull_requests: +9715 ___ Python tracker ___ ___ Python-bugs-

[issue35199] Convert PyTuple_GET_ITEM() macro to a function call with additional checks in debug mode

2018-11-09 Thread STINNER Victor
STINNER Victor added the comment: > I don't think this should be merged. A lot of code of uses > PyTuple_GET_ITEM(). Also, the "problem" your solving doesn't seem to exist in > practice. Sorry my comment on the PR, a friend contacted me because (...) he misused PyTuple_GET_ITEM() :-) > Fu

[issue35197] graminit.h defines very generic names like 'stmt' or 'test'

2018-11-09 Thread STINNER Victor
STINNER Victor added the comment: > It can be used by the code that works directly with CST instead of AST: (...) Sorry, I don't know this part of CPython. Is the CST exposed in any way outside CPython internals? If no, I see no reason to expose graminit.h in the public C API. -- _

[issue35199] Convert PyTuple_GET_ITEM() macro to a function call with additional checks in debug mode

2018-11-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks. I don't really know enough about compilers and required-vs-optional C99 semantics to know whether these changes are safe. These are very old APIs and are used throughout the entire Python ecosystem. It would pay to be somewhat cautious. The

[issue35195] Pandas read_csv() is 3.5X Slower on Python 3.7.1 vs Python 3.6.7 & 3.5.2 On Windows 10

2018-11-09 Thread Dragoljub
Dragoljub added the comment: After some more digging it appears that we see the 3.5x slowdown manifest in Python 3.7.0a4 and is not present in Python 3.7.0a3. One guess is that https://docs.python.org/3.7/whatsnew/changelog.html#python-3-7-0-alpha-4 bpo-29240: Add a new UTF-8 mode: impleme

[issue35205] os.path.realpath preserves the trailing backslash on Windows in python 3.6.7 and python 3.7.1

2018-11-09 Thread wenjun.o
New submission from wenjun.o : The statement "os.path.realpath('C:\\Users\\')" returns different results between 3.6.6 and 3.6.7 (and between 3.7.0 and 3.7.1) on Windows. With python 3.6.6 and 3.7.0 I got 'C:\\Users'. With python 3.6.7 and 3.7.1 I got 'C:\\Users\\'. Note the extra trailing back

[issue35195] Pandas read_csv() is 3.5X Slower on Python 3.7.1 vs Python 3.6.7 & 3.5.2 On Windows 10

2018-11-09 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: >From the PEP 540 This mode is off by default, but is automatically activated when using the "POSIX" locale. Add the -X utf8 command line option and PYTHONUTF8 environment variable to control UTF-8 Mode. https://docs.python.org/3.7/using/cmdline.

[issue35192] pathlib mkdir throws FileExistsError when not supposed to

2018-11-09 Thread Adam Dunlap
Adam Dunlap added the comment: Thank your for your response. I'm running python 3.5.2. The linked issue is indeed a duplicate of this one. To reproduce, you can run two instances of the attached script at the same time, i.e. python3 pymkdir.py & python3 pymkdir.py. It is a race condition so

[issue35199] Convert PyTuple_GET_ITEM() macro to a function call with additional checks in debug mode

2018-11-09 Thread STINNER Victor
STINNER Victor added the comment: Oops, I forgot to close the issue. This change was an early attempt (tagged as WIP/DO-NOT-MERGE) to expriment changing the implementation without touching the API. But I was wrong, it does change the API (&PyTuple_GET_ITEM(ob, i) causes a compilation error)

[issue35192] pathlib mkdir throws FileExistsError when not supposed to

2018-11-09 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: > Thank your for your response. I'm running python 3.5.2. The linked issue is > indeed a duplicate of this one. Thanks for the confirmation and script. > I'm running Ubuntu 16.04.5 LTS. I don't know if you know anything about > Ubuntu's release pr

[issue35196] IDLE text squeezer is too aggressive and is slow

2018-11-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: * One other thing that would be useful is to have a way to configure the startup directory from within IDLE; otherwise, users generally need to load IDLE from the command-line in order to control the startup directory. * The TurtleDemo launches correctly

[issue35196] IDLE text squeezer is too aggressive and is slow

2018-11-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: * Another open feature request is to have tab completion on dict keys. * We've had f-strings for a while now -- they would benefit greatly from syntax highlighting. * FWIW, I disagree with the notion that it is okay to cripple help() since we have toolti

[issue35205] os.path.realpath preserves the trailing backslash on Windows in python 3.6.7 and python 3.7.1

2018-11-09 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: realpath aliases to abspath in Windows as I can see from the code and I think this is a regression fixed with https://github.com/python/cpython/pull/10082 -- nosy: +xtreak ___ Python tracker

[issue34949] ntpath.abspath no longer uses normpath

2018-11-09 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Thanks for the report. I think this was a regression reported in https://bugs.python.org/issue31047#msg328322 and was fixed with https://github.com/python/cpython/pull/10082 . I think the regression was in 3.7.1 but the fix was made a little later

[issue35202] Remove unused imports in standard library

2018-11-09 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue35120] SSH tunnel support to ftp lib

2018-11-09 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- nosy: +remi.lapeyre ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

  1   2   >