Dunder variables

2018-01-08 Thread Frank Millman
Hi all I have read that one should not call dunder methods in application code. Does the same apply to dunder variables? I am thinking of the instance attribute __dict__, which allows access to the contents of the instance. I only want to read from __dict__, not update it. Is this frowned

[issue32123] Make the API of argparse.HelpFormatter public

2018-01-08 Thread paul j3
paul j3 added the comment: To elaborate on my last comment, the existing subclasses that customize formatting modify _fill_text _split_lines _get_help_string _get_default_metavar_for_optional _get_default_metavar_for_positional those are all 'private' methods. --

[issue32474] argparse nargs should support string wrapped integers too

2018-01-08 Thread paul j3
paul j3 added the comment: In https://bugs.python.org/issue11354 'argparse: nargs could accept range of options count' I explored the option allowing regex style range arguments, such as nargs='{2,4}' or an equivalent tuple nargs=(2,4). But that builds on

[issue32517] test_read_pty_output() of test_asyncio hangs on macOS 10.13.2 (darwin 17.3.0)

2018-01-08 Thread Ned Deily
Change by Ned Deily : -- nosy: +mattbillenstein ___ Python tracker ___ ___ Python-bugs-list

[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2018-01-08 Thread Tom Karzes
Tom Karzes added the comment: I'm dismayed to see that this bug was reported in 2010, yet as of January 2018 has not yet been fixed. This option parsing behavior is contrary to Unix option passing conventions. I certainly don't mind enhancements, but the last thing that

[issue32521] NIS module fails to build due to the removal of interfaces related to Sun RPC from glibc.

2018-01-08 Thread Benjamin Peterson
Benjamin Peterson added the comment: I think this is a duplicate of #32007. -- nosy: +benjamin.peterson ___ Python tracker ___

How to create "transitional" package?

2018-01-08 Thread INADA Naoki
Hi, all. Yesterday, I released msgpack-0.5, which was msgpack-python. Both packages provide "msgpack" python package. I used msgpack in early days, but easy_install crawling website and download msgpack-1.0.0.tar.gz, which is msgpack for C instead of Python package I upload to PyPI. So I renamed

[issue32518] HTTPServer can't deal with persistent connection properly

2018-01-08 Thread 杨鹏
杨鹏 added the comment: OK,i got it. thanks for your reply. But i have to say, the BaseHTTPServer document is kind of confusing. It claims to support persistent connection, but actually it hangs with such situation, i can't even shut it down with shudown() method. After

[issue32232] building extensions as builtins is broken in 3.7

2018-01-08 Thread Ned Deily
Ned Deily added the comment: Can someone provide a pull request and a test for this prior to beta 1? -- ___ Python tracker ___

Re: Native object exposing buffer protocol

2018-01-08 Thread breamoreboy
On Saturday, January 6, 2018 at 12:02:18 AM UTC, Rob Gaddi wrote: > I'd like to create a native Python object that exposes the buffer > protocol. Basically, something with a ._data member which is a > bytearray that I can still readinto, make directly into a numpy array, etc. > > I can do it

Re: How do I send keystrokes to a console window in Windows XP?

2018-01-08 Thread zxymike93
在 2005年7月16日星期六 UTC+8下午8:46:34,Benji York写道: > googlegro...@garringer.net wrote: > > How do I use Python to send keystrokes to a console window in Windows > > XP? > > import win32com.client > > shell = win32com.client.Dispatch("WScript.Shell") > shell.AppActivate("Command Prompt") > >

[issue32248] Port importlib_resources (module and ABC) to Python 3.7

2018-01-08 Thread Ned Deily
Change by Ned Deily : -- pull_requests: +4998 ___ Python tracker ___ ___ Python-bugs-list

Re: Native object exposing buffer protocol

2018-01-08 Thread Rob Gaddi
On 01/05/2018 04:27 PM, Ben Finney wrote: Rob Gaddi writes: I'd like to create a native Python object that exposes the buffer protocol. Basically, something with a ._data member which is a bytearray that I can still readinto, make directly into a numpy

fun with cwrap: Unknown type kind 114

2018-01-08 Thread Etienne Robillard
Dear Eli, Can you please take a look at: https://bitbucket.org/tkadm30/libuwsgictl/raw/048978bf2b51b1185302da98c5063978061293df/tests/cwrap/error I'm playing around with cwrap: https://github.com/geggo/cwrap Looks like this *gem* can generate Cython pxd files from C headers using libclang.

[issue32518] HTTPServer can't deal with persistent connection properly

2018-01-08 Thread Martin Panter
Change by Martin Panter : -- superseder: HTTPServer can't deal with persistent connection properly -> http.server and SimpleHTTPServer hang after a few requests ___ Python tracker

[issue32521] NIS module fails to build due to the removal of interfaces related to Sun RPC from glibc.

2018-01-08 Thread Christian Heimes
Christian Heimes added the comment: I modified setup.py to look for libtirpc. In case the library is detected, it's added as dependency and /usr/include/tirpc is included in search path. -- assignee: christian.heimes -> stage: patch review -> versions: -Python

Re: Why does __ne__ exist?

2018-01-08 Thread Chris Angelico
On Tue, Jan 9, 2018 at 3:25 AM, Cody Piersall wrote: >> Let's put it this way. Suppose that __eq__ existed and __ne__ didn't, >> just like with __contains__. Go ahead: sell the notion of __ne__. >> Pitch it, show why we absolutely need to allow this. Make sure you >>

Re: : ✨✨ python 2018 wiki - a piece of cake ✨✨ --- 

2018-01-08 Thread alister via Python-list
On Mon, 08 Jan 2018 15:55:00 +, user net wrote: > Abdur-Rahmaan Janhangeer: >> there is a language called python by guido >> >> you can ask your questions here ! > > > > ✨✨ python - a piece of cake ✨✨ > > > when u read this post in thunderbird or torBrowser, you see colored >

Re: Why does __ne__ exist?

2018-01-08 Thread Antoon Pardon
Op 08-01-18 om 17:25 schreef Cody Piersall: >> Let's put it this way. Suppose that __eq__ existed and __ne__ didn't, >> just like with __contains__. Go ahead: sell the notion of __ne__. >> Pitch it, show why we absolutely need to allow this. Make sure you >> mention the potential confusion when

[issue31963] AMD64 Debian PGO 3.x buildbot: compilation failed with an internal compiler error in create_edge

2018-01-08 Thread Neil Schemenauer
Neil Schemenauer added the comment: That's mysterious. I reviewed the 'stdout' log from the buildbot. The removal of profile data is run early in the build: find . -name '*.gc??' -exec rm -f {} ';' Later, the bytearrayobject is compiled with profile generation

Re: Plot map wit a white and black box

2018-01-08 Thread breamoreboy
On Monday, January 8, 2018 at 1:16:08 PM UTC, jorge@cptec.inpe.br wrote: > Hi, > > Please, I woudl like to plot a map like this figure. How can I do this > using Python2.7 > > Thanks, > > Conrado Figures don't get through and you've all ready asked this question, possibly on another

[issue28009] core logic of uuid.getnode() is broken for AIX - all versions

2018-01-08 Thread Michael Felt
Michael Felt added the comment: On 08/01/2018 17:22, Michael wrote: > On 08/01/2018 16:07, Michael Felt wrote: >> Michael Felt added the comment: >> >> Considering that _uuid is now working for AIX issue32399 - some time differences - this is on

[issue32521] NIS module fails to build due to the removal of interfaces related to Sun RPC from glibc.

2018-01-08 Thread Christian Heimes
Change by Christian Heimes : -- keywords: +patch pull_requests: +4997 stage: -> patch review ___ Python tracker ___

[issue32521] NIS module fails to build due to the removal of interfaces related to Sun RPC from glibc.

2018-01-08 Thread Christian Heimes
Change by Christian Heimes : -- assignee: -> christian.heimes nosy: +christian.heimes ___ Python tracker ___

[issue32521] NIS module fails to build due to the removal of interfaces related to Sun RPC from glibc.

2018-01-08 Thread STINNER Victor
STINNER Victor added the comment: > The header is located at /usr/include/tirpc/rpc/rpc.h configure.ac should be modified to detect tirpc is installed. If yes, setup.py should add /usr/include/tirpc/ to includes to build the "nis" module. --

[issue32521] NIS module fails to build due to the removal of interfaces related to Sun RPC from glibc.

2018-01-08 Thread Charalampos Stratakis
Charalampos Stratakis added the comment: The header is located at /usr/include/tirpc/rpc/rpc.h -- ___ Python tracker ___

[issue32521] NIS module fails to build due to the removal of interfaces related to Sun RPC from glibc.

2018-01-08 Thread Charalampos Stratakis
Charalampos Stratakis added the comment: Already tried. Unfortunately it doesn't. -- ___ Python tracker ___

[issue32521] NIS module fails to build due to the removal of interfaces related to Sun RPC from glibc.

2018-01-08 Thread STINNER Victor
STINNER Victor added the comment: Do you know if installing libtirpc-devel does install required rpc/rpc.h / fixes the issue? -- ___ Python tracker

[issue32521] NIS module fails to build due to the removal of interfaces related to Sun RPC from glibc.

2018-01-08 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner ___ Python tracker ___ ___

[issue32521] NIS module fails to build due to the removal of interfaces related to Sun RPC from glibc.

2018-01-08 Thread Charalampos Stratakis
Change by Charalampos Stratakis : -- title: NIS module fails to build due to the remove of interfaces related to Sun RPC from glibc. -> NIS module fails to build due to the removal of interfaces related to Sun RPC from glibc.

[issue32521] NIS module fails to build due to the remove of interfaces related to Sun RPC from glibc.

2018-01-08 Thread Charalampos Stratakis
New submission from Charalampos Stratakis : Currently on the development branch of Fedora (28), an upstream change of glibc is being pushed where the Sun RPC support is removed from our downstream glibc package in favor of the libtirpc library. More details [0]. As a

Re: Why does __ne__ exist?

2018-01-08 Thread Cody Piersall
> Let's put it this way. Suppose that __eq__ existed and __ne__ didn't, > just like with __contains__. Go ahead: sell the notion of __ne__. > Pitch it, show why we absolutely need to allow this. Make sure you > mention the potential confusion when subclassing. Be sure to show why > it's okay for

[issue28009] core logic of uuid.getnode() is broken for AIX - all versions

2018-01-08 Thread Michael Felt
Michael Felt added the comment: On 08/01/2018 16:07, Michael Felt wrote: > Michael Felt added the comment: > > Considering that _uuid is now working for AIX issue32399 - I need to get some > things straight (aka some help please). > > Does uuid.py

[issue32520] error writing to file in binary mode - python 3.6.3

2018-01-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: print() converts all its arguments to string by calling str(). The resulting strings are written to the output file. print(bin_buff, file=fp) is equivalent to fp.write(str(bin_buff)) fp.write('\n') If you will run

[issue32174] nonASCII punctuation characters can not display in python363.chm.

2018-01-08 Thread wwq
wwq added the comment: I found the problem was not fixed on python364.chm but it show well on python362.chm, maybe the python.org official config was a change to let the coding error. -- nosy: +wwqgtxx ___ Python tracker

[issue31993] pickle.dump allocates unnecessary temporary bytes / str

2018-01-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'll create a separate PR for the memoroview issue after merging PR 5114. -- ___ Python tracker

[issue32520] error writing to file in binary mode - python 3.6.3

2018-01-08 Thread jeff deifik
New submission from jeff deifik : I am running python 3.6.3 on cygwin / windows. Here is a test program to demonstrate the bug: #!/usr/bin/env python3 fp = open("bug_out.txt", "ab") buff = 'Hello world' print('type of buff is', type(buff)) bin_buff = bytes(buff, 'utf-8')

Re: : ✨✨ python 2018 wiki - a piece of cake ✨✨ --- 

2018-01-08 Thread Abdur-Rahmaan Janhangeer
there is a language called python by guido you can ask your questions here ! On 5 Jan 2018 23:30, "Kim of K." wrote: > OK now we have emoji in XPN > > > but not in colour like in torBrowser... > > > :-( > > >  > -- > https://mail.python.org/mailman/listinfo/python-list

[issue32517] test_read_pty_output() of test_asyncio hangs on macOS 10.13.2 (darwin 17.3.0)

2018-01-08 Thread STINNER Victor
Change by STINNER Victor : -- title: test_read_pty_output() of test_asyncio hangs on x86-64 Sierra 3.6 -> test_read_pty_output() of test_asyncio hangs on macOS 10.13.2 (darwin 17.3.0) ___ Python tracker

Re: Why does __ne__ exist?

2018-01-08 Thread Antoon Pardon
Op 08-01-18 om 00:53 schreef Ethan Furman: > On 01/07/2018 12:33 PM, Chris Angelico wrote: > > Actually, I think it is why it exists.  If I recall correctly, the > addition of the six comparative operators* was added at the behest of > the scientific/numerical community. Which personnaly, I think

Re: Why does __ne__ exist?

2018-01-08 Thread Oren Ben-Kiki
Good points. Well, this is pretty academic at this point - I don't think anyone would seriously choose to obsolete __ne__, regardless of whether it is absolutely necessary or not. On Mon, Jan 8, 2018 at 4:51 PM, Thomas Jollans wrote: > On 2018-01-08 15:25, Oren Ben-Kiki wrote: > >

[issue28009] core logic of uuid.getnode() is broken for AIX - all versions

2018-01-08 Thread Michael Felt
Michael Felt added the comment: Considering that _uuid is now working for AIX issue32399 - I need to get some things straight (aka some help please). Does uuid.py (./Lib/uuid.py) call _uuid.py? If not, I am curious how _uuid.c is used - because ./Lib/test/test_uuid.py

[issue32519] venv API docs - symlinks default incorrect

2018-01-08 Thread Jason R. Coombs
New submission from Jason R. Coombs : In the API docs for EnvBuilder.symlinks, it states "Defaults to True on Linux and Unix systems, but False on Windows." But in fact, the implementation takes the value passed, which always defaults to False. It's only on the command-line

Re: Why does __ne__ exist?

2018-01-08 Thread Thomas Jollans
On 2018-01-08 15:25, Oren Ben-Kiki wrote: > I don't see a case in IEEE where (x == y) != !(x != y). > There _is_ a case where (x != x) is true (when x is NaN), but for such an > x, (x == x) will be false. > > I am hard pressed to think of a case where __ne__ is actually useful. See my earlier

[issue32493] UUID Module - FreeBSD build failure

2018-01-08 Thread Michael Felt
Michael Felt added the comment: On 08/01/2018 12:47, David Carlier wrote: > David Carlier added the comment: > > Perfect. That solves in the process OpenBSD uuid module build too. > > -- p.s. I did not 'invent' unsigned32 - just took the

Re: Why does __ne__ exist?

2018-01-08 Thread Oren Ben-Kiki
Ugh, right, for NaN you can have (x < y) != (x >= y) - both would be false if one of x and y is a NaN. But __ne__ is still useless ;-) On Mon, Jan 8, 2018 at 4:36 PM, Thomas Nyberg wrote: > On 01/08/2018 03:25 PM, Oren Ben-Kiki wrote: > > I am hard pressed to think of a case

[issue32517] test_read_pty_output() of test_asyncio hangs on x86-64 Sierra 3.6

2018-01-08 Thread Ronald Oussoren
Ronald Oussoren added the comment: The darwin version change is likely due to an upgrade from macOS 10.13.1 to 10.13.2. The user change can be due to the introduction of a new system user, but I don't know when user _timed was introduced and don't have 10.3 VMs other

Re: Why does __ne__ exist?

2018-01-08 Thread Thomas Nyberg
On 01/08/2018 03:25 PM, Oren Ben-Kiki wrote: > I am hard pressed to think of a case where __ne__ is actually useful. Assuming you're talking about a case specifically for IEEE 754, I'm starting to agree. In general, however, it certainly is useful for some numpy objects (as mentioned elsewhere in

Re: Why does __ne__ exist?

2018-01-08 Thread Oren Ben-Kiki
I don't see a case in IEEE where (x == y) != !(x != y). There _is_ a case where (x != x) is true (when x is NaN), but for such an x, (x == x) will be false. I am hard pressed to think of a case where __ne__ is actually useful. That said, while it is true you only need one of (__eq__, __ne__),

Re: Why does __ne__ exist?

2018-01-08 Thread Thomas Nyberg
On 01/08/2018 12:36 PM, Thomas Jollans wrote: > > Interesting sentence from that PEP: > > "3. The == and != operators are not assumed to be each other's > complement (e.g. IEEE 754 floating point numbers do not satisfy this)." > > Does anybody here know how IEE 754 floating point numbers need

Re: has sourceforge exposed the dirty little secret ?

2018-01-08 Thread Abdur-Rahmaan Janhangeer
fuel the troll ** poor py ** On 5 Jan 2018 20:30, "Kim of K." wrote: > > "Background > > We feel that the world still produces way too much software that is > frankly substandard. The reasons for this are pretty simple: software > producers do not pay enough attention [...]" > >

Plot map wit a white and black box

2018-01-08 Thread jorge . conrado
Hi, Please, I woudl like to plot a map like this figure. How can I do this using Python2.7 Thanks, Conrado -- https://mail.python.org/mailman/listinfo/python-list

[issue32518] HTTPServer can't deal with persistent connection properly

2018-01-08 Thread R. David Murray
R. David Murray added the comment: Yes, I would say it is. Note that this isn't going to get "fixed" in 2.7, because 2.7 doesn't get new features, and the proposed change to the CLI is a new feature. As noted in that issue discussion we aren't going to change the

[issue26959] pickle: respect dispatch for functions again

2018-01-08 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker ___

Re: Why does __ne__ exist?

2018-01-08 Thread Thomas Jollans
On 2018-01-08 01:31, breamore...@gmail.com wrote: > On Monday, January 8, 2018 at 12:02:09 AM UTC, Ethan Furman wrote: >> On 01/07/2018 12:33 PM, Chris Angelico wrote: >>> On Mon, Jan 8, 2018 at 7:13 AM, Thomas Jollans wrote: On 07/01/18 20:55, Chris Angelico wrote: > Under what

[issue32493] UUID Module - FreeBSD build failure

2018-01-08 Thread David Carlier
David Carlier added the comment: Perfect. That solves in the process OpenBSD uuid module build too. -- ___ Python tracker ___

[issue32493] UUID Module - FreeBSD build failure

2018-01-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Seems to be in inttypes.h: https://www.ibm.com/support/knowledgecenter/en/ssw_aix_71/com.ibm.aix.files/inttypes.h.htm -- ___ Python tracker

[issue32493] UUID Module - FreeBSD build failure

2018-01-08 Thread Michael Felt
Michael Felt added the comment: On 05/01/2018 13:38, Antoine Pitrou wrote: > Antoine Pitrou added the comment: > > Michael, does AIX have uint32_t? If so, we could happily drop the unsigned32 > reference. Yes, AIX has unit32_t.

[issue32518] HTTPServer can't deal with persistent connection properly

2018-01-08 Thread Martin Panter
Martin Panter added the comment: Perhaps this can be treated as a duplicate of Issue 31639. -- nosy: +martin.panter ___ Python tracker

[issue32518] HTTPServer can't deal with persistent connection properly

2018-01-08 Thread 杨鹏
New submission from 杨鹏 : when client is using persistent connection, HTTPServer will hang with that connection. As a result, it can't deal with other clients. -- components: Library (Lib) messages: 309659 nosy: 杨鹏 priority: normal pull_requests: 4996 severity: