[issue34974] bytes and bytearray constructors replace unexpected exceptions

2018-10-14 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue34974] bytes and bytearray constructors replace unexpected exceptions

2018-10-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 43308dfc3335906cfefe9f14a44e468935f3c321 by Serhiy Storchaka in branch '2.7': [2.7] bpo-34974: Do not replace unexpected errors in bytearray(). (GH-9852) (GH-9885)

[issue34974] bytes and bytearray constructors replace unexpected exceptions

2018-10-14 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- versions: +Python 2.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34974] bytes and bytearray constructors replace unexpected exceptions

2018-10-14 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +9248 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34572] C unpickling bypasses import thread safety

2018-10-14 Thread Tim Burgess
Tim Burgess added the comment: Hi! Just wondering if there is anything I can do to move this along? -- ___ Python tracker ___ ___

[issue34986] python finds test modules from the wrong directory during PGO build

2018-10-14 Thread Kal Sze
Kal Sze added the comment: Oops, sorry for the noise. This is mostly a duplicate of #34985 because the crash log attachment was too big and caused the issue tracker's proxy server to return an error code, so I thought the initial bug report creation failed. An e-mail confirmation arrived

[issue34986] python finds test modules from the wrong directory during PGO build

2018-10-14 Thread Kal Sze
New submission from Kal Sze : OS: Ubuntu Desktop 18.04.1 x86-64 Python 3.7.0 When trying to build Python 3.7 from source, with the `--enable-shared --enable-optimizations --with-lto` configure options, python needs to run the test suite in order to generate PGO data. However, it turns out

[issue34985] python finds test modules from the wrong directory during PGO build

2018-10-14 Thread Kal Sze
New submission from Kal Sze : OS: Ubuntu Desktop 18.04.1 x86-64 Python 3.7.0 When trying to build Python 3.7 from source, with the `--enable-shared --enable-optimizations --with-lto` configure options, python needs to run the test suite in order to generate PGO data. However, it turns out

[issue33450] unexpected EPROTOTYPE returned by sendto on MAC OSX

2018-10-14 Thread Eamonn Nugent
Eamonn Nugent added the comment: Fwiw, this also happens in asyncio. Theoretically, I *think* you could wrap a try-except as a monkey patch. My stack trace is: Fatal write error on socket transport protocol: transport: <_SelectorSocketTransport fd=163 read=polling write=> Traceback (most

[issue32321] functools.reduce has a redundant guard or needs a pure Python fallback

2018-10-14 Thread Braden Groom
Change by Braden Groom : -- pull_requests: +9246 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24653] Mock.assert_has_calls([]) is surprising for users

2018-10-14 Thread Srinivas Reddy T
Change by Srinivas Reddy T : -- keywords: +patch pull_requests: +9245 stage: -> patch review ___ Python tracker ___ ___

[issue34974] bytes and bytearray constructors replace unexpected exceptions

2018-10-14 Thread miss-islington
miss-islington added the comment: New changeset 08ba7eb89d5353af31ef9e66a5337abea1b676ef by Miss Islington (bot) in branch '3.6': bpo-34974: Do not replace unexpected errors in bytes() and bytearray(). (GH-9852)

[issue34974] bytes and bytearray constructors replace unexpected exceptions

2018-10-14 Thread miss-islington
miss-islington added the comment: New changeset 1370832af24cc6f0f464354b9ec3ecdb343d35ce by Miss Islington (bot) in branch '3.7': bpo-34974: Do not replace unexpected errors in bytes() and bytearray(). (GH-9852)

[issue34848] range.index only takes one argument when it's documented as taking the usual 3

2018-10-14 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +9244 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34848] range.index only takes one argument when it's documented as taking the usual 3

2018-10-14 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +9243 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34974] bytes and bytearray constructors replace unexpected exceptions

2018-10-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset e890421e334ccf0c000c6b29c4a521d86cd12f47 by Serhiy Storchaka in branch 'master': bpo-34974: Do not replace unexpected errors in bytes() and bytearray(). (GH-9852)

[issue34974] bytes and bytearray constructors replace unexpected exceptions

2018-10-14 Thread miss-islington
Change by miss-islington : -- pull_requests: +9241 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34974] bytes and bytearray constructors replace unexpected exceptions

