[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:

[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.

[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

[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:

[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:

[issue35206] Add new experimental _Py_CAPI2 API

2018-11-09 Thread STINNER Victor
STINNER Victor added the comment: I previously tried a very similar patch but reusing Py_DEBUG define, rather than adding a new _Py_CAPI2 define: bpo-35199. I abandonned it because it was backward incompatible. This change is backward compatible: the new API is not compatible with the

[issue35206] Add a new experimental _Py_CAPI2 API

2018-11-09 Thread STINNER Victor
Change by STINNER Victor : -- title: Add new experimental _Py_CAPI2 API -> Add a new experimental _Py_CAPI2 API ___ Python tracker ___

[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 created bpo-35206 "Add a new experimental _Py_CAPI2 API". -- ___ Python tracker ___ ___

[issue35207] Disallow expressions like (a) = 42

2018-11-09 Thread Guido van Rossum
Guido van Rossum added the comment: I could have sworn Benjamin showed a fix for this during the core-dev sprint in Seattle... -- ___ Python tracker ___

[issue35208] IDLE: Squeezed lines count ignores window width

2018-11-09 Thread Tal Einat
Tal Einat added the comment: See PR GH-10449 with a fix. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[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: I tried playing around with the UTF-8 mode settings but did not get a speed improvement. After reading through the PEP it appears that on Windoes: "To allow for better cross-platform binary portability and to adjust automatically to future changes in locale

[issue35207] Disallow expressions like (a) = 42

2018-11-09 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: +gvanrossum, serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue35207] Disallow expressions like (a) = 42

2018-11-09 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I am not sure if this is the cleanest/simplest implementation...if you think there is a better way to do this I am happy to change the Pull Request :) -- ___ Python tracker

[issue35202] Remove unused imports in standard library

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

[issue35202] Remove unused imports in standard library

2018-11-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 43a74abb3a87092a7fd6c71042eafb977d70d8e0 by Terry Jan Reedy (Srinivas Thatiparthy (శ్రీనివాస్ తాటిపర్తి)) in branch 'master': bpo-35202: Remove unused imports in idlelib (GH-10438)

[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

[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

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

2018-11-09 Thread Windson Yang
Windson Yang added the comment: First, we can add some check at https://github.com/python/cpython/blob/e42b705188271da108de42b55d9344642170aa2b/Lib/http/client.py#L871 and raise an error if the URL contains userinfo part. Second, we should catch some exception in urllib.request.urlopen, if

[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: I tested this at runtime with sys._enablelegacywindowsfsencoding() Also this was new in 3.6 and Py 3.6 does not have the slowdown issue. New in version 3.6: See PEP 529 for more details. -- ___ Python tracker

[issue35202] Remove unused imports in standard library

2018-11-09 Thread miss-islington
miss-islington added the comment: New changeset 2847ccae4687cb43334d87d86fb6c11cb14218f5 by Miss Islington (bot) in branch '3.7': bpo-35202: Remove unused imports in idlelib (GH-10438) https://github.com/python/cpython/commit/2847ccae4687cb43334d87d86fb6c11cb14218f5 -- nosy:

[issue35202] Remove unused imports in standard library

2018-11-09 Thread miss-islington
miss-islington added the comment: New changeset 2903b0fd38a65e16ddafae7754ed5d605fea68ff by Miss Islington (bot) in branch '3.6': bpo-35202: Remove unused imports in idlelib (GH-10438) https://github.com/python/cpython/commit/2903b0fd38a65e16ddafae7754ed5d605fea68ff --

[issue34950] Parse trusted and signature information from X509 certificate

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

[issue35206] Add new experimental _Py_CAPI2 API

2018-11-09 Thread STINNER Victor
New submission from STINNER Victor : Add a new experimental "_Py_CAPI2" API: opt-in which doesn't leak implementation details and replace macros with function calls. Attached PR modified PyTuple_GET_ITEM() if _Py_CAPI2 is defined. With this API, PyTuple_GET_ITEM() macro becomes a function

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

2018-11-09 Thread Windson Yang
Change by Windson Yang : -- versions: +Python 3.5, Python 3.7, Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue35206] Add new experimental _Py_CAPI2 API

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

[issue35206] [WIP] Add a new experimental _Py_CAPI2 API

2018-11-09 Thread STINNER Victor
Change by STINNER Victor : -- title: Add a new experimental _Py_CAPI2 API -> [WIP] Add a new experimental _Py_CAPI2 API ___ Python tracker ___

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

2018-11-09 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +9719 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35207] Disallow expressions like (a) = 42

2018-11-09 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +9718 stage: -> patch review ___ Python tracker ___ ___

[issue35208] IDLE: Squeezed lines count ignores window width

2018-11-09 Thread Tal Einat
Change by Tal Einat : -- keywords: +patch pull_requests: +9724 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list

[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

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

2018-11-09 Thread Eryk Sun
Change by Eryk Sun : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue34949] ntpath.abspath no longer uses normpath

2018-11-09 Thread Eryk Sun
Change by Eryk Sun : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue35194] A typo in a constant in cp932 codec

2018-11-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 0d165262d949440e5aea6533b10e19e4cd5cf12d by Serhiy Storchaka (Alexey Izbyshev) in branch '2.7': [2.7] bpo-35194: Fix a wrong constant in cp932 codec. (GH-10420) (GH-10433)

[issue35208] IDLE: Squeezed lines count ignores window width

2018-11-09 Thread Tal Einat
New submission from Tal Einat : Squeezing a single long line with a newline, e.g. 'a'*200, results in "Squeezed text (1 lines)". Also, changing the width of the window (even to very small widths) doesn't affect the number of lines reported when squeezing (when squeezing *after* the width

[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

[issue34510] add HTTPConnection.settimeout()

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

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

2018-11-09 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Just adding the open issues given Raymond's message for reference. A lot of the IDLE issues have patches and since we moved to GitHub they were not updated. Thanks to Tal for converting some patches togit PRs. I would like to help with minor

[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: I have limited understanding of Windows and I don't have access to a Windows machine to check this out. I am adding Victor who implemented the PEP and might help here. There also seems to be PYTHONLEGACYWINDOWSFSENCODING for windows specific use

[issue35207] Disallow expressions like (a) = 42

2018-11-09 Thread Pablo Galindo Salgado
New submission from Pablo Galindo Salgado : As commented on Issue33878, the fact that expressions like (x) = 42 are accepted is, in reality, an implementation detail and they should be disallowed. -- assignee: pablogsal components: Interpreter Core messages: 329590 nosy: pablogsal

[issue35202] Remove unused imports in standard library

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

[issue35207] Disallow expressions like (a) = 42

2018-11-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Actually, `(a) = 42` doesn't contradict the grammar. assignment_stmt ::= (target_list "=")+ (starred_expression | yield_expression) target_list ::= target ("," target)* [","] target ::= identifier | "(" [target_list] ")"

[issue35202] Remove unused imports in standard library

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

[issue35202] Remove unused imports in standard library

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

[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

[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]

[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

[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

[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

[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

[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

[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

[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

[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. --

[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

[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

[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

[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

[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() :-) >

[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

[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.

[issue35202] Remove unused imports in standard library

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

[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:

[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

[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

[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

[issue35202] Remove unused imports in standard library

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

[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:

[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:

[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 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 (_GET_ITEM(ob, i) causes a compilation error) and so

[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

[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 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

[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 ___ ___

[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:

[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

[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:

[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

[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

[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 ___ ___

[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:

[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 _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. -- ___ Python

[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:

[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

[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

[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 --

[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

[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

[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

[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'. --

[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

[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:

[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)"? -- ___

[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: 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

  1   2   >