[issue26811] segfault due to null pointer in tuple

2016-04-20 Thread Xiang Zhang
Xiang Zhang added the comment: hg bisect tells me changeset 95830:661cdbd617b8 introduces this behaviour. -- nosy: +xiang.zhang type: crash -> ___ Python tracker

[issue26813] Wrong Japanese translation of "Adverb" on Documentation

2016-04-20 Thread Ken Miura
New submission from Ken Miura: In Japanese Python document, English word "Adverb" is translated to "形容動詞", but it's "副詞" actually. http://docs.python.jp/2/library/re.html#finding-all-adverbs http://docs.python.jp/2/library/re.html#finding-all-adverbs-and-their-positions -- assignee:

Re: Detecting repeated subsequences of identical items

2016-04-20 Thread Chris Angelico
On Thu, Apr 21, 2016 at 1:07 PM, Steven D'Aprano wrote: > Now I want to group subsequences. For example, I have: > > "ABCABCABCDEABCDEFABCABCABCB" > > and I want to group it into repeating subsequences. I can see two ways to > group it: > > ABC ABC ABCDE ABCDE F ABC ABC ABC B

[issue2636] Adding a new regex module (compatible with re)

2016-04-20 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___

[issue8978] "tarfile.ReadError: file could not be opened successfully" if compiled without zlib

2016-04-20 Thread Lars Gustäbel
Lars Gustäbel added the comment: Closed after years of inactivity. -- resolution: -> works for me stage: -> resolved status: open -> closed ___ Python tracker

[issue26811] segfault due to null pointer in tuple

2016-04-20 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +brett.cannon, eric.snow, ncoghlan, serhiy.storchaka type: -> crash ___ Python tracker ___

[issue16679] Add advice about non-ASCII wsgiref PATH_INFO

2016-04-20 Thread Graham Dumpleton
Graham Dumpleton added the comment: What I get in Apache for: http://127.0.0.1:8000/a=тест in Safari browser is: 'REQUEST_URI': '/a=%D1%82%D0%B5%D1%81%D1%82', 'PATH_INFO': '/a=\xc3\x91\\x82\xc3\x90\xc2\xb5\xc3\x91\\x81\xc3\x91\\x82', Where as for curl see: 'REQUEST_URI':

[issue16679] Add advice about non-ASCII wsgiref PATH_INFO

2016-04-20 Thread Martin Panter
Martin Panter added the comment: PEP defers to a draft CGI specification for PATH_INFO and QUERY_STRING: . (Dunno why it didn’t reference the final RFC 3875 instead, published 2004.) Anyway, both draft and final RFCs say “PATH_INFO is

[issue26808] wsgiref.simple_server breaks unicode in URIs

2016-04-20 Thread Martin Panter
Martin Panter added the comment: Graham: On my Linux computer, Curl seems to treat the test “URL” as a string of bytes and doesn’t percent encode it. Therefore you may be affected by Issue 26717 which I fixed the other day. But in real life, URLs are meant to only have literal ASCII

[issue26812] ExtendedInterpolation drops user-defined 'vars' during _interpolate_some() recursion

2016-04-20 Thread Yih-En Andrew Ban
New submission from Yih-En Andrew Ban: In Python 3.5.1, configparser.ExtendedInterpolation will drop the user-defined 'vars' passed in via ConfigParser.get(vars=...) due to a bug when recursing beyond depth 1 in ExtendedInterpolation._interpolate_some(). Line 509 of configparser.py currently

[issue22359] Remove incorrect uses of recursive make

2016-04-20 Thread Martin Panter
Martin Panter added the comment: Looks pretty good. One more question: Why do you make the linking of _freeze_importlib conditional, but always build $(PGEN)? -- ___ Python tracker

[issue26809] `string` exposes ChainMap from `collections`

2016-04-20 Thread Martin Panter
Martin Panter added the comment: No strong opinion on changing the name to _ChainMap, as long as it only goes into 3.6. -- stage: -> patch review ___ Python tracker

Re: Detecting repeated subsequences of identical items

2016-04-20 Thread Ethan Furman
On 04/20/2016 08:57 PM, Ethan Furman wrote: > [snip same pattern as Steven wrote] Nevermind. It's obviously time for me to go to bed. :/ -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

