[issue28491] Remove bundled libffi for OSX

2017-03-15 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: Update: my pull request at https://github.com/libffi/libffi/pull/288 is merged. Future libffi releases don't need pkg-config anymore. However, I guess the system copy won't be updated in near future. -- ___ Python

[issue29823] mimetypes guesses XSL mimetype when passed an XML file

2017-03-15 Thread Martin Panter
Martin Panter added the comment: Perhaps a duplicate of Issue 1043134? -- nosy: +martin.panter superseder: -> Add preferred extensions for MIME types versions: -Python 3.3, Python 3.4 ___ Python tracker

[issue29823] mimetypes guesses XSL mimetype when passed an XML file

2017-03-15 Thread Aleksey Bilogur
Changes by Aleksey Bilogur : -- title: ython guesses XSL mimetype when passed an XML file -> mimetypes guesses XSL mimetype when passed an XML file ___ Python tracker

[issue29823] ython guesses XSL mimetype when passed an XML file

2017-03-15 Thread Aleksey Bilogur
New submission from Aleksey Bilogur: Copied over from an unanswered StackOverflow thread (http://stackoverflow.com/questions/42542433/why-does-python-mimetype-guess-xsl-when-passed-an-xml-file): When passed a file with a mimetype application/xml, the Python std lib mimetypes.guess_extension

[issue29812] test for token.py, and consistency tests for tokenize.py

2017-03-15 Thread R. David Murray
R. David Murray added the comment: The cross check test itself doesn't depend on a regeneration, but it does depend on the information in token.h. Meanwhile the validity of *that* is checked by regeneration in your test_token tests. This is exactly what I had in mind :). So, I haven't done

[issue29813] PyTuple_GetSlice does not always return a new tuple

2017-03-15 Thread Michael Seifert
Michael Seifert added the comment: I rather thought about something along the lines of: "Take a slice of the tuple pointed to by *p* from *low* to *high* and return it as a tuple. Whether the returned tuple is new or not is an implementation detail (and may depend on the value of the

[issue29812] test for token.py, and consistency tests for tokenize.py

2017-03-15 Thread Ammar Askar
Ammar Askar added the comment: This is my first real substantial testing change so I'd appreciate all feedback. The way I did the cross-check doesn't actually rely on any of the information from the test_keyword style regeneration test. I think this approach is a lot simpler, and will

[issue29812] test for token.py, and consistency tests for tokenize.py

2017-03-15 Thread Ammar Askar
Changes by Ammar Askar : -- pull_requests: +558 ___ Python tracker ___ ___

[issue29639] test suite intentionally avoids referring to localhost, destroying abstraction away from IPv6 vs IPv4

2017-03-15 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- assignee: -> gregory.p.smith ___ Python tracker ___ ___

[issue29821] importing module shutil executes file 'copy.py'

2017-03-15 Thread Eryk Sun
Eryk Sun added the comment: > Run "python3 -I script.py" to not insert '' (current directory) > at the first position of sys.path. That should be "script directory", not "current directory". We only add the current directory to sys.path in interactive mode, and for -c and -m. Adding the

[issue29821] importing module shutil executes file 'copy.py'

2017-03-15 Thread STINNER Victor
STINNER Victor added the comment: Run "python3 -I script.py" to not insert '' (current directory) at the first position of sys.path. https://docs.python.org/dev/using/cmdline.html#cmdoption-I -- nosy: +haypo ___ Python tracker

[issue29821] importing module shutil executes file 'copy.py'

2017-03-15 Thread Ammar Askar
Ammar Askar added the comment: As per discussion with haypo on irc, this is not a bug since essentially you've made a file which shadows the following stdlib module https://docs.python.org/3/library/copy.html When shutil goes to import the copy module, your copy module is given higher

[issue29816] Get rid of C limitation for shift count in right shift

2017-03-15 Thread Oren Milman
Oren Milman added the comment: i played a little with a patch earlier today, but stopped because I am short on time. anyway, just in case my code is not totally rubbish, I attach my patch draft, which should avoid OverflowError also for big positive ints. (of course, I don't suggest to use my

[issue29821] importing module shutil executes file 'copy.py'

2017-03-15 Thread Ammar Askar
Ammar Askar added the comment: I was only able to recreate this under 3.4 and 3.3, and both of them are under "security" status on https://docs.python.org/devguide/#status-of-python-branches Should this be marked as won't fix? -- nosy: +ammar2 versions: +Python 3.3, Python 3.4 -Python

[issue27400] Datetime NoneType after calling Py_Finalize and Py_Initialize

2017-03-15 Thread Nathan Jensen
Changes by Nathan Jensen : -- nosy: +Nathan Jensen ___ Python tracker ___ ___

[issue15988] Inconsistency in overflow error messages of integer argument

2017-03-15 Thread Oren Milman
Oren Milman added the comment: I am sorry, but my 2nd term starts on Monday, so I am short on time, and feel like I would be lucky to even finish working on PR 668. because of that, and because you obviously have a much better understanding of this issue than me, I would be happy if you could

[issue29104] Left bracket remains in format string result when '\' preceeds it

2017-03-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Ryan. I already created a PR, but I think your recipe can be helpful for me in future. -- ___ Python tracker

[issue15988] Inconsistency in overflow error messages of integer argument

2017-03-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I agree. It would be better to remove from the PR changes that can be covered by issue29816, issue29819 and other changes that changes visible behavior and open one or several new issues for them. Maybe one meta-issue and few concrete issues? Such methods

[issue29816] Get rid of C limitation for shift count in right shift

2017-03-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Unfortunately it is hard to totally avoid OverflowError in right shift. Righ shift of huge positive value can get non-zero result even if shift count is larger than PY_SSIZE_T_MAX. PR 680 just decreases the opportunity of getting a OverflowError.

[issue15988] Inconsistency in overflow error messages of integer argument

2017-03-15 Thread Oren Milman
Oren Milman added the comment: also, IMHO, we should open an issue named 'raise ValueError instead of OverflowError when a negative int is invalid', and leave for that new issue some the changes (which you commented about in the PR). I didn't want to open it without your approval. here is what

[issue29816] Get rid of C limitation for shift count in right shift

2017-03-15 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +557 ___ Python tracker ___ ___

[issue29104] Left bracket remains in format string result when '\' preceeds it

2017-03-15 Thread Jim Fasarakis-Hilliard
Jim Fasarakis-Hilliard added the comment: A PR has been submitted, Ryan. See https://github.com/python/cpython/pull/490 -- ___ Python tracker ___

[issue29104] Left bracket remains in format string result when '\' preceeds it

2017-03-15 Thread Ryan Gonzalez
Ryan Gonzalez added the comment: Serhiy: if you want, you can give me your email and I'll submit a PR for you. If you want to do it yourself, just: Download hub: https://hub.github.com/ git clone python/cpython cpython-git cd cpython-git git fork curl

[issue29805] Pathlib.replace cannot move file to a different drive on Windows if filename different

2017-03-15 Thread Brett Cannon
Brett Cannon added the comment: I should also mention that rename() (https://docs.python.org/3/library/pathlib.html#pathlib.Path.rename) and replace() (https://docs.python.org/3/library/pathlib.html#pathlib.Path.replace) already do exist, so it might be best to add a keyword-only flag to one

[issue29805] Pathlib.replace cannot move file to a different drive on Windows if filename different

2017-03-15 Thread Brett Cannon
Brett Cannon added the comment: I also support the idea of getting something like shutil.move() into pathlib. -- ___ Python tracker ___

[issue29822] inspect.isabstract does not work on abstract base classes during __init_subclass__

2017-03-15 Thread Nate Soares
Changes by Nate Soares : -- pull_requests: +556 ___ Python tracker ___ ___ Python-bugs-list

[issue18716] Deprecate the formatter module

2017-03-15 Thread Brett Cannon
Brett Cannon added the comment: Yes, the code won't be deleted until we're in a post-2.7 world. -- ___ Python tracker ___

[issue24119] Carry comments with the AST

2017-03-15 Thread Brett Cannon
Brett Cannon added the comment: The type annotation is already in the AST so there's nothing to carry over from typed_ast (we only care about the latest Python version while typed_ast tries to be version-agnostic). -- ___ Python tracker

[issue15988] Inconsistency in overflow error messages of integer argument

2017-03-15 Thread Oren Milman
Oren Milman added the comment: now that you opened #29816 and #29819, should I remove from the PR changes in the following functions, and related tests? - _io_BytesIO_truncate_impl - _io_StringIO_truncate_impl - long_rshift - long_lshift -- ___

[issue25478] Consider adding a normalize() method to collections.Counter()

2017-03-15 Thread Steven D'Aprano
Steven D'Aprano added the comment: It seems to me that the basic Counter class should be left as-is, and if there are specialized methods used for statistics (such as normalize) it should go into a subclass in the statistics module. The statistics module already uses Counter internally to

[issue29822] inspect.isabstract does not work on abstract base classes during __init_subclass__

2017-03-15 Thread Nate Soares
New submission from Nate Soares: Here's an example test that fails: def test_isabstract_during_init_subclass(self): from abc import ABCMeta, abstractmethod isabstract_checks = [] class AbstractChecker(metaclass=ABCMeta): def __init_subclass__(cls):

[issue29821] importing module shutil executes file 'copy.py'

2017-03-15 Thread Oliver Etchebarne (drmad)
New submission from Oliver Etchebarne (drmad): I didn't research this issue further. Create a file 'test.py', and write only 'import shutil'. Then create a file 'copy.py' in the same directory, and write something inside, like 'print ("OH NO")'. When you run test.py, 'copy.py' is executed,

[issue29820] Broken link to "GUI Programming with Python: QT Edition" book

2017-03-15 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Maybe instead of referencing to the books, we add reference to the wiki https://wiki.python.org/moin/PyQt -- nosy: +Mariatta versions: -Python 3.3, Python 3.4 ___ Python tracker

[issue15988] Inconsistency in overflow error messages of integer argument

2017-03-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think that raising OverflowError exceptions should be avoided if this is possible. If some function requires non-negative integer and raises ValueError for small negative integers and OverflowError for large negative integers, it is desirable to make it

[issue29820] Broken link to "GUI Programming with Python: QT Edition" book

2017-03-15 Thread Marco Buttu
New submission from Marco Buttu: In [*] the link to "GUI Programming with Python: QT Edition by Boudewijn Rempt", does not work. I did not find an official web page for this book, but it is really outdated (2002), so maybe we can take only the reference to the Mark Summerfield's book, about

[issue29819] Avoid raising OverflowError in truncate() if possible

2017-03-15 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___

[issue29819] Avoid raising OverflowError in truncate() if possible

2017-03-15 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +Oren Milman ___ Python tracker ___ ___

[issue29819] Avoid raising OverflowError in truncate() if possible

2017-03-15 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: os.truncate(), os.ftruncate() and truncate() methods of file-like objects raise OverflowError when the argument is out of ranger of certain C type. It would be better to extend the behavior of small integers to large integers. ValueError is raised for

[issue29817] File IO r+ read, write, read causes garbage data write.

2017-03-15 Thread Paul Moore
Changes by Paul Moore : -- stage: -> resolved status: open -> closed ___ Python tracker ___

[issue29817] File IO r+ read, write, read causes garbage data write.

2017-03-15 Thread Paul Moore
Paul Moore added the comment: Also, this is a Python 2 only issue. The problem doesn't happen in Python 3.6 (at least in my quick experiment). I'm not 100% sure if this is because the internal implementation of IO changed in 3.x, or if it's just because we're now using a newer CRT which has

[issue29817] File IO r+ read, write, read causes garbage data write.

2017-03-15 Thread Eryk Sun
Eryk Sun added the comment: This is a bug in the C runtime's handling of "r+" mode with buffering. The CRT FILE stream's internal _cnt field, from the POV of the write() call, is the number of bytes that can be written to the internal buffer before it's full. The default buffer size is 4096

[issue29804] test_ctypes test_pass_by_value fails on arm64 (aarch64) architecture

2017-03-15 Thread Vinay Sajip
Changes by Vinay Sajip : -- nosy: +ned.deily ___ Python tracker ___ ___

[issue29804] test_ctypes test_pass_by_value fails on arm64 (aarch64) architecture

2017-03-15 Thread Vinay Sajip
Vinay Sajip added the comment: I don't think it's a regression. It's catching an error that was there, but wasn't tested for before. If it should be a release blocker - that should not be for any reversion of the change to the test, but for implementing the pass-by-value functionality

[issue28261] wrong error messages when using PyArg_ParseTuple to parse normal tuples

2017-03-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I suggest to withdraw changes in itertoolsmodule.c and avoid using "dunder" names like __setstate__ and __new__ in error messages. -- ___ Python tracker

[issue28261] wrong error messages when using PyArg_ParseTuple to parse normal tuples

2017-03-15 Thread Oren Milman
Oren Milman added the comment: Raymond? any suggestions for how to make the code less ugly? or do you have in mind a different approach for solving this issue? -- ___ Python tracker

[issue28230] tarfile does not support pathlib

2017-03-15 Thread Berker Peksag
Berker Peksag added the comment: PR 512 has been merged and backported to 3.6 branch. I think this can be closed now. Thanks, Ethan and Serhiy! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue29804] test_ctypes test_pass_by_value fails on arm64 (aarch64) architecture

2017-03-15 Thread Charalampos Stratakis
Charalampos Stratakis added the comment: Since this newly added assertion [0] fails for aarch64 shouldn't this be considered a regression? And taking into account the timeframe, a release blocker for 3.6.1? -- nosy: +cstratak ___ Python tracker

[issue29804] test_ctypes test_pass_by_value fails on arm64 (aarch64) architecture

2017-03-15 Thread Charalampos Stratakis
Charalampos Stratakis added the comment: [0] https://github.com/python/cpython/commit/a86339b83fbd0932e0529a3c91935e997a234582#diff-39e8978a35ab16f78e60027c61b810f7R413 -- ___ Python tracker

[issue29818] Py_SetStandardStreamEncoding leads to a memory error in debug mode

2017-03-15 Thread Nick Coghlan
Changes by Nick Coghlan : -- versions: +Python 3.6, Python 3.7 ___ Python tracker ___ ___

[issue29818] Py_SetStandardStreamEncoding leads to a memory error in debug mode

2017-03-15 Thread Nick Coghlan
New submission from Nick Coghlan: For PEP 538, setting PYTHONIOENCODING turned out to have undesirable side effects on Python 2 instances in subprocesses, since Python 2 has no 'surrogateescape' error handler. So I switched to using the "Py_SetStandardStreamEncoding" API defined in

[issue29726] test_xmlrpc raises DeprecationWarnings

2017-03-15 Thread Berker Peksag
Berker Peksag added the comment: Thanks, Dillon! I went ahead and backported PR 481 to 3.5 and 3.6 branches. -- nosy: +berker.peksag resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue29196] Remove old-deprecated plistlib features

2017-03-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: These classes was deprecated in 2.4. In 2.6 the plistlib module was moved from plat-mac to the general stdlib library. -- ___ Python tracker

[issue29655] Certain errors during IMPORT_STAR can leak a reference

2017-03-15 Thread Berker Peksag
Changes by Berker Peksag : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue29815] Fail at divide a negative integer number for a positive integer number