2018-10-14 Thread miss-islington
Change by miss-islington : -- pull_requests: +9242 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9453] pulldom.SAX2DOM Doesn't support processing instructions before the root element

2018-10-14 Thread Tal Einat
Tal Einat added the comment: Proposing removal of SAX2DOM doesn't seem unreasonable to me. However, considering it hasn't been removed so far, we'll need good reason to do so since that would break backwards compatibility. Jonathan, if the solution to this is simple, I say go for it and

[issue34848] range.index only takes one argument when it's documented as taking the usual 3

2018-10-14 Thread Srinivas Reddy T
Change by Srinivas Reddy T : -- keywords: +patch pull_requests: +9240 stage: needs patch -> patch review ___ Python tracker ___

[issue17561] Add socket.create_server_sock() convenience function

2018-10-14 Thread Cheryl Sabella
Cheryl Sabella added the comment: Since Tulip/asyncio has gone through a lot of development since this issue was added, I wasn't sure if this has been included already or if there was still interest in it. In either case, I think it might be able to be closed, but I wanted to make sure

[issue34976] IDLE: Replace the search dialog with a search bar

2018-10-14 Thread Cheryl Sabella
Cheryl Sabella added the comment: +1 on adding this to IDLE I haven't looked at the code or all the details yet, but just downloading the patch and running code in IDLE, this is a nice change. -- ___ Python tracker

[issue34939] Possibly spurious SyntaxError: annotated name can't be global

2018-10-14 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue9453] pulldom.SAX2DOM Doesn't support processing instructions before the root element

2018-10-14 Thread Jonathan Gossage
Jonathan Gossage added the comment: This test case demonstrates that the issue still exists in 3.8. The fix is relatively simple but I am unsure whether it is worthwhile as the original comments on the quality and usability of SAX2DOM are spot on. My recommendation would be to mark it as

[issue34939] Possibly spurious SyntaxError: annotated name can't be global

2018-10-14 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset de2aea0ff02fa9486365ce9d215bef150fae3a0b by Pablo Galindo in branch 'master': bpo-34939: Allow annotated global names in module namespace (GH-9844) https://github.com/python/cpython/commit/de2aea0ff02fa9486365ce9d215bef150fae3a0b

[issue29159] Regression in bytes constructor

2018-10-14 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: -1003 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34984] Improve error messages in bytes and bytearray constructors

2018-10-14 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +9239 stage: -> patch review ___ Python tracker ___ ___

[issue34984] Improve error messages in bytes and bytearray constructors

2018-10-14 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : The proposed PR improves error messages in bytes and bytearray constructors. 1. When pass only encoding or errors to the bytes or bytearray constructor, it raises a TypeError with the message "encoding or errors without sequence argument". But the

[issue34521] Multiple tests (test_socket, test_multiprocessing_*) fail due to incorrect recvmsg(2) buffer lengths, causing failures on FreeBSD CURRENT

2018-10-14 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset bd036d3d15fc1310ccc32a43a3296b8c157ac221 by Pablo Galindo in branch 'master': bpo-34521: Add NEWS entry for changes in GH-9613 (GH-9850) https://github.com/python/cpython/commit/bd036d3d15fc1310ccc32a43a3296b8c157ac221 --

[issue20216] Misleading docs for sha1, sha256, sha512, md5 modules

2018-10-14 Thread Srinivas Reddy T
Change by Srinivas Reddy T : -- pull_requests: +9238 stage: needs patch -> patch review ___ Python tracker ___ ___

[issue34983] expose symtable.Symbol.is_nonlocal()

2018-10-14 Thread Pablo Galindo Salgado
New submission from Pablo Galindo Salgado : The symtable has information about if a particular symbol is nonlocal though the DEF_LOCAL flag but this information is not exposed in symtable.py, making impossible to ask if a symbol is declared as nonlocal using the python symtable module.

[issue34983] expose symtable.Symbol.is_nonlocal()

2018-10-14 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +9237 stage: -> patch review ___ Python tracker ___ ___

[issue34982] re.sub() different behavior in 3.7

2018-10-14 Thread purificant
purificant added the comment: Great, thank you for explaining. My specific use case can be fixed by replacing * with + as per your suggestion. -- ___ Python tracker ___

