[issue22524] PEP 471 implementation: os.scandir() directory scanning function

2015-02-13 Thread STINNER Victor
STINNER Victor added the comment: Note: bench_scandir2.py is a micro-benchmark. Ben's benchmark using walk() is more realistic, but I'm interested by micro-benchmark results. scandir-2.patch is faster than scandir-6.patch, much fast on Windows. Result of bench (cached): scandir-6.patch =

Re: Floating point g format not stripping trailing zeros

2015-02-13 Thread Hrvoje Nikšić
Ian Kelly writes: When you specify the a precision of 15 in your format string, you're telling it to take the first 15 of those. It doesn't care that the last couple of those are zeros, because as far as it's concerned, those digits are significant. OK, it's a bit surprising, but also

[issue22524] PEP 471 implementation: os.scandir() directory scanning function

2015-02-13 Thread STINNER Victor
STINNER Victor added the comment: Hi Ben, 2015-02-13 4:51 GMT+01:00 Ben Hoyt rep...@bugs.python.org: Hi Victor, I thank you for your efforts here, especially your addition of DirEntry.inode() and your work on the tests. The addition of inode() should still be discussed on python-dev. The

[issue23458] [2.7] random: make the file descriptor non-inheritable (on POSIX)

2015-02-13 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- versions: +Python 2.7 -Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23458 ___

[issue22524] PEP 471 implementation: os.scandir() directory scanning function

2015-02-13 Thread Alexei Romanov
Changes by Alexei Romanov drednout...@gmail.com: -- nosy: +alexei.romanov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22524 ___ ___

Dictionary from sqlite3.Row and PyCharm unresolved reference

2015-02-13 Thread Mario Figueiredo
Currently i'm using the following code to transform a row fetched from an sqlite database into a dictionary property: def __init__(self, id_): self.id = id_ self.data = None ... conn = sqlite3.connect('data') conn.row_factory = sqlite3.Row row =

[issue21840] Fix os.path in unicodeless build

2015-02-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8e2388b1e875 by Serhiy Storchaka in branch '2.7': Issue #21840: Fixed expanding unicode variables of form $var in https://hg.python.org/cpython/rev/8e2388b1e875 -- nosy: +python-dev ___ Python tracker

[issue21840] Fix os.path in unicodeless build

2015-02-13 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka dependencies: -Fix unicodeless build of Python resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org

[issue21840] Fix os.path in unicodeless build

2015-02-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 544c5d4f4084 by Serhiy Storchaka in branch '2.7': Issue #21840: Fixed a typo. https://hg.python.org/cpython/rev/544c5d4f4084 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21840

pyqtgraph window position

