[issue28426] PyUnicode_AsDecodedObject can only return unicode now

2016-10-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Indeed. The only difference is that PyUnicode_AsDecodedUnicode fails for most encodings (except rot13), but PyUnicode_AsDecodedObject just crashes in debug build. It seems to me that these functions (as well as PyUnicode_AsEncodedUnicode) shouldn't exist it

[issue28426] PyUnicode_AsDecodedObject can only return unicode now

2016-10-12 Thread Xiang Zhang
New submission from Xiang Zhang: PyUnicode_AsDecodedObject was added in f46d49e2e0f0 and became an API in 2284fa89ab08. It seems its intention is to return a Python object. But during evolution, with commits 5f11621a6f51 and 123f2dc08b3e, it can only return unicode now, becoming another

[issue28425] Python3 ignores __init__.py that are links to /dev/null

2016-10-12 Thread Douglas Greiman
New submission from Douglas Greiman: This manifests in the following way: A package directory containing an __init__.py that is a symlink to /dev/null is treated as a namespace package instead of a regular package. The Bazel build tool creates many __init__.py files in this way, which is how

[issue28424] pkgutil.get_data() doesn't work with namespace packages

2016-10-12 Thread Douglas Greiman
New submission from Douglas Greiman: pkg_util.get_data('mypackage', 'resourcename') returns None if 'mypackage' is a namespace package, because the package object has no __file__ attribute. A shell script is attached to reproduce this. This is either a bug to be fixed (my preference) or

[issue28423] list.insert(-1,value) is wrong!

2016-10-12 Thread Tim Peters
Tim Peters added the comment: It's fine. Read the docs. "s.insert(i, x) inserts x into s at the index given by i (same as s[i:i] = [x])" Note that: >>> fred[-1:] [4] So the empty slice s[-1:-1] is _between_ 3 and 4 in `fred`. If you're not surprised by >>> fred[-1] 4 then you shouldn't

[issue28423] list.insert(-1,value) is wrong!

2016-10-12 Thread stephen
New submission from stephen: python3.4.3 on linux mint 17.3 interactive mode on terminal >>> fred=[0,1,2,3,4] >>> fred.insert(-1,9) >>> fred [0, 1, 2, 3, 9, 4] We should get [0,1,2,3,4,9]. Embarrassing error! -- messages: 278541 nosy: unklestephen priority: normal severity: normal

[issue26980] The path argument of asyncio.BaseEventLoop.create_unix_connection is not documented

2016-10-12 Thread Марк Коренберг
Марк Коренберг added the comment: It will be nice if someone also adds if abstract UNIX sockets are supported. And also about bytes/str path support. -- nosy: +mmarkk ___ Python tracker

[issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English

2016-10-12 Thread László Károlyi
László Károlyi added the comment: OSX Sierra + Python, the bug still exists. subscribing -- nosy: +karolyi ___ Python tracker ___

[issue21720] "TypeError: Item in ``from list'' not a string" message

2016-10-12 Thread Ben Finney
Ben Finney added the comment: On 12-Oct-2016, Nick Coghlan wrote: > In this case, I think just reporting the first failing item is fine, > and mentioning the type of that item in the error message is the > most useful additional information we can provide to make things > easier to debug. Yes;

[issue26631] Unable to install Python 3.5.1 on Windows 10 - Error 0x80070643: Failed to install MSI package.

2016-10-12 Thread Skye
Skye added the comment: I am having the same issue. Currently do not have Python on my computer. Tried to fix by doing Method 1 here, no success: http://www.techpayee.com/failed-to-install-msi-package/ -- nosy: +SHarris ___ Python tracker

[issue23297] Clarify error when ‘tokenize.detect_encoding’ receives text

2016-10-12 Thread Berker Peksag
Berker Peksag added the comment: It looks like this can also be fixed by issue 12486. -- nosy: +berker.peksag ___ Python tracker ___

[issue22502] after continue in pdb stops in signal.py

2016-10-12 Thread Xavier de Gaye
Xavier de Gaye added the comment: Fixed in issue 20766. -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___

[issue20766] reference leaks in pdb

2016-10-12 Thread Xavier de Gaye
Changes by Xavier de Gaye : -- stage: patch review -> resolved ___ Python tracker ___ ___

[issue26980] The path argument of asyncio.BaseEventLoop.create_unix_connection is not documented

2016-10-12 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the report. I'm marking this as an easy documentation issue. BaseEventLoop is now AbstractEventLoop (87e3a58ed3c3) and the documentation of AbstractEventLoop.create_unix_connection() can be found in Doc/library/asyncio-eventloop.rst. Guido already

[issue20766] reference leaks in pdb

2016-10-12 Thread Xavier de Gaye
Changes by Xavier de Gaye : -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue20766] reference leaks in pdb

