[issue29890] Constructor of ipaddress.IPv*Interface does not follow documentation

2017-03-25 Thread Eric V. Smith
Eric V. Smith added the comment: While an IPv4Interface may be a subclass of an IPv4Address, it definitely has more information attached to it: the netmask of the network it's on. So an interface (like a network) needs to allow additional parameters to specify the netmask. It should be true

[issue29900] Remove unneeded wrappers in pathlib

2017-03-25 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Since functions in the os module support path-like objects, the code of the pathlib module can be simplified. The wrappers that explicitly convert Path to str no longer needed. -- components: Library (Lib) messages: 290468 nosy: pitrou,

[issue29900] Remove unneeded wrappers in pathlib

2017-03-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +720 ___ Python tracker ___ ___

should i kill these two process with python?

2017-03-25 Thread Ho Yeung Lee
TCP127.0.0.1:1663 127.0.0.1:28091ESTABLISHED 9900 TCP127.0.0.1:28091127.0.0.1:1663 ESTABLISHED 9532 above two process connect to itself, named ismagent and updateui.exe are they the malware software? TCP127.0.0.1:1663

Re: should i kill these two process with python?

2017-03-25 Thread Chris Angelico
On Sat, Mar 25, 2017 at 7:41 PM, Ho Yeung Lee wrote: > TCP127.0.0.1:1663 127.0.0.1:28091ESTABLISHED 9900 > TCP127.0.0.1:28091127.0.0.1:1663 ESTABLISHED 9532 > > above two process connect to itself, named ismagent and

[issue29737] Optimize concatenating empty tuples

2017-03-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The PR already was merged when you wrote your comment Raymond. If you insist I can revert it. But 0f7b0b397e12514ee213bc727c9939b66585cbe2 depends on it. -- ___ Python tracker

[issue29898] PYTHONLEGACYWINDOWSIOENCODING isn't implemented

2017-03-25 Thread Eryk Sun
Eryk Sun added the comment: I prefer the name PYTHONLEGACYWINDOWSIOENCODING for symmetry with both PYTHONIOENCODING and PYTHONLEGACYWINDOWSFSENCODING, but I suppose you changed it to make it more visually distinguished from the latter. I discovered this issue due to the modified behavior of

why and how to run forever and debug when error in for proc in psutil.process_iter()?

2017-03-25 Thread Ho Yeung Lee
expect below to run forever and keep running a fixed number of thread in python would like to kill tasks when process connect internet except chrome and explorer.exe i do this because MalwareBytes can not disconnect these existing trojan when my notebook connect internet after run a few

[issue29901] Support path-like objects in zipapp

2017-03-25 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Proposed patch simplifies support of pathlib.Path in zipapp. As a side effect zipapp now supports other path-like objects, not just pathlib.Path. -- components: Library (Lib) messages: 290470 nosy: paul.moore, serhiy.storchaka priority: normal

[issue29901] Support path-like objects in zipapp

2017-03-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue29533] urllib2 works slowly with proxy on windows

2017-03-25 Thread Julia Dolgova
Julia Dolgova added the comment: Could someone look into my PR, please... -- ___ Python tracker ___ ___

[issue29737] Optimize concatenating empty tuples

2017-03-25 Thread STINNER Victor
STINNER Victor added the comment: I like the change. It prevents to duplicate tuples and so reduce the memory footprint. PGO compilation helps branch prediction anyway. -- ___ Python tracker

[issue29901] Support path-like objects in zipapp

