[issue26107] code.co_lnotab: use signed line number delta to support moving instructions in an optimizer

2016-01-14 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +Mark.Shannon ___ Python tracker ___ ___

[issue26110] Speedup method calls 1.2x

2016-01-14 Thread Yury Selivanov
Yury Selivanov added the comment: > If you prefer to limit the number of opcodes, you can pass a flag in > arguments. For example, use 2 bytes for 2 arguments instead of only 1? I tried two approaches: 1. Push one more leading NULL to the stack in LOAD_METHOD (which makes it push 3 vals).

[issue26110] Speedup method calls 1.2x

2016-01-14 Thread STINNER Victor
STINNER Victor added the comment: > For keyword and var-arg calls we have three more opcodes -- > CALL_FUNCTION_VAR, CALL_FUNCTION_KW, and CALL_FUNCTION_VAR_KW. I suspect > that making them work with LOAD_METHOD would slow them down too, which will > probably require us to add three (!) more

[issue6033] LOOKUP_METHOD and CALL_METHOD optimization

2016-01-14 Thread Yury Selivanov
Changes by Yury Selivanov : -- superseder: -> Speedup method calls 1.2x ___ Python tracker ___

[issue26103] Contradiction in definition of "data descriptor" between (dotted lookup behavior/datamodel documentation) and (inspect lib/descriptor how-to)

2016-01-14 Thread SilentGhost
Changes by SilentGhost : -- assignee: -> docs@python components: +Documentation, Library (Lib) nosy: +docs@python, yselivanov stage: -> needs patch versions: -Python 2.7, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker

[issue26108] Calling PyInitialize with 2.7.11 on Windows x64 terminates process

2016-01-14 Thread David Heffernan
David Heffernan added the comment: Thanks Eryk, everything you described happens exactly as you describe it. Much appreciated. As it happens, I'm not distributing Python because I want to give my users the flexibility to use whatever version they please, and with whatever third party modules

[issue25822] Add docstrings to fields of urllib.parse results

2016-01-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7bfcb8b75ad9 by Senthil Kumaran in branch 'default': Issue #25822: Add docstrings to the fields of urllib.parse results. https://hg.python.org/cpython/rev/7bfcb8b75ad9 -- nosy: +python-dev ___ Python

[issue25822] Add docstrings to fields of urllib.parse results

2016-01-14 Thread Senthil Kumaran
Senthil Kumaran added the comment: Thank you, Swati. I reviewed and committed your patch. I had to make some minor formatting changes while keeping an eye for the maintainability of the module and doc strings. * Moved all the doc strings up to a single place just below the namespaces are

[issue25945] Type confusion in partial_setstate and partial_call leads to memory corruption

2016-01-14 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: serhiy.storchaka -> rhettinger ___ Python tracker ___

[issue25455] Some repr implementations don't check for self-referential structures

2016-01-14 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> rhettinger ___ Python tracker ___ ___

[issue26107] code.co_lnotab: use signed line number delta to support moving instructions in an optimizer

2016-01-14 Thread STINNER Victor
Changes by STINNER Victor : -- components: +Interpreter Core type: -> enhancement ___ Python tracker ___

[issue26107] code.co_lnotab: use signed line number delta to support moving instructions in an optimizer

2016-01-14 Thread STINNER Victor
STINNER Victor added the comment: > Attached patch changes the type of line number delta from unsigned 8-bit > integer to *signed* 8-bit integer. If a line number delta is smaller than > -128 or larger than 127, multiple pairs are created (as before). The main visible change is that .pyc

[issue26106] Move licences to literal blocks