2015-02-13 Thread Poul Riis
I can control the size of my pyqtgraph window below with 'resize'. But how can I control the position on the screen? Poul Riis import pyqtgraph as pg w = pg.GraphicsWindow() w.resize(250,400) for i in range(4): w.addPlot(0, i) def onClick(event): but=event.button() print(but:

[issue9674] make install DESTDIR=/home/blah fails when the prefix specified is /

2015-02-13 Thread Ivailo Monev
Ivailo Monev added the comment: Can you please apply fix-root-prefix.patch? Or the updated version fof issue9674.patch that I've attached? sysconfig tests will still fail and it will return bogus paths with double slash (e.g. //lib/python2.7) but at least Python will be installable with

[issue23458] [2.7] random: make the file descriptor non-inheritable (on POSIX)

2015-02-13 Thread STINNER Victor
New submission from STINNER Victor: Attached patch tries to make the private random file descriptor non-inheritable. It should fix the following issue: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197376 I tried to write an unit test, but since the PEP 446 is not implemented, unexpected

[issue23458] [2.7] random: make the file descriptor non-inheritable (on POSIX)

2015-02-13 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: Added file: http://bugs.python.org/file38127/test_fd_status.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23458 ___

Re: fuzzysearch: find not exactly what you're looking for!

2015-02-13 Thread Tal Einat
Emile van Sebille writes: I adapt difflib's SequenceMatcher for my fuzzy search needs now -- can you provide some perspective on how fuzzysearch compares? Hi Emile, fuzzysearch is made for this purpose, is straightforward to use, is better documented and is much faster. What do you mean by

Re: fuzzysearch: find not exactly what you're looking for!

2015-02-13 Thread Tal Einat
Emile van Sebille writes: I adapt difflib's SequenceMatcher for my fuzzy search needs now -- can you provide some perspective on how fuzzysearch compares? Hi Emile, fuzzysearch is made for this purpose, is straightforward to use, is better documented and is much faster. What do you mean by

[issue17711] Persistent id in pickle with protocol version 0

2015-02-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The patch is updated to current sources. Also optimized writing ASCII strings and fixed tests. -- versions: +Python 3.5 -Python 3.3 Added file: http://bugs.python.org/file38128/fix_bad_persid_2.patch ___ Python

[issue23458] [2.7] random: make the file descriptor non-inheritable (on POSIX)

2015-02-13 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +koobs ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23458 ___ ___ Python-bugs-list

[issue23435] installation with full path as prefix incomplete

2015-02-13 Thread Ned Deily
Ned Deily added the comment: So the real problem here is configuring with --prefix=/ and then using make install DESTDIR to install to a temporary location. This is a duplicate of Issue9674; the problem is that --prefix=/ results in build variable the start with '//', like '//lib', and that

[issue22524] PEP 471 implementation: os.scandir() directory scanning function

2015-02-13 Thread STINNER Victor
STINNER Victor added the comment: Result of bench (cached): scandir-6.patch = scandir-2.patch (...) laptop using SSD and ext4: 1.3x faster = 2.8x faster desktop PC using HDD and ext4: 1.4x faster = 1.4x faster Oops, I copied the wrong numbers. scandir-2.patch is faster than that! * laptop

Re: Dictionary from sqlite3.Row and PyCharm unresolved reference

2015-02-13 Thread Peter Otten
Mario Figueiredo wrote: Currently i'm using the following code to transform a row fetched from an sqlite database into a dictionary property: class Unknown: def __init__(self, id_): self.id = id_ self.data = None ... conn = sqlite3.connect('data')

Re: Bad text appearance in IDLE

2015-02-13 Thread ast
Frank Millman fr...@chagford.com a écrit dans le message de news:mailman.18720.1423801380.18130.python-l...@python.org... I use Windows Server 2003. It also ran an automatic update yesterday. Something seems to have gone wrong with the system font. I don't use IDLE, but I use OutlookExpress

[issue23148] Missing the charset parameter in as_encoded_word()

2015-02-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ping. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23148 ___ ___ Python-bugs-list mailing list

[issue23147] Possible error in _header_value_parser.py

2015-02-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ping. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23147 ___ ___ Python-bugs-list mailing list

Re: line_profiler: what am I doing wrong?

2015-02-13 Thread Neal Becker
Robert Kern wrote: On 2015-02-11 01:17, Steven D'Aprano wrote: Neal Becker wrote: To quote from https://pypi.python.org/pypi/line_profiler/ $ kernprof -l script_to_profile.py kernprof will create an instance of LineProfiler and insert it into the __builtins__ namespace with the name

Re: Bad text appearance in IDLE

2015-02-13 Thread ast
Terry Reedy tjre...@udel.edu a écrit dans le message de news:mailman.18714.1423775571.18130.python-l...@python.org... Do you get anything similar when running the console interpreter? yes import tkinter as tk root = tk.Tk() text = tk.Text() text.pack() text.insert('1.0', 'this is a test

Re: Floating point g format not stripping trailing zeros

2015-02-13 Thread Grant Edwards
On 2015-02-12, Ian Kelly ian.g.ke...@gmail.com wrote: On Thu, Feb 12, 2015 at 1:23 PM, Hrvoje Nikšić hnik...@gmail.com wrote: {:.15g} is supposed to give 15 digits of precision, but with trailing zeros removed. The doc says with insignificant trailing zeros removed, not all trailing zeros.

[issue21849] Fix multiprocessing for non-ascii data

2015-02-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset a4a3a8b3f37f by Serhiy Storchaka in branch '2.7': Issue #21849: Fixed xmlrpclib serialization of non-ASCII unicode strings in https://hg.python.org/cpython/rev/a4a3a8b3f37f New changeset 908533d5a427 by Serhiy Storchaka in branch '3.4': Issue

Re: line_profiler: what am I doing wrong?

2015-02-13 Thread Neal Becker
Robert Kern wrote: @profile def run(): pass run() No, this doesn't work either. Same failure kernprof -l test_prof.py Wrote profile results to test_prof.py.lprof Traceback (most recent call last): File /home/nbecker/.local/bin/kernprof, line 9, in module

[issue23450] Possible loss of data warnings building 3.5 Visual Studio Windows 8.1 64 bit

2015-02-13 Thread Steve Dower
Steve Dower added the comment: int_overflows.patch looks good to me. I really appreciate that these patches have been done properly too - I've seen far too much code where people just throw in casts to silence the warnings. This is why I like working on Python :) --

[issue23452] Build errors using VS Express 2013 in win32 mode

2015-02-13 Thread Steve Dower
Steve Dower added the comment: I can't reproduce this easily. Could you delete the externals/tcltk folder and the Debug_VC12 folders under tk.../win, tix.../win and tcl-core.../win, rebuild and capture the output from the VS Output window? Apparently something in one of these external

[issue9566] Compilation warnings under x64 Windows

2015-02-13 Thread Steve Dower
Changes by Steve Dower steve.do...@microsoft.com: -- nosy: +steve.dower ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9566 ___ ___

[issue21107] Add pgen.vcxproj to allow regenerating grammar files on Windows

2015-02-13 Thread Steve Dower
Steve Dower added the comment: I don't even know what pgen is or why I'd want to build it... If running it updates a file that would trigger a rebuild, then I'd really like it to copy what _freeze_importlib currently does as far as writing to a temporary file and conditionally overwriting the

ctypes.cdll.LoadLibrary() freezes when loading a .so that contains dlopen()

2015-02-13 Thread Russell
I have a shared library, libfoo.so, that references another .so which isn't linked but instead loaded at runtime with myso=dlopen(/usr/local/lib/libbar.so, RTLD_NOW); when I try to load it with ctypes, the call hangs and I have to ctl-c. (build)[dev]$ export LD_LIBRARY_PATH=/usr/local/bin

[issue23350] Content-length is incorrect when request body is a list or tuple

2015-02-13 Thread Demian Brecht
Demian Brecht added the comment: Thanks for the review Martin, I've addressed your comments. The length of an encoded Latin-1 string should equal the length of the unencoded text string, since it is a one-to-one character-to-byte encoding. Once in a while, I want to stop what I'm doing, put

[issue23458] [2.7] random: make the file descriptor non-inheritable (on POSIX)

2015-02-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'm not sure what the point is - there are many child descriptors which may inherited, why care about this one? The right way to avoid this on 2.7 is to call subprocess.Popen(..., close_fds=True). -- ___ Python

[issue23460] Decimals do not obey ':g' exponential notation formatting rules

2015-02-13 Thread Ian Kelly
New submission from Ian Kelly: '{:g}'.format(D('0.01')) '0.01' Formatted with '{:e}', the exponent would be -6, so per the formatting rules described under the 'g' specifier at https://docs.python.org/3/library/string.html#format-specification-mini-language the above should be

[issue23458] [2.7] random: make the file descriptor non-inheritable (on POSIX)

2015-02-13 Thread STINNER Victor
STINNER Victor added the comment: I'm not sure what the point is - there are many child descriptors which may inherited, why care about this one? The bug report comes from FreeBSD, https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197376 They use os.system(), at least in the bug report.

[issue21568] Win32 pip doesn't use relative path to found site-packages.

2015-02-13 Thread Steve Dower
Steve Dower added the comment: Already reported at https://github.com/pypa/pip/issues/1889 -- resolution: - third party status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21568

Re: Floating point g format not stripping trailing zeros

2015-02-13 Thread Ian Kelly
On Fri, Feb 13, 2015 at 2:26 AM, Hrvoje Nikšić hnik...@gmail.com wrote: Ian Kelly writes: When you specify the a precision of 15 in your format string, you're telling it to take the first 15 of those. It doesn't care that the last couple of those are zeros, because as far as it's concerned,

[issue20523] global .pdbrc on windows 7 not reachable out of the box

2015-02-13 Thread Steve Dower
Steve Dower added the comment: expanduser() sounds like the better choice here. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20523 ___ ___

[issue18295] Possible integer overflow in PyCode_New()

2015-02-13 Thread Steve Dower
Steve Dower added the comment: Other than my one query on the review, code_ssize_t_2.patch.patch looks good to me. -- nosy: +steve.dower ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18295

[issue21107] Add pgen.vcxproj to allow regenerating grammar files on Windows

2015-02-13 Thread Zachary Ware
Zachary Ware added the comment: I don't even know what pgen is or why I'd want to build it... pgen is the parser generator, taking Grammar/Grammar as input and generating Include/graminit.h and Python/graminit.c. Only useful when you're changing Python's grammar, but without the ability to

[issue7200] multiprocessing deadlock on Mac OS X when queue collected before process terminates

2015-02-13 Thread Davin Potts
Davin Potts added the comment: This issue was marked as not a bug by OP a while back but for whatever reason it did not also get marked as closed. Going ahead with closing it now. -- nosy: +davin stage: needs patch - resolved status: open - closed

Re: Floating point g format not stripping trailing zeros

2015-02-13 Thread Ian Kelly
On Fri, Feb 13, 2015 at 7:02 AM, Grant Edwards invalid@invalid.invalid wrote: On 2015-02-12, Ian Kelly ian.g.ke...@gmail.com wrote: On Thu, Feb 12, 2015 at 1:23 PM, Hrvoje Nikšić hnik...@gmail.com wrote: {:.15g} is supposed to give 15 digits of precision, but with trailing zeros removed.

[issue17229] unable to discover preferred HTTPConnection class

2015-02-13 Thread Demian Brecht
Changes by Demian Brecht demianbre...@gmail.com: -- nosy: -demian.brecht ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17229 ___ ___

[issue23425] Windows getlocale unix-like with french, german, portuguese, spanish

2015-02-13 Thread R. David Murray
R. David Murray added the comment: This is either related to or effectively a duplicate of issue 10466, which contains a fair amount of discussion of the underlying problems. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org

[issue23440] Extend http.server.SimpleHTTPRequestHandler testing

2015-02-13 Thread Demian Brecht
Changes by Demian Brecht demianbre...@gmail.com: -- nosy: +demian.brecht ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23440 ___ ___

Re: Dictionary from sqlite3.Row and PyCharm unresolved reference

2015-02-13 Thread Mario Figueiredo
In article mailman.18727.1423827222.18130.python-l...@python.org, __pete...@web.de says... self.data = dict(row) I didn't realize from the documentation it could be this simple. Thanks. And now an unsolicited remark: if you have more than one instance of Unknown you might read the data

[issue15914] multiprocessing.SyncManager connection hang

2015-02-13 Thread Brett Cannon
Brett Cannon added the comment: Dead code deletion should be a separate issue, so I'm going to close this as fixed. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15914

[issue23410] Document more BaseHTTPRequestHandler attributes

2015-02-13 Thread Demian Brecht
Changes by Demian Brecht demianbre...@gmail.com: -- nosy: +demian.brecht ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23410 ___ ___

[issue23447] Import fails when doing a circular import involving an `import *`

2015-02-13 Thread Brett Cannon
Brett Cannon added the comment: If you want to take a stab at it, Steven, go for it and I will review the patch, but as you pointed out this is such an edge case that I'm personally not going to worry about fixing it and still don't consider it a bug. -- title: Relative imports with

[issue23418] Keep http.server.__all__ up to date

2015-02-13 Thread Demian Brecht
Demian Brecht added the comment: LGTM. +1 -- nosy: +demian.brecht ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23418 ___ ___ Python-bugs-list

[issue23418] Keep http.server.__all__ up to date

2015-02-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset d2dbec7d74d0 by Berker Peksag in branch '3.4': Issue #23418: Add missing entries to http.server.__all__. https://hg.python.org/cpython/rev/d2dbec7d74d0 New changeset 03e3e78014ea by Berker Peksag in branch 'default': Issue #23418: Add missing

[issue23434] RFC6266 support (Content-Disposition for HTTP)

2015-02-13 Thread R. David Murray
R. David Murray added the comment: Since that library is not part of the stdlib, this is not an appropriate patch for CPython. Note that this issue is also relevant to the email library, which intends to support RFC2616 header parsing/generation, and therefore should also be enhanced to

Re: Floating point g format not stripping trailing zeros

2015-02-13 Thread Grant Edwards
On 2015-02-13, Ian Kelly ian.g.ke...@gmail.com wrote: On Fri, Feb 13, 2015 at 7:02 AM, Grant Edwards invalid@invalid.invalid wrote: On 2015-02-12, Ian Kelly ian.g.ke...@gmail.com wrote: On Thu, Feb 12, 2015 at 1:23 PM, Hrvoje Nikšić hnik...@gmail.com wrote: {:.15g} is supposed to give 15

[issue21717] Exclusive mode for ZipFile and TarFile

2015-02-13 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the review, Serhiy. I'll take a look at the zipfile patch tomorrow. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21717 ___

[issue17527] PATCH as valid request method in wsgiref.validator

2015-02-13 Thread Berker Peksag
Berker Peksag added the comment: LGTM. -- nosy: +berker.peksag stage: - commit review versions: +Python 2.7, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17527 ___

Re: Python discussed in Nature

2015-02-13 Thread John Ladasky
On Thursday, February 12, 2015 at 7:12:01 PM UTC-8, Steven D'Aprano wrote: John Ladasky wrote: And I use Unicode in my Python. In implementing some mathematical models which have variables like delta, gamma, and theta, I decided that I didn't like the line lengths I was getting with such

[issue17349] wsgiref.simple_server.demo_app is not PEP-3333 compatible

2015-02-13 Thread Berker Peksag
Berker Peksag added the comment: I'm not sure this needs to be fixed in 2.7. I would only use demo_app to test WSGI servers. Otherwise, you need to create your own application. However, the code is correct in Python 3:

[issue23425] Windows getlocale unix-like with french, german, portuguese, spanish

2015-02-13 Thread R. David Murray
R. David Murray added the comment: Sorry, when I said effectively a duplicate I didn't mean *actually* a duplicate, I meant that fixing one will either result in or require fixing the other (same core cause: the disconnect between the Windows names and the unix names and the need for a

[issue23418] Keep http.server.__all__ up to date

2015-02-13 Thread Berker Peksag
Berker Peksag added the comment: Fixed. Thanks Martin (also thanks to Demian for the review). -- resolution: - fixed stage: commit review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23418

[issue21717] Exclusive mode for ZipFile and TarFile

2015-02-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset ed9e9e6b3c1e by Berker Peksag in branch 'default': Issue #21717: tarfile.open() now supports 'x' (exclusive creation) mode. https://hg.python.org/cpython/rev/ed9e9e6b3c1e -- nosy: +python-dev ___ Python

[issue14652] Better error messages for wsgiref validator failures

2015-02-13 Thread Berker Peksag
Berker Peksag added the comment: Here is an updated patch. For InputWrapper.read(), see issue 18610. -- nosy: +berker.peksag stage: - patch review versions: +Python 3.4, Python 3.5 -Python 3.3 Added file: http://bugs.python.org/file38131/issue14652.diff

[issue17852] Built-in module _io can loose data from buffered files at exit

2015-02-13 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17852 ___ ___ Python-bugs-list

[issue23461] Building on windows modifies importlib.h

2015-02-13 Thread Eric Snow
Eric Snow added the comment: This implies to me that someone didn't include importlib.h in their commit when they changed something that required it to be rebuilt. However, if it's a Windows-only thing then perhaps there is something else afoot. Steve? -- nosy: +brett.cannon,

[issue23425] Windows getlocale unix-like with french, german, portuguese, spanish

2015-02-13 Thread albertjan
albertjan added the comment: I agree that the two issues are related, but I don't see how they could be duplicates. But maybe that's because I do not know the underlying code. issue 10466 is mostly about getdefaultlocale() and whether it's desirable or not that its return value is always

Re: Python discussed in Nature

2015-02-13 Thread Chris Angelico
On Sat, Feb 14, 2015 at 6:40 AM, John Ladasky john_lada...@sbcglobal.net wrote: The default font that the Geany program editor uses on my Ubuntu system renders everything I've tried. When I look up that font in Geany's Preferences menu, it is called, simply, monospace. That's a font alias.

[issue23452] Build errors using VS Express 2013 in win32 mode

2015-02-13 Thread Steve Dower
Steve Dower added the comment: Hmm, so maybe it only happens after you build the 64-bit version first. But apparently it's more complex than that, since that doesn't repro either. When I get some more time I'll run though and double check all the rebuild conditions, but it has worked fine for

Re: Floating point g format not stripping trailing zeros

2015-02-13 Thread Mark Lawrence
On 12/02/2015 23:46, Ian Kelly wrote: On Thu, Feb 12, 2015 at 1:23 PM, Hrvoje Nikšić hnik...@gmail.com wrote: from decimal import Decimal as D x = D(1)/D(999) '{:.15g}'.format(x) '0.00100100100100100' [...] I'd say it's a bug. P is 15, you've got 17 digits after the decimal place and two

[issue23461] Building on windows modifies importlib.h

2015-02-13 Thread Zachary Ware
Zachary Ware added the comment: What does the diff to importlib.h look like? Does it look like a real change to importlib or is it something innocuous like a change in whitespace or the path separator in the heading? -- components: +Build, Windows nosy: +tim.golden, zach.ware

Re: Python discussed in Nature

2015-02-13 Thread Sturla Molden
On 12/02/15 15:39, Marko Rauhamaa wrote: I write both Py2 and Py3 code, but I keep the two worlds hermetically separated from each other. In SciPy world we run the same code on Python 2 and Python 3. Sturla -- https://mail.python.org/mailman/listinfo/python-list

[issue23461] Building on windows modifies importlib.h

2015-02-13 Thread Paul Moore
New submission from Paul Moore: When building Python (cpython repository, tip revision on the default branch) using Visual Studio 2015 (version downloaded 12/02/2015) I get a message in the build: C:\Work\Projects\cpython\PCbuild\_freeze_importlib.vcxproj(98,5): error : importlib.h has been

[issue14910] argparse: disable abbreviation

2015-02-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 99302634d756 by Berker Peksag in branch 'default': Issue #14910: Add allow_abbrev parameter to argparse.ArgumentParser. https://hg.python.org/cpython/rev/99302634d756 -- nosy: +python-dev ___ Python

[issue19829] _pyio.BufferedReader and _pyio.TextIOWrapper destructor don't emit ResourceWarning if the file is not closed

2015-02-13 Thread Martin Panter
Martin Panter added the comment: It looks like the C _io close() implementations delegate to the wrapped object’s undocumented _dealloc_warn() method to emit the warning if “self-finalizing” is set. For wrapped objects like BytesIO that do not have it, I guess the error due to the missing

[issue23461] Building on windows modifies importlib.h

2015-02-13 Thread Steve Dower
Steve Dower added the comment: Windows is probably the only platform that detects when _freeze_importlib makes a change and aborts the build :) I'd be interested to see what the diff is though. My guess is some of the recent marshal changes may have affected the output. --

Re: Floating point g format not stripping trailing zeros

2015-02-13 Thread Ian Kelly
On Fri, Feb 13, 2015 at 1:33 PM, Grant Edwards invalid@invalid.invalid wrote: On 2015-02-13, Ian Kelly ian.g.ke...@gmail.com wrote: On Fri, Feb 13, 2015 at 7:02 AM, Grant Edwards invalid@invalid.invalid wrote: On 2015-02-12, Ian Kelly ian.g.ke...@gmail.com wrote: On Thu, Feb 12, 2015 at 1:23

[issue23452] Build errors using VS Express 2013 in win32 mode

2015-02-13 Thread Mark Lawrence
Mark Lawrence added the comment: I don't have externals/tcltk, only externals/tcltk64. There is a Debug_VC12 folder under tix.../win. There is no Debug_VC12 folder under tk.../win, tcl-core.../win or for that matter tcl.../win, only Debug_AMD64_VC12. --

Re: Floating point g format not stripping trailing zeros

2015-02-13 Thread Dave Angel
On 02/13/2015 03:33 PM, Grant Edwards wrote: On 2015-02-13, Ian Kelly ian.g.ke...@gmail.com wrote: Significant digits are within the precision of the calculation. Writing 1.230 indicates that the fourth digit is known to be zero. Writing 1.23 outside a context of exact calculation indicates

Re: Floating point g format not stripping trailing zeros

2015-02-13 Thread Ian Kelly
On Fri, Feb 13, 2015 at 2:22 PM, Grant Edwards invalid@invalid.invalid wrote: On 2015-02-13, Dave Angel da...@davea.name wrote: On the other hand, the Decimal package has a way that the programmer can tell how many digits to use at each stage of the calculation. That's what surpised me. From

[issue22524] PEP 471 implementation: os.scandir() directory scanning function

2015-02-13 Thread Akira Li
Akira Li added the comment: As I've mentioned in http://bugs.python.org/issue22524#msg231703 os.walk size 7925376343, scandir.walk size 5534939617 -- NOT EQUAL! os.walk and scandir.walk do a different work here. I don't see that it is acknowledged so I assume the benchmark is not fixed. If

Re: Floating point g format not stripping trailing zeros

2015-02-13 Thread Grant Edwards
On 2015-02-13, Dave Angel da...@davea.name wrote: On 02/13/2015 03:33 PM, Grant Edwards wrote: On 2015-02-13, Ian Kelly ian.g.ke...@gmail.com wrote: Significant digits are within the precision of the calculation. Writing 1.230 indicates that the fourth digit is known to be zero. Writing 1.23

[issue23424] Unicode character ends interactive session

2015-02-13 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- resolution: - duplicate stage: - resolved status: open - closed superseder: - windows console doesn't print or input Unicode ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23424

Re: Floating point g format not stripping trailing zeros

2015-02-13 Thread Ian Kelly
On Fri, Feb 13, 2015 at 2:40 PM, Ian Kelly ian.g.ke...@gmail.com wrote: On Fri, Feb 13, 2015 at 2:22 PM, Grant Edwards invalid@invalid.invalid wrote: On 2015-02-13, Dave Angel da...@davea.name wrote: On the other hand, the Decimal package has a way that the programmer can tell how many

[issue23461] Building on windows modifies importlib.h

2015-02-13 Thread Paul Moore
Paul Moore added the comment: Ah. It's 4K lines of everything changing. Looks like it might be an EOL issue. The build seems to be changing it from LF line endings to CRLF line endings. -- ___ Python tracker rep...@bugs.python.org

[issue14910] argparse: disable abbreviation

2015-02-13 Thread Berker Peksag
Berker Peksag added the comment: Committed. Thank you all for patches and reviews :) -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14910