[issue26808] wsgiref.simple_server breaks unicode in URIs

2016-04-20 Thread Graham Dumpleton
Graham Dumpleton added the comment: This gets even weirder. Gunicorn behaves same as wsgiref. However, it turns out they both only show the unexpected result if using curl. If you use safari they are both fine. Waitress blows up altogether on it with an exception when you use curl as

Re: Detecting repeated subsequences of identical items

2016-04-20 Thread Ethan Furman
On 04/20/2016 08:07 PM, Steven D'Aprano wrote: Now I want to group subsequences. For example, I have: "ABCABCABCDEABCDEFABCABCABCB" and I want to group it into repeating subsequences. I can see two ways to group it: ABC ABC ABCDE ABCDE F ABC ABC ABC B giving counts: (ABC) count = 2 (ABCDE)

[issue16679] Add advice about non-ASCII wsgiref PATH_INFO

2016-04-20 Thread Graham Dumpleton
Graham Dumpleton added the comment: As I commented on Issue 26808, it actually looks to me like the QUERY_STRING is processed fine and it is actually PATH_INFO that is not. I am confused at this point. I hate dealing with these WSGI level details now. :-( --

[issue26808] wsgiref.simple_server breaks unicode in URIs

2016-04-20 Thread Graham Dumpleton
Graham Dumpleton added the comment: There does appear to be something wrong with wsgiref, because with that rewritten code you should for: curl http://127.0.0.1:8000/тест get: pi: /тест qs: {} and for: curl http://127.0.0.1:8000/?a=тест get: pi: / qs: {'a': ['тест']} The PATH_INFO case

[issue26808] wsgiref.simple_server breaks unicode in URIs

2016-04-20 Thread Graham Dumpleton
Graham Dumpleton added the comment: Your code should be written as: res = """\ e: {} pi: {} qs: {} """.format( pprint.pformat(e), urllib.parse.unquote(e['PATH_INFO'].encode('Latin-1').decode('UTF-8')),

[issue16577] Suspect test.test_codeccallbacks.test_mutatingdecodehandler

2016-04-20 Thread Berker Peksag
Changes by Berker Peksag : -- stage: -> needs patch type: -> enhancement versions: +Python 3.6 ___ Python tracker ___

Re: Running lpr on windows from python

2016-04-20 Thread eryk sun
On Wed, Apr 20, 2016 at 9:58 AM, Tim Golden wrote: > If it's not, then try copying the lpr.exe to c:\windows\syswow64 and try > again. (Or to some other place to which you have access). WOW64 in Windows 7+ has a virtual "SysNative" directory that accesses the native 64-bit

Detecting repeated subsequences of identical items

2016-04-20 Thread Steven D'Aprano
I want to group repeated items in a sequence. For example, I can group repeated sequences of a single item at a time using groupby: from itertools import groupby for key, group in groupby("BBCDDEEE"): group = list(group) print(key, "count =", len(group)) outputs: A count = 4 B

[issue25461] Unclear language (the word ineffective) in the documentation for os.walk

2016-04-20 Thread Luiz Poleto
Luiz Poleto added the comment: The Doc/library/os.rst bit in the current patch fails to apply in all versions specified in this bug report (it seems that it was generated before the commit that included an earlier version of it). -- nosy: +luiz.poleto

Re: Failed install scipy lib

2016-04-20 Thread eryk sun
On Wed, Apr 20, 2016 at 8:04 AM, Oscar Benjamin wrote: > On 20 April 2016 at 12:30, wrote: > >> from ._ufuncs import * >> File "scipy\special\_ufuncs.pyx", line 1, in init scipy.special._ufuncs >> (scipy\special\_ufuncs.c:26242) >>

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-04-20 Thread Martin Panter
Martin Panter added the comment: The second patch looks reasonable (I left one minor grammar comment). About getproxies_environment(), I meant that if you set no_proxy="", it may be ignored if NO_PROXY=. . . is also set. E.g. if you already have these set: http_proxy=http://proxy

RE: Xlms namespace

2016-04-20 Thread Joaquin Alzola
>> The problem: >> test\ntest\ntest<{[£ EURO&%]}> >If I had to make a guess, you need to escape the <, >, and or else >they'll get parsed by the XML parser. Try sending >"test\ntest\ntest{[£ EURO%>]}" Yes it is the xml itself. Putting the and also the I can make it work with the desire

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2016-04-20 Thread Martin Panter
Martin Panter added the comment: If you decide to only do a Python implementation, the main reason to write a wrapper in C would be because the datetime class is defined in C. Similar to how the datetime_strptime() function in Modules/_datetimemodule.c imports and calls

Re: PEP proposal: sequence expansion support for yield statement: yield *

2016-04-20 Thread Steven D'Aprano
On Thu, 21 Apr 2016 05:34 am, Ken Seehart wrote: > Currently the common pattern for yielding the elements in a sequence is as > follows: > > for x in sequence: yield x > > I propose the following replacement (the result would be identical): > > yield *sequence Others have already pointed

[issue26811] segfault due to null pointer in tuple

2016-04-20 Thread random832
New submission from random832: I was writing something that iterates over all objects in gc.get_objects(). I don't know precisely where the offending tuple is coming from, but nearby objects in gc.get_objects() appear to be related to frozen_importlib. A tuple exists somewhere with a null

[issue26530] tracemalloc: add C API to manually track/untrack memory allocations

2016-04-20 Thread STINNER Victor
STINNER Victor added the comment: Nathaniel, Antoine: ping? -- ___ Python tracker ___ ___ Python-bugs-list

[issue23236] asyncio: add timeout to StreamReader read methods

2016-04-20 Thread Alexander Mohr
Alexander Mohr added the comment: any updates on this? I think this would be perfect for https://github.com/aio-libs/aiobotocore/issues/31 -- nosy: +thehesiod ___ Python tracker

[issue26810] inconsistent garbage collector behavior across platforms when using ctypes data-structures

2016-04-20 Thread Martin Panter
Martin Panter added the comment: You should write your program so that it does not release objects until they are no longer needed, then it can handle the garbage collector running at any time. But it is not clear to me what your offending null pointer is. Your code has lots of pointers that

Re: PEP proposal: sequence expansion support for yield statement: yield *

2016-04-20 Thread Chris Angelico
On Thu, Apr 21, 2016 at 8:26 AM, wrote: > Anyway, thanks for the link. And I suppose checking Python 3 for > implementation would be a good prior step as well! Sadly, "yield from" is not > in python 2.7, but it's presence in python 3.3 renders my proposal dead as a >

Re: PEP proposal: sequence expansion support for yield statement: yield *

2016-04-20 Thread kenseehart
On Wednesday, April 20, 2016 at 1:00:45 PM UTC-7, Ethan Furman wrote: > On 04/20/2016 12:34 PM, Ken Seehart wrote: > > New ideas for Python are typically vetted on Python Ideas. [1] > > > Currently the common pattern for yielding the elements in a sequence > > is as follows: > > > >for x in

[issue16679] Add advice about non-ASCII wsgiref PATH_INFO

2016-04-20 Thread Alexey Gorshkov
Alexey Gorshkov added the comment: I'm from Issue 26808. I'd like to see some explanation on: how about QUERY_STRING value? Why only PATH_INFO is encoded in such a manner, but QUERY_STRING is passed without any changes and does not requires any latin-1 to utf-8 recodings? -- nosy:

Re: Running lpr on windows from python

2016-04-20 Thread Stephen Hansen
On Wed, Apr 20, 2016, at 06:57 AM, loial wrote: > process = subprocess.Popen(commandline, shell=True, > stdout=subprocess.PIPE, stderr=subprocess.PIPE) > > where command line is > C:/windows/system32/lpr.exe -S 172.28.84.38 -P RAW C:/john/myfile Try making command line: commandline =

[issue26781] os.walk max_depth

2016-04-20 Thread Aviv Palivoda
Aviv Palivoda added the comment: I am not sure about the wide use of this feature but I do think this is a nice feature to add to os.walk. I can see how you can implement is_too_deep by counting the number of separators in the path. However I don't think it is trivial to do that. In addition

[issue26806] IDLE not displaying RecursionError tracebacks

2016-04-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: Interesting idea. We avoid the problem by adding something like the following to run.py _setrecursionlimit = sys.setrecursionlimit def setrecursionlimit(n): _setrecursionlimit(max(n, 50)) sys.setrecursionlimit = setrecursionlimit This works when entered

Re: PEP proposal: sequence expansion support for yield statement: yield *

2016-04-20 Thread Alan Evangelista
Currently the common pattern for yielding the elements in a sequence is as follows: for x in sequence: yield x I propose the following replacement (the result would be identical): yield *sequence imho the current syntax is much more intuitive, it is obvious to infer what it does by

Re: PEP proposal: sequence expansion support for yield statement: yield *

2016-04-20 Thread Ethan Furman
On 04/20/2016 12:34 PM, Ken Seehart wrote: New ideas for Python are typically vetted on Python Ideas. [1] Currently the common pattern for yielding the elements in a sequence > is as follows: for x in sequence: yield x I propose the following replacement (the result would be identical):

Re: PEP proposal: sequence expansion support for yield statement: yield *

2016-04-20 Thread Random832
On Wed, Apr 20, 2016, at 15:34, Ken Seehart wrote: > Currently the common pattern for yielding the elements in a sequence is > as follows: > > for x in sequence: yield x > > I propose the following replacement (the result would be identical): > > yield *sequence yield from sequence --

PEP proposal: sequence expansion support for yield statement: yield *

2016-04-20 Thread Ken Seehart
Currently the common pattern for yielding the elements in a sequence is as follows: for x in sequence: yield x I propose the following replacement (the result would be identical): yield *sequence The semantics are somewhat different from argument expansion (from which the syntax is

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-04-20 Thread Hans-Peter Jansen
Hans-Peter Jansen added the comment: Hi Martin, hi Senthil, please find a new patch attached, that incorporates your suggestions. * added a comment to get_proxies doc in urllib.rst * documented and fixed the mixed case scheme * added a note to proxy_bypass_environment, that behaves

[issue26803] syslog logging handler fails with address in unix abstract namespace

2016-04-20 Thread Xavier de Gaye
Xavier de Gaye added the comment: This patch corrects the non-ascii quote character in the Misc/NEWS diff. -- Added file: http://bugs.python.org/file42543/unix_abstract_namespace_3.patch ___ Python tracker

[issue26803] syslog logging handler fails with address in unix abstract namespace

2016-04-20 Thread Xavier de Gaye
Xavier de Gaye added the comment: Here is the patch. As a reference, issue #8373 with changeset 1f23bb74f4bc changed the AF_UNIX socket addresses encoding from UTF-8 to the file system encoding and the 'surrogateescape' error handler (PEP 383). -- Added file:

[issue26806] IDLE not displaying RecursionError tracebacks

2016-04-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: We can monkeypatch sys.setrecursionlimit() to set recursion limit to at least say 50. -- ___ Python tracker ___

[issue14102] argparse: add ability to create a man page

2016-04-20 Thread Alessandro Cucci
Alessandro Cucci added the comment: I would like to work on a patch if nobody currently are working on it. I'll keep you updated -- nosy: +acucci ___ Python tracker

[issue26806] IDLE not displaying RecursionError tracebacks

2016-04-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thanks for the investigation. I copied the limit from a python-ideas example and did not realize that IDLE adds so much to the call stack. I should add a bit on the subject to the IDLE doc in "3.2. IDLE-console differences". (It can also impact tracebacks

Re: Xlms namespace

2016-04-20 Thread sohcahtoa82
On Wednesday, April 20, 2016 at 10:05:02 AM UTC-7, Joaquin Alzola wrote: > Hi Guys > > I am currently doing this: > > IP client(Python) --> send SOAPXML request --> IP Server (Python) > > SOAP request: > http://schemas.xmlsoap.org/soap/envelope/; > xmlns:req="http:/ >

[issue26798] add BLAKE2 to hashlib

2016-04-20 Thread Christian Heimes
Christian Heimes added the comment: First experimental version of blake2b and blake2s for Python 3.6: https://github.com/tiran/cpython/commits/feature/blake2 The code is based on Dmitry Chestnykh's pyblake2 but modified to support argument clinic. I had to replace the macro magic with plain C

Xlms namespace

2016-04-20 Thread Joaquin Alzola
Hi Guys I am currently doing this: IP client(Python) --> send SOAPXML request --> IP Server (Python) SOAP request: http://schemas.xmlsoap.org/soap/envelope/; xmlns:req="http:/ /request.messagepush.interfaces.comviva.com" xmlns:xsd="http://request.messagepush.interfaces .comviva.com/xsd">

[issue26809] `string` exposes ChainMap from `collections`

2016-04-20 Thread Emanuel Barry
Changes by Emanuel Barry : Added file: http://bugs.python.org/file42541/ChainMap___all___2.patch ___ Python tracker ___

[issue26809] `string` exposes ChainMap from `collections`

2016-04-20 Thread leewz
leewz added the comment: Why not both? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue26809] `string` exposes ChainMap from `collections`

2016-04-20 Thread Emanuel Barry
Emanuel Barry added the comment: I added an underscore in front of ChainMap, but I kept the __all__ definition because I think it should be there regardless (like every module, basically). -- Added file: http://bugs.python.org/file42540/ChainMap___all__.patch

[issue26809] `string` exposes ChainMap from `collections`

2016-04-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Judging by the line “import re as _re”, somebody once tried to use the second > technique for the “string” module. So I think it is preferable to use this technique for ChainMap. -- nosy: +serhiy.storchaka ___

[issue26799] gdb support fails with "Invalid cast."

2016-04-20 Thread STINNER Victor
STINNER Victor added the comment: > The second option seems like the safest choice, attached is a patch that > addresses just that. Thanks, I applied your patch (your a bugfix, you forgot one "return" ;-)). I also inlined _type_void_ptr() into _sizeof_void_p(), since it was only called

[issue26799] gdb support fails with "Invalid cast."

2016-04-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset e4561aad29e6 by Victor Stinner in branch '2.7': Fix python-gdb.py: get C types on demand https://hg.python.org/cpython/rev/e4561aad29e6 New changeset 952c89a10be6 by Victor Stinner in branch '3.5': Issue #26799: Fix typo in Misc/NEWS

[issue26799] gdb support fails with "Invalid cast."

2016-04-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset e1c6f8895fd8 by Victor Stinner in branch '3.5': python-gdb.py: get C types at runtime https://hg.python.org/cpython/rev/e1c6f8895fd8 New changeset 6425728d8dc6 by Victor Stinner in branch 'default': Merge 3.5: Issue #26799

[issue26810] inconsistent garbage collector behavior across platforms when using ctypes data-structures

2016-04-20 Thread SilentGhost
Changes by SilentGhost : -- nosy: +amaury.forgeotdarc, belopolsky, meador.inge, pitrou ___ Python tracker ___

[issue26810] inconsistent garbage collector behavior across platforms when using ctypes data-structures

2016-04-20 Thread unsec treedee
New submission from unsec treedee: The garbage collector is not behaving consistently across platforms for python 2.7.11. I realize that the example code and style is not proper :-) On the Mac OSX platform this code runs without the garbage collector "cleaning house" and there is no

[issue2636] Adding a new regex module (compatible with re)

2016-04-20 Thread Roman Evstifeev
Changes by Roman Evstifeev : -- nosy: +Roman.Evstifeev ___ Python tracker ___ ___

[issue26799] gdb support fails with "Invalid cast."

2016-04-20 Thread Thomas
Thomas added the comment: The second option seems like the safest choice, attached is a patch that addresses just that. -- keywords: +patch Added file: http://bugs.python.org/file42538/gdb-python-invalid-cast.patch ___ Python tracker

[ANN] arclib 0.1 released!

2016-04-20 Thread Ryan Gonzalez
I'm happy to announce the very first release of arclib! https://github.com/kirbyfan64/arclib To quote the README: arclib aims at providing a unified API for accessing Python's archive formats. In particular, it provides the following APIs: - Basic, one-shot: For gzip, bzip2, and LZMA. Supports

Re: Creating Dict of Dict of Lists with joblib and Multiprocessing

2016-04-20 Thread Michael Selik
On Wed, Apr 20, 2016 at 10:50 AM Sims, David (NIH/NCI) [C] < david.si...@nih.gov> wrote: > Hi, > > Cross posted at > http://stackoverflow.com/questions/36726024/creating-dict-of-dicts-with-joblib-and-multiprocessing, > but thought I'd try here too as no responses there so far. > > A bit new to

Re: Failed install scipy lib

2016-04-20 Thread Gonzalo V
oscar instálate mejor anaconda y listo. Saludos, Gonzalo 2016-04-20 10:04 GMT-03:00 Oscar Benjamin : > On 20 April 2016 at 12:30, wrote: > > On Wednesday, April 20, 2016 at 2:09:10 PM UTC+3, liran@gmail.com > wrote: > >> On Tuesday,

Re: Running lpr on windows from python

2016-04-20 Thread Tim Golden
On 20/04/2016 15:21, loial wrote: > As I said, the lpr command works fine from the command prompt but not from > python. Sorry; I did miss that. > Everything is 64-bit (windows server 2012). > Is the Python installation also 64-bit? c:\python27\python.exe -c "import platform; print

Creating Dict of Dict of Lists with joblib and Multiprocessing

2016-04-20 Thread Sims, David (NIH/NCI) [C]
Hi, Cross posted at http://stackoverflow.com/questions/36726024/creating-dict-of-dicts-with-joblib-and-multiprocessing, but thought I'd try here too as no responses there so far. A bit new to python and very new to parallel processing in python. I have a script that will process a datafile

[issue26717] wsgiref.simple_server: mojibake with cp1252 bytes in PATH_INFO

2016-04-20 Thread Anthony Sottile
Anthony Sottile added the comment: PEP states that environ variables are str variables decoded using latin1: https://www.python.org/dev/peps/pep-/#id19 Therefore, to get the original bytes, one must encode using latin1 On Apr 20, 2016 3:46 AM, "Александр Эри"

Re: Running lpr on windows from python

2016-04-20 Thread loial
I get the same issue if I just specify "lpr" rather than a full path, i.e. it works from the command prompt(with forward slashes), but not from python -- https://mail.python.org/mailman/listinfo/python-list

Re: Running lpr on windows from python

2016-04-20 Thread loial
As I said, the lpr command works fine from the command prompt but not from python. Everything is 64-bit (windows server 2012). -- https://mail.python.org/mailman/listinfo/python-list

[issue23496] Steps for Android Native Build of Python 3.4.2

2016-04-20 Thread Roman Evstifeev
Changes by Roman Evstifeev : -- nosy: +Roman.Evstifeev ___ Python tracker ___ ___

[issue20116] urlparse.parse_qs should take argument for query separator

2016-04-20 Thread Ruben D. Orduz
Ruben D. Orduz added the comment: Hi all, OP here. My intent was to optionally pass a separator parameter, _not_ enable/disable toggle. -- ___ Python tracker

Re: Running lpr on windows from python

2016-04-20 Thread Tim Golden
On 20/04/2016 14:57, loial wrote: > I am trying to run lpr from python 2.7.10 on windows > > However I always get the error > 'C:/windows/system32/lpr.exe ' is not recognized as an internal or external > command, > operable program or batch file. > > Even though typing the same at the command

Re: Running lpr on windows from python

2016-04-20 Thread Random832
On Wed, Apr 20, 2016, at 09:57, loial wrote: > I am trying to run lpr from python 2.7.10 on windows > > However I always get the error > 'C:/windows/system32/lpr.exe ' is not recognized as an internal or > external command, > operable program or batch file. > > Even though typing the same at the

[issue20116] urlparse.parse_qs should take argument for query separator

2016-04-20 Thread Luiz Poleto
Luiz Poleto added the comment: Based on the example provided by the OP, it appears that he would expect the output to be: {'family': ['citrus'], 'fruits': ['lemon;lime']} Since the W3C recommendation for the application/x-www-form-urlencoded type specify using '&' to separate the parameters in

Re: Running lpr on windows from python

2016-04-20 Thread Chris Angelico
On Wed, Apr 20, 2016 at 11:57 PM, loial wrote: > I am trying to run lpr from python 2.7.10 on windows > > However I always get the error > 'C:/windows/system32/lpr.exe ' is not recognized as an internal or external > command, > operable program or batch file. > > Even

[issue26803] syslog logging handler fails with address in unix abstract namespace

2016-04-20 Thread Xavier de Gaye
Xavier de Gaye added the comment: I will give it a try. -- ___ Python tracker ___ ___ Python-bugs-list

Running lpr on windows from python

2016-04-20 Thread loial
I am trying to run lpr from python 2.7.10 on windows However I always get the error 'C:/windows/system32/lpr.exe ' is not recognized as an internal or external command, operable program or batch file. Even though typing the same at the command prompt works OK Any ideas? I am using

[issue26803] syslog logging handler fails with address in unix abstract namespace

2016-04-20 Thread STINNER Victor
STINNER Victor added the comment: > Then it seems that makesockaddr() should be fixed instead of the logging > handler. Yes. That's why I didn't understand the issue at the beginning :-) Would you like to work on fixing the _socket module? It may be worth to keep your syslog unit test. It's