2017-03-15 Thread Eryk Sun
Eryk Sun added the comment: > -7 divided by 2 is -3, not -4 Integer division in Python is floor division, and it's self-consistent with the implementation of the modulo operation such that the following identity is satisfied: (a % n) == a - n * (a // n). For example: (-7 % 2) == -7 - 2

[issue19264] subprocess.Popen doesn't support unicode on Windows

2017-03-15 Thread Valentin LAB
Valentin LAB added the comment: For eventual other people wanting a workaround, this is the code I used to leverage ``ctypes`` and redo what last python 3 code is doing. Any comment are welcome, this is my first go at ``ctypes``. I didn't extensively tested the code... so use at your own

[issue4851] xml.dom.minidom.Element.cloneNode fails with AttributeError

2017-03-15 Thread Berker Peksag
Berker Peksag added the comment: Thanks for your detective work, Craig. MvL is correct that those classes should be created via a Document object. I'm marking issue 15290 as a duplicate of this. Note that we can reopen this if you'd like to propose a documentation patch or PR to make the

[issue15290] setAttribute() can fail

2017-03-15 Thread Berker Peksag
Changes by Berker Peksag : -- resolution: not a bug -> duplicate stage: patch review -> resolved superseder: -> xml.dom.minidom.Element.cloneNode fails with AttributeError ___ Python tracker

