Re: async enumeration - possible?

2016-11-29 Thread Marko Rauhamaa
Chris Angelico : > On Wed, Nov 30, 2016 at 7:07 AM, Marko Rauhamaa wrote: > Any of these that depend on pumping the entire iterable can simply > synchronify [1] the iterable: One of the more useful ones might be: o = await anext(ait) > list(x async for

[issue27647] Update Windows build to Tcl/Tk 8.6.6

2016-11-29 Thread Benjamin Peterson
Benjamin Peterson added the comment: Doesn't seem terribly urgent, so maybe not 2.7.13. -- ___ Python tracker ___

[issue5322] Python 2.6 object.__new__ argument calling autodetection faulty

2016-11-29 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker ___

Re: async enumeration - possible?

2016-11-29 Thread Frank Millman
"Frank Millman" wrote in message news:o1k355$da5$1...@blaine.gmane.org... Hi all Python 3.6 has introduced Asynchronous Generators, which work very well. [...] However, it does not allow you to enumerate over the generator output - [...] Is there any technical reason for this, or is

[issue27142] Default int value with xmlrpclib / xmlrpc.client

2016-11-29 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- nosy: +rhettinger ___ Python tracker ___ ___

Re: Request Help With Byte/String Problem

2016-11-29 Thread Wildman via Python-list
On Tue, 29 Nov 2016 18:29:51 -0800, Paul Rubin wrote: > Wildman writes: >> names = array.array("B", '\0' * bytes) >> TypeError: cannot use a str to initialize an array with typecode 'B' > > In Python 2, str is a byte string and you can do that. In Python 3, > str is a

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: > If adding proper support for hi=None, maybe lo=None should > also be supported. That would be gratuitous. Lo already has a reasonable, useful, and self-explanatory value. This would add more complexity to the signature while reducing clarity. I really

Re: correct way to catch exception with Python 'with' statement

2016-11-29 Thread Steven D'Aprano
On Wednesday 30 November 2016 10:59, woo...@gmail.com wrote: > If you want to do something only if the file exists (or does not), use > os.path.isfile(filename) No, don't do that. Just because the file exists, doesn't mean that you have permission to read or write to it. Worse, the code is

Re: async enumeration - possible?

2016-11-29 Thread Chris Angelico
On Wed, Nov 30, 2016 at 7:07 AM, Marko Rauhamaa wrote: > Ok, so how about: > >aall(aiterable) >aany(aiterable) >class abytearray(aiterable[, encoding[, errors]]) >class adict(aiterable, **kwarg) >class afilter(coro, aiterable) >class afrozenset(aiterable)

Re: Request Help With Byte/String Problem

2016-11-29 Thread Paul Rubin
Wildman writes: > names = array.array("B", '\0' * bytes) > TypeError: cannot use a str to initialize an array with typecode 'B' In Python 2, str is a byte string and you can do that. In Python 3, str is a unicode string, and if you want a byte string you have to specify

Request Help With Byte/String Problem

2016-11-29 Thread Wildman via Python-list
For the purpose of learning I am writing a script that will return different information about the Linux machine where it is running. Sort of like the inxi utility. Below is some code that I found that returns a list of the network interface devices on the system. It runs as is perfectly on

[issue28836] Throw concurrent.futures.TimeoutError instead of concurrent.futures.__base.TimeoutError

2016-11-29 Thread Decorater
Decorater added the comment: Wait actually BotErrors.CommandTimeoutError cubaclasses concurrent.futures.TimeoutError -- ___ Python tracker ___

[issue28836] Throw concurrent.futures.TimeoutError instead of concurrent.futures.__base.TimeoutError

2016-11-29 Thread Decorater
Decorater added the comment: oh wait nvm -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue28836] Throw concurrent.futures.TimeoutError instead of concurrent.futures.__base.TimeoutError

2016-11-29 Thread Decorater
Decorater added the comment: Here is my corouytine and the traceback on it to verify my issue too: Task exception was never retrieved future: exception=TimeoutError()> Traceback (most recent call last): File "asyncio\tasks.py", line 239, in _step File

[issue28836] Throw concurrent.futures.TimeoutError instead of concurrent.futures.__base.TimeoutError