2016-01-14 Thread Julien
Julien added the comment: @Serhiy Well spotted, it does not work (as we can see here http://www.afpy.org/doc/python/3.5/license.html). Anyone having a better background than me in ReStructuredText have an idea ? About the review of the patch, as a human review may be fastidious, here a

[issue26106] Move licences to literal blocks

2016-01-14 Thread Georg Brandl
Georg Brandl added the comment: Since the text does need no highlighting, a parsed-literal block should work. -- ___ Python tracker ___

[issue26108] Calling PyInitialize with 2.7.11 on Windows x64 terminates process

2016-01-14 Thread David Heffernan
David Heffernan added the comment: Note that I've just listed the Windows versions on which I have tested this. I have not tested on Windows 7 or Vista so do not know whether or not the issue exists there. -- ___ Python tracker

[issue26107] code.co_lnotab: use signed line number delta to support moving instructions in an optimizer

2016-01-14 Thread STINNER Victor
New submission from STINNER Victor: Python doesn't store the original line number in the .pyc file in the bytecode. Instead, an efficient table is used to find the line number from the current in the bytecode: code.co_lnotab. Basically, it's a list of (offset_delta, line_number_delta) pairs

[issue26107] code.co_lnotab: use signed line number delta to support moving instructions in an optimizer

2016-01-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset c4a826184937 by Victor Stinner in branch 'default': PEP 511: add link to issue #26107 https://hg.python.org/peps/rev/c4a826184937 -- nosy: +python-dev ___ Python tracker

[issue26108] Calling PyInitialize with 2.7.11 on Windows x64 terminates process

2016-01-14 Thread David Heffernan
New submission from David Heffernan: Environment: - Python 2.7.11 from python.org, x64. - Windows 10 or Windows 8.1 - MSVC 2015 I compiled the most basic embedding example, taken from the Python docs: #include int main(int argc, char *argv[]) { Py_SetProgramName(argv[0]); /* optional

[issue25945] Type confusion in partial_setstate and partial_call leads to memory corruption

2016-01-14 Thread Nick Coghlan
Nick Coghlan added the comment: I didn't do a full review of the C code changes, but the new test cases look good to me, and the changes specifically to partial_setstate also look good. -- ___ Python tracker

[issue26106] Move licences to literal blocks

2016-01-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Does the |release| substitution work in literal blocks? -- nosy: +brett.cannon, georg.brandl, ned.deily, serhiy.storchaka ___ Python tracker

[issue26108] Calling PyInitialize with 2.7.11 on Windows x64 terminates process

2016-01-14 Thread Eryk Sun
Eryk Sun added the comment: Probably this is related to issue 25824. When built as a console application and run from the command prompt, you should see an the error ImportError: No module named site If that's the case, the problem is that even the 64-bit build is incorrectly setting the

[issue26107] code.co_lnotab: use signed line number delta to support moving instructions in an optimizer

2016-01-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: A patch was proposed in issue16956. And issue17611 is related. -- nosy: +gvanrossum ___ Python tracker ___

[issue26109] _Py_DumpTraceback should be PyAPI_FUNC

2016-01-14 Thread John Malmberg
New submission from John Malmberg: The _PyDumpTraceback and _Py_DumpTracebackThreads routines in traceback.h are tagged with PyAPI_DATA attributes when they should be tagged with PyAPI_FUNC. For platforms that use those attributes, this can cause run-time issues if those methods are called.

[issue26109] _Py_DumpTraceback should be PyAPI_FUNC

2016-01-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Correction for searching: _Py_DumpTraceback and _Py_DumpTracebackThreads. They were added with the faulthandler module in issue11393. -- nosy: +haypo, serhiy.storchaka ___ Python tracker

[issue25940] SSL tests failed due to expired svn.python.org SSL certificate

2016-01-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset 81b3beea7e99 by Georg Brandl in branch '3.2': Issue #25940: Backport self-signed.pythontest.net testing for test_httplib https://hg.python.org/cpython/rev/81b3beea7e99 New changeset adf750b1252d by Martin Panter in branch '3.2': Issue #25940: Use

[issue26110] Speedup method calls 1.2x

2016-01-14 Thread Yury Selivanov
New submission from Yury Selivanov: This issue supersedes issue #6033. I decided to open a new one, since the patch is about Python 3.6 (not 2.7) and is written from scratch. The idea is to add new opcodes to avoid instantiation of BoundMethods. The patch only affects method calls of Python

[issue25940] SSL tests failed due to expired svn.python.org SSL certificate

2016-01-14 Thread koobs
koobs added the comment: Wow. *thank you* Georg and Martin :) -- ___ Python tracker ___ ___ Python-bugs-list

[issue26116] CSV-module. The example code don't work. Have to be: reader = csv.reader(csvfile, dialect=dialect)

2016-01-14 Thread Georg Brandl
Georg Brandl added the comment: We'll need at least the two full examples (one not working, one working) to make a call here. -- nosy: +georg.brandl ___ Python tracker

[issue26118] String performance issue using single quotes

2016-01-14 Thread Steven D'Aprano
Steven D'Aprano added the comment: I cannot replicate that performance difference under Linux. There's a small difference (about 0.1 second per million iterations, or a tenth of a microsecond) on my computer, but I don't think that's meaningful: py> from timeit import Timer py> t1 =