[issue29816] Get rid of C limitation for shift count in right shift

2017-03-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is not MemoryError. On 32-bit platform `1 << (sys.maxsize + 1)` raises an OverflowError, but `1 << sys.maxsize << 1` can be calculated. -- ___ Python tracker

[issue18716] Deprecate the formatter module

2017-03-15 Thread Jim Fasarakis-Hilliard
Jim Fasarakis-Hilliard added the comment: Just bumped into this. Is the removal for this module waiting for the end of Python 2.7 support as PEP 4 states for modules in Py2 and Py3? The first message calls for a removal in 3.6 so, I'm either missing some additional conversations on this or

[issue29816] Get rid of C limitation for shift count in right shift

2017-03-15 Thread STINNER Victor
STINNER Victor added the comment: > I think an OverflowError is appropriate here for denoting the platform and > implementation limitation. It's common that integer overflow on memory allocation in C code raises a MemoryError, not an OverflowError. >>> "x" * (2**60) Traceback (most recent

[issue29815] Fail at divide a negative integer number for a positive integer number

2017-03-15 Thread Marcos Thomaz
Marcos Thomaz added the comment: Note that mathematic expression is wrong. -7 divided by 2 is -3, not -4 -- resolution: -> rejected type: behavior -> crash ___ Python tracker