[issue34982] re.sub() different behavior in 3.7

2018-10-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, this is an intended change. Your pattern matches an empty string at the end of the input string. It was a bug in earlier Python versions that re.sub() didn't replace empty matches adjacent to a previous non-empty match. It is not clear what is the

[issue34982] re.sub() different behavior in 3.7

2018-10-14 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue34982] re.sub() different behavior in 3.7

2018-10-14 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Thanks for the report. git bisect tells me this change was introduced with fbb490fd2f38bd817d99c20c05121ad0168a38ee (issue32308) # ../backups/bpo34982.py import re print(re.sub(r'(([^/]*)(/.*)?)', r'\2.zip/\1/', 'example')) # Running script at

[issue34979] Python throws “SyntaxError: Non-UTF-8 code start with \xe8...” when parse source file

2018-10-14 Thread Lu jaymin
Lu jaymin added the comment: Thanks for your suggestions. I will make a PR on github. The buffer is resizeable now, please see cpython/Parser/tokenizer.c#L1043 for details. --

[issue6686] xml.sax.xmlreader.XMLReader.getProperty (xml.sax.handler.property_xml_string) returns bytes

2018-10-14 Thread Jonathan Gossage
Jonathan Gossage added the comment: The other thing to consider which also supports option 2 is that xml.parsers.expat provides an interface to the Expat parser which is easier to use and more complete than the Sax parser implementation and is the implementation likely to be used by anyone

[issue34982] re.sub() different behavior in 3.7

2018-10-14 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34982] re.sub() different behavior in 3.7

2018-10-14 Thread purificant
New submission from purificant : A call to re.sub() returns different results in Python 3.7 compared to versions 3.6 / 3.5 and 2.7 Example behavior in 2.7 / 3.5 and 3.6: >>> re.sub(r'(([^/]*)(/.*)?)', r'\2.zip/\1/', 'example') 'example.zip/example/' Example in 3.7.0 and 3.7.1rc2: >>>

[issue34979] Python throws “SyntaxError: Non-UTF-8 code start with \xe8...” when parse source file

2018-10-14 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Thanks for the confirmation. I think the expected solution is to use a buffer that can be resized. CPython accepts GitHub PRs so if you have time then I would suggest raising a PR against the linked issue since a lot of people have subscribed

[issue34912] Update overflow checks in resize_buffer

2018-10-14 Thread Stefan Behnel
Stefan Behnel added the comment: If I understand the code right, "PY_SSIZE_T_MAX/sizeof(Py_UCS4)" would not be correct since it would unnecessarily limit the length of ASCII-only unicode strings. I think the initial check avoids the risk of integer overflow in the calculations below, so

[issue34981] Unable to install Python from web-based installer and executable installer

2018-10-14 Thread Eric V. Smith
Change by Eric V. Smith : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker ___ ___

[issue34972] json dump silently converts int keys to string

2018-10-14 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> not a bug ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34972] json dump silently converts int keys to string

2018-10-14 Thread My-Tien Nguyen
Change by My-Tien Nguyen : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34981] Unable to install Python from web-based installer and executable installer

2018-10-14 Thread skycraper
New submission from skycraper : I have a PC with 2 HDD with 2 Vista OS at each other. One system is old and it has Python 3.7 installed and working successfully. The second system is new-installed and it has a problems with running web-based installers and executable-installer of the latest

[issue34972] json dump silently converts int keys to string

2018-10-14 Thread My-Tien Nguyen
My-Tien Nguyen added the comment: Sure, I can do that, but wanted to propose this regardless. I guess this is a disagreement on a language design level. As a proponent of strong typing I wouldn’t have allowed non-string keys in the first place, and if they are allowed I would warn about

[issue34979] Python throws “SyntaxError: Non-UTF-8 code start with \xe8...” when parse source file