2016-11-29 Thread Decorater
Decorater added the comment: I handle concurrent.futures.TimeoutError on my coroutine that is fired with create_task yet it sitll don't handle it though... so it still is a issue -- ___ Python tracker

[issue28836] Throw concurrent.futures.TimeoutError instead of concurrent.futures.__base.TimeoutError

2016-11-29 Thread Guido van Rossum
Guido van Rossum added the comment: concurrent.futures.TimeoutError and concurrent.futures.__base.TimeoutError are the same class. So there is nothing to do here. -- resolution: -> rejected status: open -> closed ___ Python tracker

[issue28836] Throw concurrent.futures.TimeoutError instead of concurrent.futures.__base.TimeoutError

2016-11-29 Thread Decorater
New submission from Decorater: So, concurrent.futures.TimeoutError subclasses concurrent.futures.__base.TimeoutError. Why not have asyncio throw that instead of the __base class for Timeout Error? There is a huge issue with this for starters for those know knows this they cannot handle it

Re: correct way to catch exception with Python 'with' statement

2016-11-29 Thread Matt Wheeler
On Tue, 29 Nov 2016 at 23:59 wrote: > If you want to do something only if the file exists (or does not), use > os.path.isfile(filename) > This opens you up to a potential race condition (and has potential security implications, depending on the application), as you're using

Re: Python while loop

2016-11-29 Thread BartC
On 29/11/2016 23:58, paul.garcia2...@gmail.com wrote: Write a program which prints the sum of numbers from 1 to 101 ( 1 and 101 are included) that are divisible by 5 (Use while loop) This is the code: x=0 count=0 while x<=100: if x%5==0: count=count+x x=x+1 print(count) This

Re: Python while loop

2016-11-29 Thread MRAB
On 2016-11-29 23:58, paul.garcia2...@gmail.com wrote: Write a program which prints the sum of numbers from 1 to 101 ( 1 and 101 are included) that are divisible by 5 (Use while loop) This is the code: x=0 count=0 while x<=100: if x%5==0: count=count+x x=x+1 print(count)

[issue28835] Change in behavior when overriding warnings.showwarning and with catch_warnings(record=True)

2016-11-29 Thread Thomas Robitaille
New submission from Thomas Robitaille: In Python 3.5, the following code: import warnings def deal_with_warning(*args, **kwargs): print("warning emitted") with warnings.catch_warnings(record=True): warnings.showwarning = deal_with_warning

[issue26363] __builtins__ propagation is misleading described in exec and eval documentation

2016-11-29 Thread Xavier Combelle
Xavier Combelle added the comment: It is not the dictionary of builtin module, which is inserted in , but the current __builtin__ global which happen to be normally the dictionnary of builtin. Hence in the following code, the builtins propagation works has expected. >>>

Re: correct way to catch exception with Python 'with' statement

2016-11-29 Thread woooee
If you want to do something only if the file exists (or does not), use os.path.isfile(filename) -- https://mail.python.org/mailman/listinfo/python-list

Re: csv into multiple columns using split function using python

2016-11-29 Thread woooee
Add some print statements to see what is happening, especially after the for elem in mylist1: statement -- https://mail.python.org/mailman/listinfo/python-list

Python while loop

2016-11-29 Thread paul . garcia2345
Write a program which prints the sum of numbers from 1 to 101 ( 1 and 101 are included) that are divisible by 5 (Use while loop) This is the code: x=0 count=0 while x<=100: if x%5==0: count=count+x x=x+1 print(count) Question: How does python know what count means ? I

[issue20215] socketserver.TCPServer can not listen IPv6 address

2016-11-29 Thread Jan Pokorný
Changes by Jan Pokorný : -- nosy: +jpokorny ___ Python tracker ___ ___

[issue28427] WeakValueDictionary next bug (with multithreading)

2016-11-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: (or we bite the bullet and add a C helper function for the atomic test-and-delete thing) -- ___ Python tracker ___

[issue28427] WeakValueDictionary next bug (with multithreading)

2016-11-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: One possibility would be to always delay removals (always put them in _pending_removals). We would then have to enforce removals from time to time, but synchronously. -- nosy: +pitrou, tim.peters ___ Python tracker

Re: Asyncio -- delayed calculation