[issue29725] sqlite3.Cursor doesn't properly document "arraysize"

2017-03-15 Thread Berker Peksag
Changes by Berker Peksag : -- keywords: +easy nosy: +berker.peksag stage: -> needs patch type: -> enhancement versions: +Python 3.5, Python 3.6, Python 3.7 ___ Python tracker

[issue29816] Get rid of C limitation for shift count in right shift

2017-03-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This may be a part of this issue or a separate issue: bytes(-1) raises a ValueError, but bytes(-10**100) raises an OverflowError. -- ___ Python tracker

[issue29812] test for token.py, and consistency tests for tokenize.py

2017-03-15 Thread Jim Fasarakis-Hilliard
Changes by Jim Fasarakis-Hilliard : -- nosy: +Jim Fasarakis-Hilliard ___ Python tracker ___

[issue29817] File IO r+ read, write, read causes garbage data write.

2017-03-15 Thread Jan
Changes by Jan : -- title: File IO read, write, read causes garbage data write. -> File IO r+ read, write, read causes garbage data write. ___ Python tracker

[issue29817] File IO read, write, read causes garbage data write.

2017-03-15 Thread Jan
New submission from Jan: In Python 2.7.12 when reading, writing and subsequently reading again from a file, python seems to write garbage. For example when running this in python IDLE: import os testPath = r"myTestFile.txt" ## Make sure the file exists and its empty with open(testPath,"w")