2018-10-14 Thread Lu jaymin
Lu jaymin added the comment: I think these two issue is the same issue, and the following is a patch write by me, hope this patch will help. ``` diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c index 1af27bf..ba6fb3a 100644 --- a/Parser/tokenizer.c +++ b/Parser/tokenizer.c @@ -617,32

[issue34725] Py_GetProgramFullPath() odd behaviour in Windows

2018-10-14 Thread Mario
Mario added the comment: On 13/10/2018 17:37, Steve Dower wrote: > > Steve Dower added the comment: > > I meant why are you using an embedded application with a virtual environment? > What sort of application do you have that requires users to configure a > virtual environment, rather

[issue6686] xml.sax.xmlreader.XMLReader.getProperty (xml.sax.handler.property_xml_string) returns bytes

2018-10-14 Thread Tal Einat
Tal Einat added the comment: See additional research and discussion in the comments of PR GH-9715. Simply changing this to return a string rather than bytes would break backwards compatibility. I certainly agree that this should have returned a string in the first place, especially since

[issue34979] Python throws “SyntaxError: Non-UTF-8 code start with \xe8...” when parse source file

2018-10-14 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Got it. Thanks for the details and patience. I tested with less number of characters and it seems to work fine so using the encoding at the top is not a good way to test the original issue as you have mentioned. Then I searched around and found

[issue34941] xml.etree.ElementTree findall() fails when using custom TreeBuilder

2018-10-14 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 2.7 ___ Python tracker ___

[issue34941] xml.etree.ElementTree findall() fails when using custom TreeBuilder

2018-10-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 7c1c42b3209f1d2546daab6cd77f953eb255df6c by Serhiy Storchaka in branch '3.6': [3.6] bpo-34941: Fix searching Element subclasses. (GH-9766) (GH-9868) https://github.com/python/cpython/commit/7c1c42b3209f1d2546daab6cd77f953eb255df6c

[issue34979] Python throws “SyntaxError: Non-UTF-8 code start with \xe8...” when parse source file

2018-10-14 Thread Lu jaymin
Lu jaymin added the comment: If you declare the encoding at the top of the file, then everything is fine, because in this case Python will use `io.open` to open the file and use `stream.readline` to read one line of code, please see function `fp_setreadl` in `cpython/Parser/tokenizer.c` for

[issue34941] xml.etree.ElementTree findall() fails when using custom TreeBuilder

2018-10-14 Thread miss-islington
miss-islington added the comment: New changeset b1c800303e8458e00428ae66351ad492a503a46f by Miss Islington (bot) in branch '3.7': bpo-34941: Fix searching Element subclasses. (GH-9766) https://github.com/python/cpython/commit/b1c800303e8458e00428ae66351ad492a503a46f -- nosy:

[issue34941] xml.etree.ElementTree findall() fails when using custom TreeBuilder

2018-10-14 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +9236 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34941] xml.etree.ElementTree findall() fails when using custom TreeBuilder

2018-10-14 Thread miss-islington
Change by miss-islington : -- pull_requests: +9235 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34941] xml.etree.ElementTree findall() fails when using custom TreeBuilder

2018-10-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset b11c5667f99c4f0018e3394c4d07c519d835671a by Serhiy Storchaka in branch 'master': bpo-34941: Fix searching Element subclasses. (GH-9766) https://github.com/python/cpython/commit/b11c5667f99c4f0018e3394c4d07c519d835671a --

[issue34980] KillPython target doesn't detect 64-bit processes

2018-10-14 Thread Jeremy Kloth
New submission from Jeremy Kloth : Since the KillPython target has been rewritten as an InlineTask, it can no longer detect 64-bit processes due to MSBuild being 32-bit. This leads to stuck buildbot runs: https://buildbot.python.org/all/#/builders/17/builds/348 A few solutions that I can

[issue34968] loop.call_soon_threadsafe should be documented to be re-entrant-safe too

2018-10-14 Thread Nathaniel Smith
Nathaniel Smith added the comment: > What would make it not reentrant-safe? Probably the most obvious example of a non-reentrant-safe operation is taking a lock. It's very natural to write code like: def call_soon(...): with self._call_soon_lock: ... but now imagine that inside

[issue34927] Tkinter-related segfault on macOS (regression between 3.7.0 and 3.7.1rc1)

2018-10-14 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Thanks for the release Ned. I can confirm that there is no segfault with Python 3.7.1rc2 (v3.7.1rc2:6c06ef7dc3). -- ___ Python tracker

[issue34977] Release Windows Store app containing Python

2018-10-14 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: +1 for reliable installation. There were some cases (issue33220, issue30944) where the installer was detected as a Virus by some vendors which would be reduced since this is installed from the App store as a verified app. I hope this will also