[issue26803] syslog logging handler fails with address in unix abstract namespace

2016-04-20 Thread Xavier de Gaye
Xavier de Gaye added the comment: Then it seems that makesockaddr() should be fixed instead of the logging handler. -- ___ Python tracker ___

[issue26803] syslog logging handler fails with address in unix abstract namespace

2016-04-20 Thread Xavier de Gaye
Xavier de Gaye added the comment: makesockaddr() in socketmodule.c calls PyBytes_FromStringAndSize() when the first byte is a null byte. My opinion is not worth much in this matter :). The socket documentation does say that AF_UNIX addresses are "represented as a string, using the file system

[issue26803] syslog logging handler fails with address in unix abstract namespace

2016-04-20 Thread STINNER Victor
STINNER Victor added the comment: > However it is possible that PyUnicode_DecodeFSDefault() fails for some file system encodings when the encoded address contains null bytes ? No, it's not possible. Undecode bytes are escaped as surrogate characters using the surrogateescape error handler. See

[issue26809] `string` exposes ChainMap from `collections`

2016-04-20 Thread Emanuel Barry
Emanuel Barry added the comment: Thanks SilentGhost, seems my brain decided not to see uppercase names :) Attached patch adds Formatter and Template as well. -- Added file: http://bugs.python.org/file42537/string___all___2.patch ___ Python tracker