[issue29815] Fail at divide a negative integer number for a positive integer number

2017-03-15 Thread Marcos Thomaz
Marcos Thomaz added the comment: Try this operations, in interactive environment: >> 7 // 2 3 >> -7 // 2 -4 -- resolution: not a bug -> status: closed -> open versions: +Python 3.3 ___ Python tracker

[issue29815] Fail at divide a negative integer number for a positive integer number

2017-03-15 Thread Marcos Thomaz
Marcos Thomaz added the comment: I'm sorry, but was a typing error. Try this operations: a, b, c = 7, -7, 2 print "1:", a // c, a % c print "2:", b // c, b % c the result is: 1: 3 1 2: -4 1 The division is the same, except by the signal (variable b is negative, but both, variables "a" and

[issue29816] Get rid of C limitation for shift count in right shift

2017-03-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > If we change something, I suggest to be consistent with lshift. I expect a > memory error on "1 << (1 << 1024)" (no unlimited loop before a global system > collapse please ;-)) I agree that left shift should raise an ValueError rather than OverflowError

[issue15988] Inconsistency in overflow error messages of integer argument

2017-03-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I just have started reviewing the PR and it looks great! -- ___ Python tracker ___

[issue15988] Inconsistency in overflow error messages of integer argument

2017-03-15 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- dependencies: +Get rid of C limitation for shift count in right shift, can't set big int-like objects to items in array 'Q', 'L' and 'I' ___ Python tracker

[issue29816] Get rid of C limitation for shift count in right shift

2017-03-15 Thread STINNER Victor
STINNER Victor added the comment: FYI I saw recently that the C limitation of len() was reported in the "owasp-pysec" project: https://github.com/ebranca/owasp-pysec/wiki/Overflow-in-len-function I don't understand what such "deliberate" limitation was reported in a hardened CPython project?

[issue29816] Get rid of C limitation for shift count in right shift

2017-03-15 Thread STINNER Victor
STINNER Victor added the comment: If we change something, I suggest to be consistent with lshift. I expect a memory error on "1 << (1 << 1024)" (no unlimited loop before a global system collapse please ;-)) -- nosy: +haypo ___ Python tracker

[issue29816] Get rid of C limitation for shift count in right shift

2017-03-15 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Currently the value of right operand of the right shift operator is limited by C Py_ssize_t type. >>> 1 >> 10**100 Traceback (most recent call last): File "", line 1, in OverflowError: Python int too large to convert to C ssize_t >>> (-1) >> 10**100

[issue28647] python --help: -u is misdocumented as binary mode