2016-10-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 31a2d270c0c3 by Xavier de Gaye in branch '3.5': Issue #20766: Fix references leaked by pdb in the handling of SIGINT handlers. https://hg.python.org/cpython/rev/31a2d270c0c3 New changeset 86a1905ea28d by Xavier de Gaye in branch '3.6': Issue

[issue28279] setuptools failing to read from setup.cfg only in Python 3.6

2016-10-12 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +jason.coombs ___ Python tracker ___ ___

[issue28378] urllib2 does not handle cookies with `,`

2016-10-12 Thread SilentGhost
SilentGhost added the comment: On python2 you should be able to use Cookie module to parse cookies, rather than doing that manually. Commas are handled correctly there. On python3 the same functionality can be found in http.cookies. The SimpleCookie.load could be used directly to have the

[issue17305] IDNA2008 encoding missing

2016-10-12 Thread Cory Benfield
Changes by Cory Benfield : -- nosy: +Lukasa ___ Python tracker ___ ___ Python-bugs-list

[issue26944] android: test_posix fails

2016-10-12 Thread Xavier de Gaye
Xavier de Gaye added the comment: Thanks for the patch David, see my comment in Rietveld. New patch based on David patch, just a bit simpler. -- stage: patch review -> commit review versions: +Python 3.7 Added file: http://bugs.python.org/file45067/test_getgroups_4.patch

[issue21720] "TypeError: Item in ``from list'' not a string" message

2016-10-12 Thread Nick Coghlan
Nick Coghlan added the comment: Right, Python 2.7 import is what it is at this point - if folks want something more modern, they can take a look at importlib2 :) In this case, I think just reporting the first failing item is fine, and mentioning the type of that item in the error message is

[issue28422] multiprocessing Manager mutable type member access failure

2016-10-12 Thread Vilnis Termanis
Changes by Vilnis Termanis : -- type: crash -> behavior ___ Python tracker ___

[issue28422] multiprocessing Manager mutable type member access failure

2016-10-12 Thread Vilnis Termanis
Changes by Vilnis Termanis : -- type: -> crash ___ Python tracker ___ ___

[issue28422] multiprocessing Manager mutable type member access failure

2016-10-12 Thread Vilnis Termanis
New submission from Vilnis Termanis: Accessing some Manager types (e.g. Lock) through a list, dict or Namespace proxy is not possible if both the mutable container (e.g. list) and contained type instance (e.g. Lock) have been created in the same process. Symptoms: In accessing process:

[issue28415] PyUnicode_FromFromat interger format handling different from printf about zeropad

2016-10-12 Thread Antti Haapala
Antti Haapala added the comment: To be more precise, C90, C99, C11 all say that ~"For d, i, o, u, x and X conversions, if a precision is specified, the 0 flag will be ignored." -- nosy: +ztane ___ Python tracker

[issue21720] "TypeError: Item in ``from list'' not a string" message