2017-03-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 4aec9a8be2f2574f249008eb8be76c070fea37eb by Serhiy Storchaka in branch 'master': bpo-29901: Improve support of path-like objects in zipapp. (#815) https://github.com/python/cpython/commit/4aec9a8be2f2574f249008eb8be76c070fea37eb --

[issue29900] Remove unneeded wrappers in pathlib

2017-03-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 62a99515301fa250feba1a2e0f2d8ea2a29d700e by Serhiy Storchaka in branch 'master': bpo-29900: Simplify pathlib implementation. (#814) https://github.com/python/cpython/commit/62a99515301fa250feba1a2e0f2d8ea2a29d700e --

[issue29900] Remove unneeded wrappers in pathlib

2017-03-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

Re: Who are the "spacists"?

2017-03-25 Thread Ian Kelly
On Tue, Mar 21, 2017 at 7:28 PM, Ben Finney wrote: > Grant Edwards writes: > >> Question: is it still successfull trolling if we all knew that was the >> intent and are just playing along for the entertainment value? > > Yes, it creates more

[issue29901] Support path-like objects in zipapp

2017-03-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +721 ___ Python tracker ___ ___

[issue29862] Fix grammar typo in importlib.reload() exception

2017-03-25 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: New changeset 55717b4b487a9ccc119ca501fad71937fa01d1f6 by Mariatta in branch '3.5': bpo-29862: Fix grammar in importlib.reload() exception (GH-809) (GH-812) https://github.com/python/cpython/commit/55717b4b487a9ccc119ca501fad71937fa01d1f6 --

Re: Python question

2017-03-25 Thread Steve D'Aprano
On Sat, 25 Mar 2017 10:09 am, Cameron Simpson wrote: > On 24Mar2017 18:08, Abdul Abdul wrote: >>I hope you are doing fine. I have added a question on StackOverflow and >>thought you might have an idea on it. This is the question

Re: Python question

2017-03-25 Thread dieter
Abdul Abdul writes: > I hope you are doing fine. I have added a question on StackOverflow and > thought you might have an idea on it. This is the question > I do not

[issue29890] Constructor of ipaddress.IPv*Interface does not follow documentation

2017-03-25 Thread Louie Lu
Changes by Louie Lu : -- pull_requests: +722 ___ Python tracker ___ ___ Python-bugs-list

[issue29694] race condition in pathlib mkdir with flags parents=True

2017-03-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: You can monkey-patch os.mkdir and pathlib._NormalAccessor.mkdir. Without tests we can't be sure that the patch fixes the issue and that the bug will be not reintroduced by future changes. Tests are required for this change. --

[issue29862] Fix grammar typo in importlib.reload() exception

2017-03-25 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: I merged Mandeep's PR and backported it into 3.5 and 3.6. Thanks all :) -- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.5, Python 3.6 ___ Python tracker

[issue18059] Add multibyte encoding support to pyexpat

2017-03-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- versions: +Python 3.7 -Python 3.4 ___ Python tracker ___

[issue18059] Add multibyte encoding support to pyexpat

2017-03-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Marc-Andre, there are at least two issues about supporting East Asian encodings (issue13612 and issue15877). I think this means that that encodings are used in XML in wild. Current support of encodings (8-bit + UTF-8 + UTF-16) is enough for my needs, but I

[issue29902] copy breaks staticmethod

2017-03-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Copying and pickling of staticmethod objects are not supported. Starting from 3.6 this raises an exception (see issue22995). >>> bar.y = copy(staticmethod(foo)) Traceback (most recent call last): File "", line 1, in File

[issue29890] Constructor of ipaddress.IPv*Interface does not follow documentation

2017-03-25 Thread Louie Lu
Louie Lu added the comment: Eric: I made the patch, reference to which IPv*Network dealing with tuple. Should I also add the unittest for it? Also, can you help me code review this, thanks. -- ___ Python tracker

[issue29890] Constructor of ipaddress.IPv*Interface does not follow documentation

2017-03-25 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks! Yes, we'll need tests. I'm out of town most of the weekend, but I'll look at this as soon as I can. -- ___ Python tracker

[issue29862] Fix grammar typo in importlib.reload() exception

2017-03-25 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: New changeset 8b82236952619c3838865ff535e5ce77b59b4a78 by Mariatta in branch '3.6': bpo-29862: Fix grammar in importlib.reload() exception (GH-809) (GH-811) https://github.com/python/cpython/commit/8b82236952619c3838865ff535e5ce77b59b4a78 --

[issue29890] Constructor of ipaddress.IPv*Interface does not follow documentation

2017-03-25 Thread Louie Lu
Louie Lu added the comment: Add unittest. Since IPv6 do not support prefix netmask (':ff00::'), it have only test like this: >>> a = ipaddress.ip_interface(('dead:beaf::', '32')) >>> b = ipaddress.ip_interface('dead:beaf::/32') >>> str(a) == str(b) --

[issue29902] copy breaks staticmethod

2017-03-25 Thread Bruce Frederiksen
New submission from Bruce Frederiksen: Doing a copy on a staticmethod breaks it: Python 3.5.2 (default, Nov 17 2016, 17:05:23) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from copy import copy >>> def foo(): pass ... >>> class bar:

[issue29899] zlib missing when --enable--optimizations option appended

2017-03-25 Thread Ned Deily
Ned Deily added the comment: --enable-optimizations does not exist in Python 3.4.x so any failures there must be due to something else. Are there any build errors? Can you show exactly where the message comes from? -- nosy: +ned.deily ___ Python

[issue29903] struct.Struct Addition

2017-03-25 Thread Aviv Palivoda
New submission from Aviv Palivoda: I would like to suggest that the struct.Struct class will support addition. For example you will be able to do: >>> s1 = Struct(">L") >>> s2 = Struct(">B") >>> s3 = s1 + s2 >>> s3.format b">LB" -- components: Extension Modules messages: 290486 nosy:

[issue29898] PYTHONLEGACYWINDOWSIOENCODING isn't implemented

2017-03-25 Thread Steve Dower
Steve Dower added the comment: Sure, but you're proposing a change to a correctly documented (apart from the variable name) and released behavior. It can't be changed in 3.6, and I don't see a compelling reason to have different behavior in 3.7. --

[issue29904] Fix a number of error message typos

2017-03-25 Thread Jim Fasarakis-Hilliard
New submission from Jim Fasarakis-Hilliard: Specifically, the list I've currently found in .py files: - _pyio.py: ValueError("flush of closed file") ValueError("flush of closed file") "of" -> "on" for both. - configparser.py: ValueError("Required argument `source' not given.")

[issue29904] Fix a number of error message typos

2017-03-25 Thread Jim Fasarakis-Hilliard
Jim Fasarakis-Hilliard added the comment: Sure, Serhiy, I'll make a PR in a bit. -- ___ Python tracker ___

[issue29903] struct.Struct Addition

2017-03-25 Thread Aviv Palivoda
Aviv Palivoda added the comment: I have two use cases for this feature: 1. struct a { int a; #ifdef VER2 unsigned int b; #endif } Now I may do: >>> ver1 = Struct("i") >>> ver2 = ver1 + Struct("I") 2. struct a { int a; union inner { int b; unsigned int c; }

[issue29903] struct.Struct Addition

2017-03-25 Thread Aviv Palivoda
Changes by Aviv Palivoda : -- pull_requests: +723 ___ Python tracker ___ ___

[issue29903] struct.Struct Addition

2017-03-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur with Serhiy that this proposal is likely to cause more problems than it solves. -- nosy: +rhettinger ___ Python tracker

[issue29904] Fix a number of error message typos

2017-03-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Do you want to create a pull request? -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue29720] potential silent truncation in PyLong_AsVoidPtr

2017-03-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't think there is a bug. There are several ways to get the integer representation of the pointer. PyLong_FromVoidPtr() is the most straightforward. From Python side id() uses it. printf("%p") is a way of getting string representation of the pointer,

[issue29903] struct.Struct Addition

2017-03-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What is the purpose of this feature? Note that the layout of the structure consisting of two structures is not the same as the layout of the structure consisting of the same fields as separate structures. struct { struct { char a; short

[issue13349] Non-informative error message in index() and remove() functions

2017-03-25 Thread Jim Fasarakis-Hilliard
Jim Fasarakis-Hilliard added the comment: Additional instances of this: - function indexOf of operator.py. - function _PySequence_IterSearch of abstract.c -- ___ Python tracker

Re: Python question

2017-03-25 Thread MRAB
On 2017-03-25 20:10, Terry Reedy wrote: On 3/25/2017 6:50 AM, Steve D'Aprano wrote: On Sat, 25 Mar 2017 10:09 am, Cameron Simpson wrote: On 24Mar2017 18:08, Abdul Abdul wrote: I hope you are doing fine. I have added a question on StackOverflow and thought you might

Re: syntax error in first-time user script

2017-03-25 Thread john polo
I had a misconception of how the Python interpreter works. If I have a script, call it example.py, in order to run it, I shouldn't be in the interpreter? In other words, I should be at the Windows command prompt, for example C:/test> python example.py and not >>> python example.py ? So,

Re: Python question

2017-03-25 Thread Terry Reedy
On 3/25/2017 6:50 AM, Steve D'Aprano wrote: On Sat, 25 Mar 2017 10:09 am, Cameron Simpson wrote: On 24Mar2017 18:08, Abdul Abdul wrote: I hope you are doing fine. I have added a question on StackOverflow and thought you might have an idea on it. This is the question

[issue27446] struct: allow per-item byte order

2017-03-25 Thread Martin Panter
Martin Panter added the comment: This seems too obscure to be worth supporting in the built-in library IMO. The use case loses one line of code but gains a more complicated structure format string. -- nosy: +martin.panter ___ Python tracker

[issue10030] Patch for zip decryption speedup

2017-03-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Brian, you requested tests, but PR 550 doesn't add new API and doesn't change the behavior of public API. No new tests are needed. -- nosy: +brian.curtin versions: +Python 3.7 -Python 3.4 ___ Python tracker

[issue27446] struct: allow per-item byte order

2017-03-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I concur with Martin. -- nosy: +mark.dickinson, meador.inge, serhiy.storchaka resolution: -> rejected ___ Python tracker

[issue29904] Fix a number of error message typos

2017-03-25 Thread Jim Fasarakis-Hilliard
Changes by Jim Fasarakis-Hilliard : -- pull_requests: +724 ___ Python tracker ___ ___

[issue29905] TypeErrors not formatting values correctly

2017-03-25 Thread Jim Fasarakis-Hilliard
New submission from Jim Fasarakis-Hilliard: Specifically, in both Lib/async/proactor_events.py and asynchat.py there's a comma where a % should be thereby not formatting the value correctly: TypeError('data argument must be byte-ish (%r)', type(data)) TypeError('data argument must be

[issue29905] TypeErrors not formatting values correctly

2017-03-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +giampaolo.rodola, haypo, josiahcarlson, stutzbach, yselivanov ___ Python tracker ___

[issue21071] struct.Struct.format is bytes, but should be str

2017-03-25 Thread Martin Panter
Martin Panter added the comment: A backwards-compatible way forward would be to preserve (and document) the “format” attribute as a byte string, and add a new attribute which is definitely a text string. Not sure of a good name; perhaps “Struct.text_format” or “format_str” is a start.

[issue29903] struct.Struct Addition

2017-03-25 Thread Martin Panter
Martin Panter added the comment: For the native alignment case (prefix code @), perhaps you can already use the “ctypes” module, which supports structures with more complicated embedded fields. For the the unaligned modes (prefixes =, <, > and !), I am a little sympathetic. In the past, I

RE: syntax error in first-time user script

2017-03-25 Thread Deborah Swanson
john polo wrote, on March 25, 2017 2:45 PM > > I had a misconception of how the Python interpreter works. If > I have a > script, call it example.py, in order to run it, I shouldn't be in the > interpreter? In other words, I should be at the Windows > command prompt, > for example > >

RE: should i kill these two process with python?

2017-03-25 Thread Deborah Swanson
Chris Angelico wrote, on Saturday, March 25, 2017 1:53 AM > > On Sat, Mar 25, 2017 at 7:41 PM, Ho Yeung Lee > wrote: > > TCP127.0.0.1:1663 127.0.0.1:28091 > ESTABLISHED 9900 > > TCP127.0.0.1:28091127.0.0.1:1663 > ESTABLISHED

[issue29907] Unicode encoding failure

2017-03-25 Thread Robert Baker
New submission from Robert Baker: Using Python 2.7 (not IDLE) on Windows 10. I have tried to use a Python 2.7 program to print the name of Czech composer Antonín Dvořák. I remembered to add the "u" before the string, but regardless of whether I encode the caron-r as a literal character

RE: why and how to run forever and debug when error in for proc in psutil.process_iter()?

2017-03-25 Thread Deborah Swanson
Someone here can probably help you, but they'll need your Python version, operating system, and full traceback. They get tired of saying so. In this case, the full traceback is needed to see what went wrong and when (after which statements). Ho Yeung Lee wrote, on Saturday, March 25, 2017 1:38

Re: Python question

2017-03-25 Thread cs
On 26Mar2017 00:11, Erik wrote: On 25/03/17 20:26, MRAB wrote: On 2017-03-25 20:10, Terry Reedy wrote: On 3/25/2017 6:50 AM, Steve D'Aprano wrote: they BCC or CC me without a good excuse. As I was in this case: the OP BCCed me in his post. I'm not *that* special, so

[issue29908] Inconsistent crashing with an access violation

2017-03-25 Thread Cameron Mckain
New submission from Cameron Mckain: Almost every time I attempt to run my Django server ("python manage.py runserver") from PyCharm, python.exe crashes with the error "Unhandled exception at 0x7647BD9E (ucrtbase.dll) in python.exe: 0xC005: Access violation reading location 0x03BF8000."

[issue29905] TypeErrors not formatting values correctly

2017-03-25 Thread Jim Fasarakis-Hilliard
Changes by Jim Fasarakis-Hilliard : -- pull_requests: +725 ___ Python tracker ___ ___

Re: PEOPLE! PLEASE! [ WAS: Re: Who are the "spacists"? ]

2017-03-25 Thread Michael Torrie
On 03/25/2017 01:40 PM, Gilmeh Serda wrote: > >>> So Python supports both spaces and tabs for indentation. > > People! > > This is as far from normal conversation about Python as it gets! > > Keep this shit to yourselves, PLEASE! > > Using an editor worth the name, makes it a non issue (since

[issue29906] Add callback parameter to concurrent.futures.Executor.map

2017-03-25 Thread Aron Bordin
New submission from Aron Bordin: I'm facing some situations where would be helpful to be able to add a default function callback when calling the Executor.map. So, when making calls with this command we could get the executor result easily. I think that we could provide a callback parameter

Re: PEOPLE! PLEASE! [ WAS: Re: Who are the "spacists"? ]

2017-03-25 Thread Joel Goldstick
On Sat, Mar 25, 2017 at 3:40 PM, Gilmeh Serda wrote: > >>> So Python supports both spaces and tabs for indentation. > > People! > > This is as far from normal conversation about Python as it gets! > > Keep this shit to yourselves, PLEASE! > > Using an editor

Re: Python question

2017-03-25 Thread Erik
On 25/03/17 20:26, MRAB wrote: On 2017-03-25 20:10, Terry Reedy wrote: On 3/25/2017 6:50 AM, Steve D'Aprano wrote: they BCC or CC me without a good excuse. As I was in this case: the OP BCCed me in his post. I'm not *that* special, so my guess is that he did a mass BCC of many regulars here,

Re: PEOPLE! PLEASE! [ WAS: Re: Who are the "spacists"? ]

2017-03-25 Thread Mikhail V
On 26 March 2017 at 00:01, Michael Torrie wrote: > On 03/25/2017 01:40 PM, Gilmeh Serda wrote: >> So Python supports both spaces and tabs for indentation. >> >> People! >> >> This is as far from normal conversation about Python as it gets! >> >> Keep this shit to

Re: Python question

2017-03-25 Thread Abdul Abdul
Hi Cameron, Thanks for your kind reply and suggestion. Sure, please find my question below. I also show the different edits made and what errors emerged after those edits. Thanks for your support! I have the following code portion for a convolutional neural network: import numpy as np

[issue29908] Inconsistent crashing with an access violation

2017-03-25 Thread Cameron Mckain
Changes by Cameron Mckain : -- type: -> crash ___ Python tracker ___ ___

Re: Who are the "spacists"?

2017-03-25 Thread Wildman via Python-list
On Tue, 21 Mar 2017 15:15:14 +0100, Mikhail V wrote: > And on linux console, by default one does not even have good > possibilities for text-mode pseudographics, it was more relevant > in DOS where one had rich possibilities and programmable > binary fonts. > > Mikhail Nonsense. -- GNU/Linux

[issue27446] struct: allow per-item byte order

2017-03-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur with the other reviewers. Am going to mark this as closed. If the need arises, just make multiple struct unpacks. -- nosy: +rhettinger stage: -> resolved status: open -> closed ___ Python tracker