[issue18018] SystemError: Parent module '' not loaded, cannot perform relative import

2016-01-14 Thread Yongzhi Pan
Changes by Yongzhi Pan : -- nosy: +fossilet ___ Python tracker ___ ___ Python-bugs-list

[issue18018] SystemError: Parent module '' not loaded, cannot perform relative import

2016-01-14 Thread Brett Cannon
Brett Cannon added the comment: The problem is in Python/import.c: https://hg.python.org/cpython/file/default/Python/import.c#l1453 . While the Python code has a check that `package` is a truthy value, the accelerated C code doesn't. Adding a check that the string isn't empty or truthy should

[issue25940] SSL tests failed due to expired svn.python.org SSL certificate

2016-01-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset b2036b717028 by Martin Panter in branch '3.2': Issue #25940: On Windows, connecting to port 444 returns ETIMEDOUT https://hg.python.org/cpython/rev/b2036b717028 New changeset c5cae7366835 by Martin Panter in branch '3.3': Issue #25940: Merge

[issue18018] SystemError: Parent module '' not loaded, cannot perform relative import

2016-01-14 Thread Chris Angelico
Chris Angelico added the comment: If someone made a new way of importing and had it raise ValueError on some issue or other, I think there'd be complete consensus that that's the wrong exception. Yes, this is incompatible with Python 2 - but there are a lot of corner cases in the 3.3+ import

[issue26118] String performance issue using single quotes

2016-01-14 Thread poostenr
poostenr added the comment: Eric, Steven, thank you for your feedback so far. I am using Windows7, Intel i7. That one particular file of 6.5MB took ~1 minute on my machine. When I ran that same test on Linux with Python 3.5.1, it took about 3 seconds. I was amazed to see a 20x difference.

[issue26118] String performance issue using single quotes

2016-01-14 Thread poostenr
poostenr added the comment: Eric, I just tried your examples. The loop count is 100x more, but the results are about a factor 10 off. Test1: My results: C:\Data>python -m timeit -s 'x=4' '",{0}".format(x)' 1 loops, best of 3: 0.0116 usec per loop Eric's results: $ python -m timeit

[issue26119] Windows Installer can sometimes silently fail pip stage

2016-01-14 Thread Paul Hammant
New submission from Paul Hammant: It NEEDS to communicate more as to why it is rolling back the pip install (progress bar goes backwards, install fails). Reasons can be: 1. older/wrong versions of Python listed in the PATH - eg c:\Python27 encountered when c:\Python34 is being installed.

[issue26096] '*' glob string matches dot files in pathlib

2016-01-14 Thread Guido van Rossum
Guido van Rossum added the comment: If you have that use case you're probably better of using os.walk() so you are not limited to a prune strategy that can be expressed using a single glob pattern (e.g. maybe I want to ignore .git, .hg and __pycache__ but descend into everything else). I

[issue25682] __package__ not set to None under pdb in Python 3

2016-01-14 Thread SilentGhost
Changes by SilentGhost : -- nosy: +brett.cannon, eric.snow, ncoghlan ___ Python tracker ___

[issue26116] CSV-module. The example code don't work. Have to be: reader = csv.reader(csvfile, dialect=dialect)

2016-01-14 Thread Василь Коломієць
Changes by Василь Коломієць : Added file: http://bugs.python.org/file41620/CSV-ex.png ___ Python tracker ___

[issue23606] ctypes.util.find_library("c") no longer makes sense