[issue23425] Windows getlocale unix-like with french, german, portuguese, spanish

2015-02-13 Thread eryksun
eryksun added the comment: -setlocale should return nothing. It's a setter -getlocale should return a platform-specific locale specification, probably what is currently returned by setlocale. The output should be ready for consumption by setlocale. These functions are well documented, so

Re: ctypes.cdll.LoadLibrary() freezes when loading a .so that contains dlopen()

2015-02-13 Thread Ian Kelly
On Fri, Feb 13, 2015 at 8:39 AM, Russell russ...@infiniteio.com wrote: I have a shared library, libfoo.so, that references another .so which isn't linked but instead loaded at runtime with myso=dlopen(/usr/local/lib/libbar.so, RTLD_NOW); when I try to load it with ctypes, the call hangs and

[issue23461] Building on windows modifies importlib.h

2015-02-13 Thread Zachary Ware
Zachary Ware added the comment: Ah ha. Do you have the hg eol extension enabled? If not, you probably should; it makes for far fewer headaches on Windows, and should make this issue go away. We should probably try to mitigate the problem anyway; Steve, how hard would it be to change the 'see

[issue13637] binascii.a2b_* functions could accept unicode strings

2015-02-13 Thread Berker Peksag
Berker Peksag added the comment: The binascii documentation already says ``a2b_*`` functions accept Unicode strings containing only ASCII characters. [...] .. versionchanged:: 3.3 ASCII-only unicode strings are now accepted by the ``a2b_*`` functions. I think we can just remove

