[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 increm

[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 trac

[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

[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

[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 pie

[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 ___ _

[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 ___ ___

[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 ___ ___

[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. User

[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 -s

[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. Stev

[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 c

[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 ETIMEDO

[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

[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 mailing list Unsubscribe: https://mail.python

[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 = Ti

[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

[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 ___

[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 t

[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 t

[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 th

[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 ___ Py

[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+

[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 = "'{0}',".format(colum

[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 ___ ___ Python-bugs-list mailing 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 added the comment: > > We

[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 a

[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 ___ ___ Python-bugs-list mailing list Unsubscr

[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

[issue26118] String performance issue using single quotes

2016-01-14 Thread ubehera
Changes by ubehera : -- nosy: +ubehera ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/

[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 thin

[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 3.4

[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
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 t

[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. --

[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 ___ _

[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 : > > SilentGhost added the commen

[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 ...

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

2016-01-14 Thread SilentGhost
Changes by SilentGhost : -- nosy: +benjamin.peterson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[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 (is

[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 ___

[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 al

[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. -

[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

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

2016-01-14 Thread Brett Cannon
Changes by Brett Cannon : -- assignee: flox -> brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

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

2016-01-14 Thread Martin Panter
Martin Panter added the comment: I definitely support adding a close() method, and a ResourceWarning if the iterator is not exhausted when it is deallocated. Adding context manager support is probably worthwhile as well, though there is one disadvantage: it would be hard to implement scandir()

[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

[issue24752] SystemError when importing from a non-package directory

2016-01-14 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> duplicate status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

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

2016-01-14 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue24752] SystemError when importing from a non-package directory

2016-01-14 Thread Brett Cannon
Changes by Brett Cannon : -- superseder: -> SystemError: Parent module '' not loaded, cannot perform relative import ___ Python tracker ___

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

2016-01-14 Thread Wil D'Amato
Changes by Wil D'Amato : -- nosy: +auslander1970 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue24752] SystemError when importing from a non-package directory

2016-01-14 Thread Chris Angelico
Chris Angelico added the comment: Linking this issue with #18018 - same problem, same situation. -- nosy: +Rosuav ___ Python tracker ___ _

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

2016-01-14 Thread Chris Angelico
Chris Angelico added the comment: This still happens in current CPython, and doesn't even require a package: rosuav@sikorsky:~$ echo 'from . import x' >syserr.py rosuav@sikorsky:~$ python3 syserr.py Traceback (most recent call last): File "syserr.py", line 1, in from . import x SystemErro

[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: Traceback (most recent call last): File "F:\Program Files (x86)\Pyton3_4\=Py\NovaPoshta\View#1-check-Trojan.py", line 11, in for row in readed: File "F:\Program Files (x86)\Pyton3_4\lib\csv.py", line 118, in __next__ d = dict(zip(self.fieldnames,

[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: This issue is not same as Issue 25994 but it is quite related. Some kind of close() method and/or context manager support could help here as well. -- ___ Python tracker

[issue26116] CSV-module. The example code don't work. Have to be: reader = csv.reader(csvfile, 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, dial

[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: I believe Eryk's explanation on how a file in Windows doesn't actually get unlinked until all handles and kernel pointer references are closed is spot on about the problem I had. I had a complex example that could probably have been simplified to what Eryk posted.

[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: Remy, is this the same problem described in Issue 25994? There a close() method (like on generators) and/or context manager support is proposed for the scandir() iterator. Perhaps we can keep this issue open for adding a warning to the documentation, and the ot

[issue25753] Reference leaks in test_smtplib

2016-01-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The result of searching leaks is not stable. I ran the test 10 times and got failures 3 times. -- ___ Python tracker ___

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

2016-01-14 Thread JitterMan
New submission from JitterMan: The title says it all. The shell version of '*' and '**' return both directories and files. Path('.').glob('*') returns both directories and files, but Path('.').glob('**') returns only directories. That seems wrong to me. -- messages: 258223 nosy: jitter

[issue26110] Speedup method calls 1.2x

2016-01-14 Thread STINNER Victor
STINNER Victor added the comment: I'm happy to see people working on optimizing CPython ;-) -- ___ Python tracker ___ ___ Python-bugs-

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

2016-01-14 Thread JitterMan
JitterMan added the comment: The same issues applies with '**', where it is harder to work around. The shell version of '**' prunes out hidden files and directories at all levels, whereas the pathlib.glob() includes all hidden directories. Major surgery would be required to filter out hidden f

[issue26110] Speedup method calls 1.2x

2016-01-14 Thread Yury Selivanov
Yury Selivanov 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

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

2016-01-14 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[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 re

[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 mailing list Unsubscribe: https://mail.python.

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

2016-01-14 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +peter, teoliphant ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[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 b

[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

[issue26058] PEP 509: Add ma_version to PyDictObject

2016-01-14 Thread Yury Selivanov
Changes by Yury Selivanov : -- nosy: +yselivanov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[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 ___

[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 cat

[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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[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 _

[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, dial

[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 __

[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 mailing list Unsubscribe: https://mail.python.org

[issue24945] Expose Py_TPFLAGS_ values from Python

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

[issue26110] Speedup method calls 1.2x

2016-01-14 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +dino.viehland ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[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 kept.

[issue26110] Speedup method calls 1.2x

2016-01-14 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +twouters ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[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 ___ ___ Python-bugs-list mail

[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 s

[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 ___ _

[issue25602] Add support for EVFILT_USER kqueue filter

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

[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 bug

[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 ___ ___ Python-bugs-list mailing list Unsubscri

[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. --

[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 ___ __

[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 ___

[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

[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 ___ ___ Python-bugs-list mailing list Unsub

[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

[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). Th

[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

[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 mailing list Unsubscribe:

[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 __

[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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

  1   2   >