[issue26809] `string` exposes ChainMap from `collections`

2016-04-20 Thread SilentGhost
SilentGhost added the comment: > Silent Ghost: perhaps you were thinking of Issue 23883 (adding to __all__ in > various modules). This case is the opposite: we want to limit the exported > names. It was one of mine, issue 10895. Been dead for a while now. --

[issue26809] `string` exposes ChainMap from `collections`

2016-04-20 Thread Emanuel Barry
Emanuel Barry added the comment: Patch fixes this the proper way by defining __all__ in the string module. -- keywords: +patch nosy: +ebarry Added file: http://bugs.python.org/file42536/string___all__.patch ___ Python tracker

[issue26809] `string` exposes ChainMap from `collections`

2016-04-20 Thread Martin Panter
Martin Panter added the comment: Okay looks like I was mistaken about dir(). It ignores __all__, and just gives you everything. But the star-import point is still valid :) -- ___ Python tracker

[issue26809] `string` exposes ChainMap from `collections`

2016-04-20 Thread leewz
leewz added the comment: (Never mind that last bit. I see it now.) > I agree that the namespace pollution is a valid bug. It affects “from string > import *” and dir(string). How do I get this behavior for `dir`? I get '_re' in `dir(string)`. --

[issue26809] `string` exposes ChainMap from `collections`