2017-03-15 Thread Nick Coghlan
Nick Coghlan added the comment: I just ran into this discrepancy working on the test cases for PEP 538 - +1 for Gareth's suggested approach of just aligning the `--help` output with the man page. -- nosy: +ncoghlan ___ Python tracker

[issue29815] Fail at divide a negative integer number for a positive integer number

2017-03-15 Thread Martin Panter
Martin Panter added the comment: If you ignore the c[0] argument, the rest looks fine to me. See the documentation at and

[issue29815] Fail at divide a negative integer number for a positive integer number

2017-03-15 Thread Marcos Thomaz
New submission from Marcos Thomaz: At divide a negative integer number for a positive integer number, the result is wrong. For example, in operation: a, b, c = -7, 2, 7 d = divmod(a, b) print a//b, a%b, c[0], c // b, c%b The values printed are -4 1 3 1 -- components: Interpreter

[issue29800] functools.partial segfaults in repr when keywords attribute is abused

2017-03-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your contribution Michael! -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker

[issue29104] Left bracket remains in format string result when '\' preceeds it

2017-03-15 Thread Eric V. Smith
Eric V. Smith added the comment: Serhiy: I plan to find time in the next week or so to look at this. Sorry for the delay. Plus, the new workflow isn't helping me out: I need to get up to speed on it. -- ___ Python tracker

[issue29800] functools.partial segfaults in repr when keywords attribute is abused

2017-03-15 Thread Michael Seifert
Changes by Michael Seifert : -- pull_requests: +555 ___ Python tracker ___ ___

[issue29814] parsing f-strings -- opening brace of expression gets duplicated when preceeded by backslash

2017-03-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is a duplicate of issue29104. -- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Left bracket remains in format string result when '\' preceeds it

[issue29800] functools.partial segfaults in repr when keywords attribute is abused

2017-03-15 Thread Michael Seifert
Changes by Michael Seifert : -- pull_requests: +554 ___ Python tracker ___ ___

[issue29715] Argparse improperly handles "-_"

2017-03-15 Thread Mateusz Bysiek
Changes by Mateusz Bysiek : -- title: Arparse improperly handles "-_" -> Argparse improperly handles "-_" ___ Python tracker ___

[issue28964] AST literal_eval exceptions provide no information about line number

2017-03-15 Thread Mateusz Bysiek
Changes by Mateusz Bysiek : -- nosy: +mbdevpl ___ Python tracker ___ ___ Python-bugs-list

[issue10399] AST Optimization: inlining of function calls

2017-03-15 Thread Mateusz Bysiek
Changes by Mateusz Bysiek : -- nosy: +mbdevpl ___ Python tracker ___ ___ Python-bugs-list

[issue11549] Build-out an AST optimizer, moving some functionality out of the peephole optimizer

2017-03-15 Thread Mateusz Bysiek
Changes by Mateusz Bysiek : -- nosy: +mbdevpl ___ Python tracker ___ ___ Python-bugs-list

[issue29471] AST: add an attribute to FunctionDef to distinguish functions from generators and coroutines

2017-03-15 Thread Mateusz Bysiek
Changes by Mateusz Bysiek : -- nosy: +mbdevpl ___ Python tracker ___ ___ Python-bugs-list

[issue24119] Carry comments with the AST

2017-03-15 Thread Mateusz Bysiek
Mateusz Bysiek added the comment: For some time now, there's an alternate ast implementation https://github.com/python/typed_ast that carries PEP 484 type comments with the AST as attributes of certain nodes. Their approach is described here:

[issue29051] Improve error reporting involving f-strings (PEP 498)

2017-03-15 Thread Mateusz Bysiek
Changes by Mateusz Bysiek : -- nosy: +mbdevpl ___ Python tracker ___ ___ Python-bugs-list

[issue29814] parsing f-strings -- opening brace of expression gets duplicated when preceeded by backslash

2017-03-15 Thread Mateusz Bysiek
New submission from Mateusz Bysiek: with Python 3.6.0 and the following script: ``` #!/usr/bin/env python3.6 import ast code1 = '''"\\{x}"''' code2 = '''f"\\{x}"''' tree1 = ast.parse(code1, mode='eval') print(ast.dump(tree1)) tree2 = ast.parse(code2, mode='eval') print(ast.dump(tree2)) ```

[issue29800] functools.partial segfaults in repr when keywords attribute is abused

2017-03-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you create PRs for 3.6 and 3.5 Michael? -- ___ Python tracker ___