2016-01-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: Does it mean `cdll.msvcrt` is not the standard way to access the C symbols anymore? Could you update the docs to reflect the current guidelines? (https://docs.python.org/3/library/ctypes.html) -- nosy: +pitrou ___

[issue26118] String performance issue using single quotes

2016-01-14 Thread Eric V. Smith
Eric V. Smith added the comment: I see a small difference, but I think it's related to the fact that in the first example you're concatenating 2 strings (',' and the result of {0}), and in the 2nd example it's 3 strings ("'", {0}, "',"): $ echo '",{0}".format(x)' ",{0}".format(x) $ python -m

[issue26102] access violation in PyErrFetch if tcur==null in PyGILState_Release

2016-01-14 Thread SilentGhost
Changes by SilentGhost : -- nosy: +benjamin.peterson ___ Python tracker ___ ___

[issue26116] CSV-module. The example code don't work. Have to be: reader = csv.reader(csvfile, dialect=dialect)

2016-01-14 Thread Василь Коломієць
Василь Коломієць added the comment: Thanx a lot. And sorry. But with ..., dialect=dialect, the same code is working. . Ok. i'll try to understand. With best wishes - VK. С уважением, Василий Коломиец +38050 45 22 559 2016-01-15 0:18 GMT+02:00 SilentGhost : > >

[issue26118] String performance issue using single quotes

2016-01-14 Thread Eric V. Smith
Eric V. Smith added the comment: Please show us how you're measuring the performance. Also, please show the output of "python -V". -- components: +Interpreter Core -Windows nosy: +eric.smith -paul.moore, steve.dower, tim.golden, zach.ware ___ Python

[issue25940] SSL tests failed due to expired svn.python.org SSL certificate

2016-01-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset fb7131939508 by Martin Panter in branch '2.7': Issue #25940: Use self-signed.pythontest.net in SSL tests https://hg.python.org/cpython/rev/fb7131939508 -- ___ Python tracker

[issue26111] On Windows, os.scandir will keep a handle on the directory until the iterator is exhausted

2016-01-14 Thread Eryk Sun
Eryk Sun added the comment: > That behavior on Windows is quite counterintuitive. It's counter-intuitive from a POSIX point of view, in which anonymous files are allowed. In contrast, Windows allows any existing reference to unset the delete disposition, so the name cannot be unlinked until

[issue26118] String performance issue using single quotes

2016-01-14 Thread ubehera
Changes by ubehera : -- nosy: +ubehera ___ Python tracker ___ ___ Python-bugs-list

[issue26116] CSV-module. The example code don't work. Have to be: reader = csv.reader(csvfile, dialect=dialect)

2016-01-14 Thread Василь Коломієць
Василь Коломієць added the comment: I am very happy! Thx for attention to my opinion. Sorry for my english. so - in attachment two codes and source csv-file. With best wishes, Vasyl Kolomiets. +38050 45 22 559 2016-01-15 0:38 GMT+02:00 Georg Brandl : > > Georg Brandl

[issue25940] SSL tests failed due to expired svn.python.org SSL certificate

2016-01-14 Thread Martin Panter
Martin Panter added the comment: In the 3.3 branch, I got a failure in test_ssl.ThreadedTests.test_dh_params(): “SSLError: [SSL] dh key too small (_ssl.c:548)”. But the failure also happens in the revision before my merge, so I think it must be a separate problem. Also, I am seeing Windows 7+

[issue26115] pathlib.glob('**') returns only directories

2016-01-14 Thread SilentGhost
SilentGhost added the comment: It is, however, exactly what documentation says it should do: > The “**” pattern means “this directory and all subdirectories, recursively”. -- nosy: +SilentGhost resolution: -> not a bug stage: -> resolved status: open -> closed

[issue25995] os.walk() consumes a lot of file descriptors

2016-01-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, OSError, MemoryError and KeyboardInterrupt can be raised during iterating scandir object or calling is_dir() or is_symlink() methods of the result. They stop iterating and left file descriptor open. If close file descriptor on error during iteration

[issue25994] File descriptor leaks in os.scandir()

2016-01-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If scandir() is implemented as native Python generator (see for example issue25911), it could easily be converted to context manager: def scandir(path): return contextlib.closing(native_scandir(path)) def native_scandir(path): ... yield ...

[issue24950] FAIL: test_expanduser when $HOME=/

2016-01-14 Thread SilentGhost
SilentGhost added the comment: For posixpath the fix is straightforward: just skip that assert if the home ends up being '/' (the '/' is tested above). For pathlib, I'm not entirely sure what the fix should be. -- nosy: +SilentGhost, pitrou versions: +Python 3.6 -Python 3.3, Python

[issue25994] File descriptor leaks in os.scandir()

2016-01-14 Thread Martin Panter
Martin Panter added the comment: Contextlib.closing() cannot be used in general, because it doesn’t inherit the iterator protocol from the wrapped generator. So I think you really need a class that implements __exit__(), __iter__(), etc at the same time. --

[issue26118] String performance issue using single quotes

2016-01-14 Thread poostenr
poostenr added the comment: My initial observations with my Python script using: s = "{0},".format(columnvalue) # fast Processed ~360MB of data from 2:16PM - 2:51PM (35 minutes, ~10MB/min) One particular file 6.5MB took ~1 minute. When I changed this line of code to: s =

[issue23606] ctypes.util.find_library("c") no longer makes sense

2016-01-14 Thread Steve Dower
Steve Dower added the comment: Strictly there's nothing incorrect about the docs, and `cdll.msvcrt` is no more incorrect than it has been since Python 2.4 or so (whenever we stopped using VC6). It will find the DLL and you can call the functions, but it isn't the same DLL as the exports in

[issue26113] pathlib p.match('') should return False rather than raising exception

2016-01-14 Thread Guido van Rossum
Guido van Rossum added the comment: A benefit is that it catches certain bugs early. It's not really worth a fight, so status quo wins. -- resolution: -> wont fix status: open -> closed ___ Python tracker

[issue26096] '*' glob string matches dot files in pathlib

2016-01-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'm frankly not sure that's a bug. If you want to filter out dotfiles, it is quite easy to do yourself. On the other hand, if pathlib always filtered them out, it would be more cumbersome to get a unified set of results with both dotfiles and non-dotfiles.

[issue26096] '*' glob string matches dot files in pathlib

2016-01-14 Thread Guido van Rossum
Guido van Rossum added the comment: I've thought about this too, and I've decided it's a feature. As Antoine says, it's easy enough to filter the dot files out if you don't want them; it's slightly complicated to include them if the default is to skip them. -- resolution: -> not a

[issue25491] ftplib.sendcmd only accepts string

2016-01-14 Thread SilentGhost
Changes by SilentGhost : -- nosy: +giampaolo.rodola versions: +Python 3.6 -Python 3.4 ___ Python tracker ___

[issue26096] '*' glob string matches dot files in pathlib

2016-01-14 Thread SilentGhost
Changes by SilentGhost : -- components: +Library (Lib) nosy: +gvanrossum, pitrou versions: +Python 3.6 -Python 3.4 ___ Python tracker

[issue25957] sockaddr_l2 lacks CID, address type (AF_BLUETOOTH sockets)

2016-01-14 Thread SilentGhost
Changes by SilentGhost : -- components: +Library (Lib) nosy: +haypo ___ Python tracker ___

[issue26110] Speedup method calls 1.2x

2016-01-14 Thread Guido van Rossum
Guido van Rossum added the comment: I like this idea! I like the limitations to positional-only calls. I do think that it would be nice if we could speed up C calls too -- today, s.startswith('abc') is slower than s[:3] == 'abc' precisely because of the lookup. But I'm all for doing this one

[issue26112] Error on example using "dialect" parameter. have to be: "dialect=dialect"

2016-01-14 Thread Василь Коломієць
New submission from Василь Коломієць: with open('example.csv') as csvfile: dialect = csv.Sniffer().sniff(csvfile.read(1024)) csvfile.seek(0) reader = csv.reader(csvfile, dialect) # ... process CSV file contents here ... -- have to be: ... reader = csv.reader(csvfile,

[issue26112] Error on example using "dialect" parameter. have to be: "dialect=dialect"

2016-01-14 Thread SilentGhost
SilentGhost added the comment: No, the shown code works just fine. -- nosy: +SilentGhost resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue25602] Add support for EVFILT_USER kqueue filter