2016-11-29 Thread Steve D'Aprano
On Wed, 30 Nov 2016 05:41 am, Ian Kelly wrote: > You mean how do you create something that can be awaited that doesn't > await something else in turn? With a Future. > > import asyncio > > class Awaitable(asyncio.Future): > def wake_up_later(self): > asyncio.get_event_loop().call_later(3,

Re: async enumeration - possible?

2016-11-29 Thread Steve D'Aprano
On Wed, 30 Nov 2016 07:07 am, Marko Rauhamaa wrote: > Terry Reedy : > >> On 11/29/2016 9:25 AM, Frank Millman wrote: >> >>> Is there any technical reason for this, or is it just that no-one has >>> got around to writing an asynchronous version yet? >> >> Google's first hit for

Re: best way to read a huge ascii file.

2016-11-29 Thread Steve D'Aprano
On Wed, 30 Nov 2016 01:17 am, Heli wrote: > The following line which reads the entire 7.4 GB file increments the > memory usage by 3206.898 MiB (3.36 GB). First question is Why it does not > increment the memory usage by 7.4 GB? > > f=np.loadtxt(os.path.join(dir,myfile),delimiter=None,skiprows=0)

[issue15533] subprocess.Popen(cwd) documentation

2016-11-29 Thread Jan Lachnitt
Jan Lachnitt added the comment: Thank Wolfgang Maier for reminding this issue and providing various details and observations. Having taken a look at my old comments (and at others' comments, too), I feel that the cwd issue deserves a clearer description. Let's use the following simple C

[issue26861] shutil.copyfile() doesn't close the opened files

2016-11-29 Thread Josh Rosenberg
Josh Rosenberg added the comment: Agreed. 2.7 source is definitely using with: https://hg.python.org/cpython/file/2.7/Lib/shutil.py#l82 -- nosy: +josh.r status: pending -> open ___ Python tracker

[issue15533] subprocess.Popen(cwd) documentation

2016-11-29 Thread Wolfgang Maier
Wolfgang Maier added the comment: Just found issue15451, which reports a similar inconsistency between Windows and POSIX for 'PATH' provided through the Popen env parameter as for cwd. It seems that, on POSIX-platforms, the PATH environment variable passed through env affects the executable

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-29 Thread Martin Panter
Martin Panter added the comment: If adding proper support for hi=None, maybe lo=None should also be supported. Also, I would think the main Doc/library/bisect.rst documentation needs updating, and a test and What’s New entry added. -- ___ Python

[issue24339] iso6937 encoding missing

2016-11-29 Thread John Helour
John Helour added the comment: > Please also check whether it's not possible to reuse the charmap codec > functions we have I've found nothing useful, maybe you (as the author) can find something really useful which can improve code readability or increase the performance. Please look at the

[issue28795] Misleading stating, that SIGINT handler is installed by default

2016-11-29 Thread Julien Palard
Changes by Julien Palard : Added file: http://bugs.python.org/file45696/issue28795-2.7.diff ___ Python tracker ___

[issue28795] Misleading stating, that SIGINT handler is installed by default

2016-11-29 Thread Julien Palard
Julien Palard added the comment: Proposed as patches but english is not my native language so please review carefully. -- keywords: +patch Added file: http://bugs.python.org/file45695/issue28795-tip.diff ___ Python tracker

[issue25750] tp_descr_get(self, obj, type) is called without owning a reference to "self"

2016-11-29 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker ___

[issue27142] Default int value with xmlrpclib / xmlrpc.client

2016-11-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This format doesn't conform the XML-RPC specification. Adding the support of it is a new feature. The question is whether there is a need of this feature. Are there some common XML-RPC servers or clients that produce such format? -- type: behavior

[issue28820] Typo in section 6 of the Python 3.4 documentation

2016-11-29 Thread R. David Murray
R. David Murray added the comment: We at least used to point to Apple's style guide. I'm not sure where we point at the moment (it's in the documentation somewhere :). But yes, it's pretty much formal American English, though I'm sure there are places where other spelling has crept in.

[issue28833] cross compilation of third-party extension modules

2016-11-29 Thread Xavier de Gaye
Changes by Xavier de Gaye : -- nosy: +Chi Hsuan Yen ___ Python tracker ___ ___

[issue28833] cross compilation of third-party extension modules

2016-11-29 Thread Xavier de Gaye
Xavier de Gaye added the comment: > This approach will not work with a "multiarch" enabled environment, and break > cross builds on Debian and Ubuntu. No, the patch does not break cross builds on Debian and Ubuntu, unless you can demonstrate it does. > Afaics, the proposal assumes that the

[issue28820] Typo in section 6 of the Python 3.4 documentation

2016-11-29 Thread Josh Rosenberg
Josh Rosenberg added the comment: Just OOC, what version of English are the docs supposed to use? In American English, noun vs. verb doesn't matter, it's always "practice" (there is no such word as "practise"). In this case it doesn't matter (it's a noun, and everyone agrees on the

[issue26861] shutil.copyfile() doesn't close the opened files

2016-11-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: As I see, shutil.copyfile() uses the "with" statements and closes files just after copying. -- status: open -> pending ___ Python tracker

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-29 Thread Stefan Krah
Stefan Krah added the comment: Signature and docstring can be done manually with very little effort. Currently METH_FASTCALL is AC only, but I hope that will change. -- ___ Python tracker

[issue28833] cross compilation of third-party extension modules

2016-11-29 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list

[issue28834] Type checking in set comparisons.

2016-11-29 Thread nyoshimizu
nyoshimizu added the comment: I see. Sorry & thanks! -- ___ Python tracker ___ ___ Python-bugs-list mailing

Re: async enumeration - possible?

2016-11-29 Thread Marko Rauhamaa
Terry Reedy : > On 11/29/2016 9:25 AM, Frank Millman wrote: > >> Is there any technical reason for this, or is it just that no-one has >> got around to writing an asynchronous version yet? > > Google's first hit for 'aenumerate' is >

[issue28834] Type checking in set comparisons.

2016-11-29 Thread SilentGhost
SilentGhost added the comment: You seem to be misunderstanding how the intersection/union/etc are supposed to be used: >>> ab = {'a', 'b'} >>> ab.intersection('bc') {'b'} Using set.intersection (where set is a built-in class, rather than an instance thereof) requires the first argument to be

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-29 Thread STINNER Victor
STINNER Victor added the comment: Stefan Krah added the comment: > Julien, the syntax converters look pretty clever. Do we need AC > everywhere though? Please see previous comments for advantages of AC (signature object, docstring, speed). -- ___

[issue24015] timeit should start with 1 loop, not 10

2016-11-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: That was implemented in issue28240. $ time ./python -m timeit "import time; time.sleep(1.0)" 1 loop, best of 5: 1 sec per loop real0m6.176s user0m0.160s sys 0m0.004s -- resolution: -> duplicate stage: -> resolved status: open -> closed

[issue28834] Type checking in set comparisons.

2016-11-29 Thread nyoshimizu
New submission from nyoshimizu: The non-operator versions of set comparisons (intersection(), union(), etc.) exhibit inconsistent type checking. They only check the first input before deciding whether or not to raise a TypeError exception. Therefore, it's possible to pass a set first, then

Re: async enumeration - possible?

2016-11-29 Thread Terry Reedy
On 11/29/2016 9:25 AM, Frank Millman wrote: Is there any technical reason for this, or is it just that no-one has got around to writing an asynchronous version yet? Google's first hit for 'aenumerate' is https://pythonwise.blogspot.com/2015/11/aenumerate-enumerate-for-async-for.html Note

[issue28791] update sqlite to 3.15.2

2016-11-29 Thread Ned Deily
Ned Deily added the comment: Yes, we're not going to change library versions for the 3.6.0 installers at this point. Upgrade for 3.7.0 is fine and possibly for a 3.6.x maintenance release if warranted. I suggest holding off on any patches until we're closer to those releases as there may be

csv into multiple columns using split function using python

2016-11-29 Thread handar94
I am trying to split a specific column of csv into multiple column and then appending the split values at the end of each row. `enter code here` import csv fOpen1=open('Meta_D1.txt') reader=csv.reader(fOpen1) mylist=[elem[1].split(',') for elem

[issue28790] Error when using Generic and __slots__

2016-11-29 Thread Ned Deily
Changes by Ned Deily : -- stage: commit review -> resolved ___ Python tracker ___ ___

[issue20612] cElementTree has problems with StringIO object containing unicode content

2016-11-29 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- status: open -> pending ___ Python tracker ___

[issue22039] PyObject_SetAttr doesn't mention value = NULL

2016-11-29 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +martin.panter ___ Python tracker ___ ___

[issue21818] cookielib documentation references Cookie module, not cookielib.Cookie class

2016-11-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thus the only way to fix links is to specify full names? Does docs_class_links-2.7.patch look good to you? -- stage: -> patch review ___ Python tracker

[issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX

2016-11-29 Thread Masayuki Yamamoto
Masayuki Yamamoto added the comment: Elik, Ed, I have overlooked tracemalloc module raises deadlock if apply the patch. I found out a source comment on Modules/_tracemalloc.c:161 /* If your OS does not provide native thread local storage, you can implement it manually using a lock.

[issue28208] update sqlite to 3.14.2

2016-11-29 Thread Big Stone
Big Stone added the comment: As far as I test, the novelties from 0.15.2 don't break any API (just nice SQL-syntax sugar), and correct some old 3.8.0 bugs. and ".2" is the same level of stabilisation as current "0.14.2" -- ___ Python tracker

[issue11145] '%o' % user-defined instance

2016-11-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I read the code multiple times but still don't see any issues with the last path. If anybody know issues with it, please point on them. Otherwise I'll commit the patch. -- assignee: -> serhiy.storchaka ___

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-29 Thread Stefan Krah
Stefan Krah added the comment: Julien, the syntax converters look pretty clever. Do we need AC everywhere though? I wonder (once again) if this is really more readable than the existing code. -- nosy: +skrah ___ Python tracker

[issue24469] Py2.x int free list can grow without bounds

2016-11-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset fd0842f34602 by Serhiy Storchaka in branch '2.7': Issue #24469: Fixed memory leak caused by int subclasses without overridden https://hg.python.org/cpython/rev/fd0842f34602 -- nosy: +python-dev ___

[issue24469] Py2.x int free list can grow without bounds

2016-11-29 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

Re: Asyncio -- delayed calculation

2016-11-29 Thread Ian Kelly
On Mon, Nov 28, 2016 at 10:42 PM, Chris Angelico wrote: > On Tue, Nov 29, 2016 at 4:13 PM, Paul Rubin wrote: >> >> I haven't gotten my head around Python asyncio and have been wanting >> to read this: >> >>

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-29 Thread Julien Palard
Julien Palard added the comment: I tried myself at Argument Clinic custom converters to create the "optional ssize_t converter" and it works, so as advised by Raymond, pydoc now shows None, and the C implementation now allows for both default values None and -1, as the custom converter

[issue28663] Higher virtual memory usage on recent Linux versions

2016-11-29 Thread ProgVal
ProgVal added the comment: Sorry. That's the result of |||get_traced_memory|on Python 3.5 and Linux 4.7. -- ___ Python tracker ___

[issue28781] On Installation of 3.5 Python get error message

2016-11-29 Thread Steve Dower
Steve Dower added the comment: That's only the most recent set, and all it shows is that the per-user install didn't help. Do you have the earlier sets of install logs for the per-user install and uninstall? I'd like to see why those didn't have the effect I expected. --

[issue28790] Error when using Generic and __slots__

2016-11-29 Thread Guido van Rossum
Changes by Guido van Rossum : -- resolution: -> fixed stage: -> commit review status: open -> closed type: -> behavior ___ Python tracker

[issue28790] Error when using Generic and __slots__

2016-11-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0bbd29405c9d by Guido van Rossum in branch '3.5': Issue #28790: Fix error when using Generic and __slots__ (Ivan L) https://hg.python.org/cpython/rev/0bbd29405c9d New changeset 2dd08b5b5ee6 by Guido van Rossum in branch '3.6': Issue #28790: Fix

[issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX

2016-11-29 Thread Ed Schouten
Ed Schouten added the comment: Looks good to me! -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue28790] Error when using Generic and __slots__

2016-11-29 Thread Guido van Rossum
Guido van Rossum added the comment: OK, having thought about it some more, given that you don't seem to object too strenuously, I'm going to merge the fix. May it be the last one! -- ___ Python tracker

[issue28208] update sqlite to 3.14.2

2016-11-29 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: sqlite 3.15.2 was just released. I can prepare a patch if that's what we want. -- ___ Python tracker ___

Re: best way to read a huge ascii file.

2016-11-29 Thread BartC
On 29/11/2016 14:17, Heli wrote: Hi all, Let me update my question, I have an ascii file(7G) which has around 100M lines. I read this file using : f=np.loadtxt(os.path.join(dir,myfile),delimiter=None,skiprows=0) x=f[:,1] y=f[:,2] z=f[:,3] id=f[:,0] I will need the x,y,z and id arrays later

[issue28822] Fix indices handling in PyUnicode_FindChar

2016-11-29 Thread Xiang Zhang
Xiang Zhang added the comment: > Remaining question: what is the behaviour for direction=0, direction=100 or > direction=-2? Maybe we can add a few unit tests for strange values of > direction? (Not sure if it's worth it.) It's not documented so I also doubt it. Expect Serhiy's comment.

[issue28791] update sqlite to 3.15.2

2016-11-29 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- components: +Installation, Windows, macOS nosy: +ned.deily, paul.moore, ronaldoussoren, steve.dower, tim.golden, zach.ware ___ Python tracker

[issue26273] Expose TCP_CONGESTION and TCP_USER_TIMEOUT to the socket module

2016-11-29 Thread STINNER Victor
STINNER Victor added the comment: Serhiy Storchaka: "Shouldn't we add something like versionadded/versionchanged or a mentioning in What's New?" Oh right, we did that for other new constants added to Python 3.6 like SO_DOMAIN. Attached socket_doc.patch documents the additional of the two new

[issue26273] Expose TCP_CONGESTION and TCP_USER_TIMEOUT to the socket module

2016-11-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6d69da76be6a by Victor Stinner in branch '3.6': Add TCP_CONGESTION and TCP_USER_TIMEOUT https://hg.python.org/cpython/rev/6d69da76be6a -- ___ Python tracker

[issue28832] Reduce memset in dict creation

2016-11-29 Thread STINNER Victor
STINNER Victor added the comment: You might experiment Python_Calloc(). I'm not sure that this allocator is well optimized (especially the pymalloc allocator) :-/ Last time I played with it, it was slower, especially for allocations smaller than 1 MB. --

[issue28822] Fix indices handling in PyUnicode_FindChar

2016-11-29 Thread STINNER Victor
STINNER Victor added the comment: PyUnicode_FindChar-v2.patch LGTM with a minor comment on the review, but I would prefer that Serhiy also reviews it ;-) Remaining question: what is the behaviour for direction=0, direction=100 or direction=-2? Maybe we can add a few unit tests for strange

[issue26273] Expose TCP_CONGESTION and TCP_USER_TIMEOUT to the socket module

2016-11-29 Thread Ned Deily
Ned Deily added the comment: OK for 3.6.0rc1 (before it times out) -- stage: patch review -> commit review versions: +Python 3.6 ___ Python tracker ___

[issue28663] Higher virtual memory usage on recent Linux versions

2016-11-29 Thread STINNER Victor
STINNER Victor added the comment: ProgVal: "(4350362, 4376669)" is it the same result on Python 3.4 and Python 3.5? I don't understand your comment :-/ Can you please elaborate? -- ___ Python tracker

Re: best way to read a huge ascii file.

2016-11-29 Thread marco . nawijn
On Tuesday, November 29, 2016 at 3:18:29 PM UTC+1, Heli wrote: > Hi all, > > Let me update my question, I have an ascii file(7G) which has around 100M > lines. I read this file using : > > f=np.loadtxt(os.path.join(dir,myfile),delimiter=None,skiprows=0) > > x=f[:,1] > y=f[:,2] > z=f[:,3]

[issue28832] Reduce memset in dict creation

2016-11-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think that clearing 120 bytes at a time is faster than clear it later entry-by-entry. Your patch removes some asserts, this looks not good. Could your provide microbenchmarks that show the largest speed up and the largest slow down? So we would see what

[issue28663] Higher virtual memory usage on recent Linux versions

2016-11-29 Thread ProgVal
ProgVal added the comment: (4350362, 4376669) -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue26273] Expose TCP_CONGESTION and TCP_USER_TIMEOUT to the socket module

2016-11-29 Thread Yury Selivanov
Yury Selivanov added the comment: Would be nice to have in 3.6. -- ___ Python tracker ___ ___

[issue26273] Expose TCP_CONGESTION and TCP_USER_TIMEOUT to the socket module

2016-11-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Shouldn't we add something like versionadded/versionchanged or a mentioning in What's New? -- ___ Python tracker ___

[issue28832] Reduce memset in dict creation

2016-11-29 Thread STINNER Victor
STINNER Victor added the comment: Can you please attached the two JSON files, compressed with gzip (.gz files). perf is also to read gzipped JSON. -- ___ Python tracker

[issue28663] Higher virtual memory usage on recent Linux versions

2016-11-29 Thread STINNER Victor
STINNER Victor added the comment: rlimit_tracemalloc.txt: Oh, my idea was only to see the total, https://docs.python.org/dev/library/tracemalloc.html#tracemalloc.get_traced_memory Current and peak memory usage. -- ___ Python tracker

Re: async enumeration - possible?

2016-11-29 Thread Ian Kelly
On Tue, Nov 29, 2016 at 7:25 AM, Frank Millman wrote: > However, it does not allow you to enumerate over the generator output - > async def main(): > > ... c = counter(5) > ... async for j, k in enumerate(c): > ... print(j, k) > ... print('done') > ...

[issue26273] Expose TCP_CONGESTION and TCP_USER_TIMEOUT to the socket module

2016-11-29 Thread Omar Sandoval
Omar Sandoval added the comment: Glad to see this finally get in :) -- ___ Python tracker ___ ___

[issue28663] Higher virtual memory usage on recent Linux versions

2016-11-29 Thread STINNER Victor
STINNER Victor added the comment: It's very hard to estimate the water high-mark for memory because the memory includes different things: read-only memory, mmap() on files, read-only memory pages shared between multiple processes for libraries, etc. I suggest to use the tracemalloc module to

[issue28832] Reduce memset in dict creation

2016-11-29 Thread INADA Naoki
INADA Naoki added the comment: $ ./python-default -m perf compare_to default.json patched.json -G Slower (2): - xml_etree_iterparse: 328 ms +- 26 ms -> 350 ms +- 29 ms: 1.07x slower - fannkuch: 1.58 sec +- 0.09 sec -> 1.65 sec +- 0.09 sec: 1.05x slower Faster (9): - scimark_sor: 870 ms +- 59

[issue26273] Expose TCP_CONGESTION and TCP_USER_TIMEOUT to the socket module

2016-11-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le 29/11/2016 à 16:59, STINNER Victor a écrit : > > TCP_USER_TIMEOUT is super useful! It is :-) -- ___ Python tracker

[issue26273] Expose TCP_CONGESTION and TCP_USER_TIMEOUT to the socket module

2016-11-29 Thread STINNER Victor
STINNER Victor added the comment: Sorry, I missed this issue. TCP_USER_TIMEOUT is super useful! It helps a lot to detect when a server is down, especially when using keep alive: at kernel level (TCP keepalive) or application level (ex: RabbitMQ heart beat). Linux default timeout is more

[issue26273] Expose TCP_CONGESTION and TCP_USER_TIMEOUT to the socket module

2016-11-29 Thread STINNER Victor
STINNER Victor added the comment: @Ned Deily: Would you be ok to add these two constants to Python 3.6? I cannot image any regression if 674fb9644eaa is backported to Python 3.6. @Serhiy, Yury: Any opinion on the backport? -- nosy: +haypo, ned.deily, serhiy.storchaka

[issue26273] Expose TCP_CONGESTION and TCP_USER_TIMEOUT to the socket module

2016-11-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 674fb9644eaa by Victor Stinner in branch 'default': Add TCP_CONGESTION and TCP_USER_TIMEOUT https://hg.python.org/cpython/rev/674fb9644eaa -- nosy: +python-dev ___ Python tracker

[issue28822] Fix indices handling in PyUnicode_FindChar

2016-11-29 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks for your reviews. :-) v2 updated the test codes. -- Added file: http://bugs.python.org/file45690/PyUnicode_FindChar-v2.patch ___ Python tracker

  1   2   >