2016-10-12 Thread Berker Peksag
Berker Peksag added the comment: Well, I find using a for loop is a bit verbose in this case :) In Python 3.2: >>> __import__('encodings', fromlist=[b'aliases']) Traceback (most recent call last): File "", line 1, in TypeError: Item in ``from list'' not a string BytesWarning is there since

[issue28393] Update encoding lookup docs wrt #27938

2016-10-12 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: The names are indeed case-insensitive. However, something important is missing: the implementation details changed between Python 3.5 and 3.6. Please check the implementation for details and update the documentation with versionadded flags. Thanks.

[issue28378] urllib2 does not handle cookies with `,`

2016-10-12 Thread Grzegorz Sikorski
Grzegorz Sikorski added the comment: I attach example express/nodejs server which by default returns a cookie with the comma (see expiry time format). The output from the python test file I posted in previous message is: ``` python test.py cookie1=exampleCookie; Path=/,

[issue28378] urllib2 does not handle cookies with `,`

2016-10-12 Thread Grzegorz Sikorski
Grzegorz Sikorski added the comment: I was debugging this and found out that urllib2 works more-less correct. The only problem I would see is referring to the header by `res.headers['Set-Cookie']`, as it returns comma-separated string, which cannot be processed properly in case the cookie

[issue21720] "TypeError: Item in ``from list'' not a string" message

2016-10-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > How about raising a TypeError if ``all(isinstance(l, str) for l in > fromlist)`` is False? That would make the exception message less clearer > since we can't include the "[...] not 'bytes'" part though. for l in fromlist: if not isinstance(l,

[issue28421] lib/distutils/sysconfig.py fails to pick up Py_ENABLE_SHARED value

2016-10-12 Thread Berker Peksag
Changes by Berker Peksag : -- resolution: -> third party stage: -> resolved ___ Python tracker ___

[issue21720] "TypeError: Item in ``from list'' not a string" message

2016-10-12 Thread Berker Peksag
Berker Peksag added the comment: > Should we file a separate issue regarding the similarly vague error message > from hasattr() itself? +1 from me. It would be good to show users a user friendly message :) > BytesWarning: Comparison between bytes and string How about raising a TypeError if

[issue28421] lib/distutils/sysconfig.py fails to pick up Py_ENABLE_SHARED value

2016-10-12 Thread Takashi Matsuzawa
Takashi Matsuzawa added the comment: I further looked into my build environment. This particular pyconfig.h is generated by Yocto build toolchain, modifying the original flat pyconfig.h So, this issue may not be Pythons, but Yocto/OE's. -- status: open -> closed

[issue28421] lib/distutils/sysconfig.py fails to pick up Py_ENABLE_SHARED value

2016-10-12 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: How is sysroots/qemux86/user/include/python2.7/pyconfig.h generated? In normal cases, there's no #include in pyconfig.h. -- nosy: +Chi Hsuan Yen ___ Python tracker

[issue28414] SSL match_hostname fails for internationalized domain names

2016-10-12 Thread Anton Sychugov
Anton Sychugov added the comment: Christian, thanks a lot for your comment and for patch you provide. It becomes much clearer. I'll be watching for #17305. -- ___ Python tracker

[issue28421] lib/distutils/sysconfig.py fails to pick up Py_ENABLE_SHARED value

2016-10-12 Thread Takashi Matsuzawa
New submission from Takashi Matsuzawa: I have been debugging for a couple of days to now why my extension module build fails with my Yocto 2.0 cross-build environment. (python version is 2.7, host is x86_64 and target is qemux86). The symptom is that LD flags -L and -lpython27 are not being

[issue28417] va_end twice in PyUnicode_FromFormatV

2016-10-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6a6ac890db78 by Benjamin Peterson in branch '3.6': va_end vargs2 once (closes #28417) https://hg.python.org/cpython/rev/6a6ac890db78 New changeset 439427ffbba1 by Benjamin Peterson in branch 'default': merge 3.6 (#28417)