2016-01-14 Thread SilentGhost
Changes by SilentGhost : -- nosy: +haypo stage: -> patch review ___ Python tracker ___

[issue26038] zipfile cannot handle zip files where the archive size for a file does not match actual contents

2016-01-14 Thread SilentGhost
Changes by SilentGhost : -- nosy: +alanmcintyre, serhiy.storchaka, twouters versions: +Python 3.5, Python 3.6 -Python 3.4 ___ Python tracker

[issue26110] Speedup method calls 1.2x

2016-01-14 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +twouters ___ Python tracker ___ ___ Python-bugs-list

[issue25822] Add docstrings to fields of urllib.parse results

2016-01-14 Thread Swati Jaiswal
Swati Jaiswal added the comment: Thank you Senthil for the improvements, I'll try to make it better next time :) -- ___ Python tracker ___

[issue25913] base64.a85decode adobe flag incorrectly utilizes <~ as a marker causing error

2016-01-14 Thread Swati Jaiswal
Swati Jaiswal added the comment: Modified according to Serhiy's last comment. -- Added file: http://bugs.python.org/file41621/iss_25913_3.patch ___ Python tracker

[issue26119] Windows Installer can sometimes silently fail pip stage

2016-01-14 Thread Steve Dower
Steve Dower added the comment: Do you have any evidence of it failing for those reasons? The command used is specifically crafted to prevent those issues. I'm not saying there aren't potentially other issues that would be nice to surface (though fairly difficult without modifying a complex

[issue26120] pydoc: move __future__ imports out of the DATA block

2016-01-14 Thread Antony Lee
New submission from Antony Lee: Currently, for a module that uses __future__ imports, the DATA section of `pydoc foo` contains these imports interspersed with the "real" data from the module. Even though it is fully-featured _Feature objects that are imported, it probably makes sense to move

[issue26097] 2.7 documentation about TextTestRunner do not specify all the arguments

2016-01-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset 687f0d4bc188 by Senthil Kumaran in branch '2.7': Issue26097 - Fix the TextTestRunner documentation, mention all the arguments of the class. https://hg.python.org/cpython/rev/687f0d4bc188 -- nosy: +python-dev

[issue26097] 2.7 documentation about TextTestRunner do not specify all the arguments

2016-01-14 Thread Senthil Kumaran
Senthil Kumaran added the comment: Thanks for the report. Fixed. -- nosy: +orsenthil resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker

[issue26116] CSV-module. The example code don't work. Have to be: reader = csv.reader(csvfile, dialect=dialect)

2016-01-14 Thread SilentGhost
SilentGhost added the comment: Vasyl, this line in your code is causing the problem: for row in readed: The error reasonably clear states that it's due to your `fieldnames' parameter being non-iterable. Again, this has nothing whatsoever to do with `dialect' argument and documentation of

[issue26111] On Windows, os.scandir will keep a handle on the directory until the iterator is exhausted

2016-01-14 Thread Martin Panter
Martin Panter added the comment: Can you explain how it is different? The way I see it, both problems are about the scandir() iterator holding an open reference (file descriptor or handle) to a directory/folder, when the iterator was not exhausted, but the caller no longer needs it.

[issue25994] File descriptor leaks in os.scandir()

2016-01-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Since the close() method can be added only in 3.6, but we have leaks in 3.5 too, I suggest to closed file descriptor if error happened during iteration (issue26117). This will allow to write safe code even in 3.5. --

[issue26118] String performance issue using single quotes

2016-01-14 Thread poostenr
New submission from poostenr: There appears to be a significant performance issue between the following two statements. Unable to explain performance impact. s = "{0},".format(columnvalue) # fast s = "'{0}',".format(columnvalue) # ~30x slower So far, no luck trying to find other statements

[issue26111] On Windows, os.scandir will keep a handle on the directory until the iterator is exhausted

2016-01-14 Thread Remy Roy
Remy Roy added the comment: >From my point of view, Issue 25994 is about the potential file >descriptor/handle leaks and this issue is about being unable to perform some >filesystem calls because of a hidden unclosed file descriptor/handle. I am not going to protest if you want to treat them

[issue26113] pathlib p.match('') should return False rather than raising exception

2016-01-14 Thread JitterMan
JitterMan added the comment: I don't know that passing '' as a pattern to glob() makes much sense, but it is useful when passed to match(). Doing so allows me to build a filter that can easily and naturally be disabled. For example, the following allows me to get all the items in a directory

[issue26116] CSV-module. The example code don't work. Have to be: reader = csv.reader(csvfile, dialect=dialect)

2016-01-14 Thread Georg Brandl
Georg Brandl added the comment: Thanks! Now the reason is clear: You use csv.DictReader instead of csv.reader. csv.DictReader has a different argument list - for DictReader the second argument is `fieldnames`. -- ___ Python tracker

[issue26118] String performance issue using single quotes

2016-01-14 Thread poostenr
poostenr added the comment: Eric, Steven, During further testing I was not able to find any real evidence that the statement I was focused on had a real performance issue. As I did more testing I noticed that appending data to the file slowed down. The file grew initially with ~30-50KB

[issue23857] Make default HTTPS certificate verification setting configurable

2016-01-14 Thread Nick Coghlan
Nick Coghlan added the comment: Since PEP 493 is now a standards track PEP, the attached patch provides the reference implementation for the current PEP text. -- Added file: http://bugs.python.org/file41622/pep493_py27_ssl_config.diff ___ Python

[issue26113] pathlib p.match('') should return False rather than raising exception

2016-01-14 Thread JitterMan
New submission from JitterMan: One can use '*' as an 'accept all' pattern to match(). It would be nice to also use '' as a 'reject all' pattern. These 'accept all' and 'reject all' rules are useful as defaults. Currently passing '' to match() causes an exception. While it is easy enough to

[issue26111] On Windows, os.scandir will keep a handle on the directory until the iterator is exhausted

2016-01-14 Thread Eryk Sun
Eryk Sun added the comment: If you own the only reference you can also delete the reference, which deallocates the iterator and closes the handle. Can you provide concrete examples where os.remove and os.chmod fail? At least in Windows 7 and 10 the directory handle is opened with the normal

[issue25602] Add support for EVFILT_USER kqueue filter

2016-01-14 Thread Jakub Klama
Jakub Klama added the comment: Hey, any news on this? I've created that issue over 2 months ago and it didn't get even commented since then. -- ___ Python tracker

[issue24945] Expose Py_TPFLAGS_ values from Python

2016-01-14 Thread SilentGhost
Changes by SilentGhost : -- nosy: +benjamin.peterson versions: +Python 3.6 ___ Python tracker ___

[issue26111] On Windows, os.scandir will keep a handle on the directory until the iterator is exhausted

2016-01-14 Thread Ben Hoyt
Changes by Ben Hoyt : -- nosy: +benhoyt ___ Python tracker ___ ___ Python-bugs-list

[issue25668] Deadlock in logging caused by a possible race condition with "format"

2016-01-14 Thread Yury Selivanov
Changes by Yury Selivanov : -- nosy: +yselivanov ___ Python tracker ___ ___

[issue26113] pathlib p.match('') should return False rather than raising exception

2016-01-14 Thread SilentGhost
Changes by SilentGhost : -- components: +Library (Lib) nosy: +gvanrossum, pitrou versions: +Python 3.6 -Python 3.5 ___ Python tracker

[issue26058] PEP 509: Add ma_version to PyDictObject

2016-01-14 Thread Yury Selivanov
Changes by Yury Selivanov : -- nosy: +yselivanov ___ Python tracker ___ ___

[issue26113] pathlib p.match('') should return False rather than raising exception

2016-01-14 Thread Guido van Rossum
Guido van Rossum added the comment: What's the use case for a "reject all" pattern? Why do you want to call glob with an argument that causes it do do a bunch of pointless work but then return an empty result set? -- ___ Python tracker

[issue26114] Rewrite math.erf() and math.erfc() from scratch

2016-01-14 Thread Brett Cannon
New submission from Brett Cannon: If you look Modules/mathmodule.c you will notice there is a comment that goes with erf() and erfc() stating that the algorithms were taken from a book entitled 'Numerical Recipes'. Unfortunately that book has a license dictating that any information from the

[issue26114] Rewrite math.erf() and math.erfc() from scratch

2016-01-14 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +peter, teoliphant ___ Python tracker ___ ___

[issue26114] Rewrite math.erf() and math.erfc() from scratch

2016-01-14 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: -peter ___ Python tracker ___ ___ Python-bugs-list

[issue26110] Speedup method calls 1.2x

2016-01-14 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +dino.viehland ___ Python tracker ___ ___

[issue26111] On Windows, os.scandir will keep a handle on the directory until the iterator is exhausted

2016-01-14 Thread Remy Roy
New submission from Remy Roy: On Windows, os.scandir will keep a handle on the directory being scanned until the iterator is exhausted. This behavior can cause various problems if try to use some filesystem calls like os.chmod or os.remove on the directory while the handle is still being

[issue25753] Reference leaks in test_smtplib

2016-01-14 Thread SilentGhost
SilentGhost added the comment: Serhiy, I cannot reproduce these leaks on recent checkout. Is this something that's still happens for you? -- nosy: +SilentGhost ___ Python tracker

[issue26059] Integer Overflow in strop.replace()

2016-01-14 Thread Ramin Farajpour Cami
Ramin Farajpour Cami added the comment: Not work ,i think should check sizeof of memory avoid overflow assert(new_len > 0 && new_len <= PY_SSIZE_T_MAX); -- ___ Python tracker

[issue26117] Close directory descriptor in scandir iterator on error

2016-01-14 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Since scandir iterator has no close method, the most safe way to avoid file descriptors leaks when use os.scandir() is accumulating yielded results into a list before processing them: entries = list(os.scandir(path)) But this doesn't save us from all

  1   2   >