[issue23461] Building on windows modifies importlib.h

2015-02-13 Thread Steve Dower
Steve Dower added the comment: It's possible, but the eol extension is the best way to handle it. Doing the comparison is relatively easy (we can just strip all '\r' and '\n' characters and compare), but if it has changed, it's much harder to update the new file to match whatever the old file

[issue23461] Building on windows modifies importlib.h

2015-02-13 Thread Paul Moore
Paul Moore added the comment: I'm just about finished for the night but I'll try the eol extension tomorrow. I don't really use it much, though, my practice is generally to make all my tools use LF. I certainly didn't do anything that would change that file, so something in the build must be

[issue13637] binascii.a2b_* functions could accept unicode strings

2015-02-13 Thread Martin Panter
Martin Panter added the comment: That’s another option. Someone might wonder why a2b_hex() and a2b_qp() actually accept text strings in Python 3.1 when the documentation says you need 3.3, but I guess that’s not such a big deal. Posting patch v3 which removes the 3.2 notices. --

Re: Floating point g format not stripping trailing zeros

2015-02-13 Thread Ian Kelly
On Fri, Feb 13, 2015 at 4:05 PM, Mark Lawrence breamore...@yahoo.co.uk wrote: I still think it's a bug as the 'p' being referred to in the OP's original message is The precision is a decimal number indicating how many digits should be displayed after the decimal point for a floating point value