2016-04-20 Thread leewz
leewz added the comment: > The fact that ChainMap pollutes namespace when doing star import ("from > string import *"), however, is unfortunate. This is what I meant by "this kind of thing". (IPython also ignores underscored names for autocomplete suggestions, unless you start with an

[issue26808] wsgiref.simple_server breaks unicode in URIs

2016-04-20 Thread Александр Эри
Александр Эри added the comment: My browser encodes url in utf-8. To resolve this bug we need to look in web standards, not in pep. -- ___ Python tracker

Re: Failed install scipy lib

2016-04-20 Thread Oscar Benjamin
On 20 April 2016 at 12:30, wrote: > On Wednesday, April 20, 2016 at 2:09:10 PM UTC+3, liran@gmail.com wrote: >> On Tuesday, April 19, 2016 at 9:21:42 PM UTC+3, eryk sun wrote: >> > On Tue, Apr 19, 2016 at 12:05 PM, Oscar Benjamin >> >

[issue26809] `string` exposes ChainMap from `collections`

2016-04-20 Thread Martin Panter
Martin Panter added the comment: I agree that the namespace pollution is a valid bug. It affects “from string import *” and dir(string). Normally, modules either define __all__ listing their exported names, or they are really careful to define non-exported names beginning with underscores

[issue26803] syslog logging handler fails with address in unix abstract namespace

2016-04-20 Thread STINNER Victor
STINNER Victor added the comment: Xavier de Gaye added the comment: > when self.server_address is a string and contains a null byte, then > getsockname() returns a bytes object. Ah? It sounds strange to me that the type of getsockname() depends on the NULL byte. I would also expect a Unicode

[issue26808] wsgiref.simple_server breaks unicode in URIs

2016-04-20 Thread Martin Panter
Martin Panter added the comment: I think this is already covered in Issue 16679. PEP says it’s meant to work this way. I admit it is very quirky. See also Issue 22264 discussing future enhancements. -- nosy: +martin.panter resolution: -> duplicate status: open -> closed

[issue26807] mock_open()().readline() fails at EOF

2016-04-20 Thread Yolanda
Yolanda added the comment: diff --git a/Lib/unittest/mock.py b/Lib/unittest/mock.py index 7400fb7..9e47cd2 100644 --- a/Lib/unittest/mock.py +++ b/Lib/unittest/mock.py @@ -991,7 +991,10 @@ class CallableMixin(Base): raise effect if not _callable(effect): -

Just-in-Time Static Type Checking for Dynamic Languages

2016-04-20 Thread Neal Becker
I saw this article, which might interest some of you. It discusses application to ruby, but perhaps might have ideas useful for python. https://arxiv.org/abs/1604.03641 -- https://mail.python.org/mailman/listinfo/python-list

[issue20001] pathlib inheritance diagram too large

2016-04-20 Thread Berker Peksag
Changes by Berker Peksag : -- keywords: +easy stage: -> needs patch type: -> enhancement versions: +Python 3.5, Python 3.6 -Python 3.4 ___ Python tracker

[issue26809] `string` exposes ChainMap from `collections`

2016-04-20 Thread SilentGhost
SilentGhost added the comment: I wouldn't say it matter, "from configparser import _ChainMap" works too, but that's just how imports work in Python. There is not reason to do what you've done on purpose - ChainMap is undocumented and is clearly just a detail of implementation. The fact that

Re: djqgrid 0.2.4 error import json_helpers

2016-04-20 Thread Chris Angelico
On Wed, Apr 20, 2016 at 9:00 PM, asimkon . wrote: > Inside my templatetags folder (djqgrid.py), i have the following commands: > > from django import template > from djqgrid import json_helpers > > Any idea to get a solution ? > You're attempting to import from yourself,

Re: Failed install scipy lib

2016-04-20 Thread liran . maymoni
On Wednesday, April 20, 2016 at 2:09:10 PM UTC+3, liran@gmail.com wrote: > On Tuesday, April 19, 2016 at 9:21:42 PM UTC+3, eryk sun wrote: > > On Tue, Apr 19, 2016 at 12:05 PM, Oscar Benjamin > > wrote: > > > On 19 Apr 2016 17:01, wrote: >

[issue26809] `string` exposes ChainMap from `collections`

2016-04-20 Thread leewz
New submission from leewz: I don't know if this kind of thing matters, but `from string import ChainMap` works (imports from `collections). It's used internally by `string`. This was done when ChainMap was made official:

[issue26808] wsgiref.simple_server breaks unicode in URIs

2016-04-20 Thread Alexey Gorshkov
Alexey Gorshkov added the comment: also attaching same print output in console -- Added file: http://bugs.python.org/file42535/Screenshot from 2016-04-20 14-28-03.png ___ Python tracker

  1   2   >