[issue23461] Building on windows modifies importlib.h

2015-02-13 Thread Zachary Ware
Zachary Ware added the comment: The other option would be to change _freeze_importlib to force it to use \n instead of \r\n; I'm not sure which change would be harder to do. Paul: fair enough; I've just found that keeping eol enabled reduces headaches due to line endings to almost nothing, just

[issue23461] Building on windows modifies importlib.h

2015-02-13 Thread Mark Lawrence
Mark Lawrence added the comment: I noticed a few days ago that this file had changed as I got a merge conflict using the tortoisehg sychronize command. At the time I didn't think much of it and believe I simply let hg sort it out. The changeset was 8ab6b404248c #21295. -- nosy:

[issue22928] HTTP header injection in urrlib2/urllib/httplib/http.client

2015-02-13 Thread Demian Brecht
Demian Brecht added the comment: Here's a patch addressing the potential vulnerability as reported. The patch should also bring the implementation up to date with the most recent standards around header names and values. There could be potential for breaking compatibility if people are

[issue22524] PEP 471 implementation: os.scandir() directory scanning function

2015-02-13 Thread Ben Hoyt
Ben Hoyt added the comment: Akari: yes, I'm aware of this, and it's definitely a concern to me -- it may be that scandir has a bug with counting the size of certain non-file directory entries, or my implementation of os.walk() via scandir is not quite correct. I'll look at it before too long!

[issue23440] Extend http.server.SimpleHTTPRequestHandler testing

2015-02-13 Thread Demian Brecht
Demian Brecht added the comment: LGTM -- versions: +Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23440 ___ ___ Python-bugs-list

[issue23410] Document more BaseHTTPRequestHandler attributes

2015-02-13 Thread Demian Brecht
Demian Brecht added the comment: Minor comment in Rietveld, otherwise LGTM. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23410 ___ ___

Re: Floating point g format not stripping trailing zeros

2015-02-13 Thread Mark Lawrence
On 14/02/2015 00:11, Ian Kelly wrote: On Fri, Feb 13, 2015 at 4:05 PM, Mark Lawrence breamore...@yahoo.co.uk wrote: I still think it's a bug as the 'p' being referred to in the OP's original message is The precision is a decimal number indicating how many digits should be displayed after the

  1   2   >