[issue21058] tempfile.NamedTemporaryFile leaks file descriptor when fdopen fails

2014-03-24 Thread tholzer
New submission from tholzer: The NamedTemporaryFile inside the standard tempfile library leaks an open file descriptor when fdopen fails. Test case: # ulimit -SHn 50 # python test1.py from tempfile import NamedTemporaryFile while 1: try: NamedTemporaryFile(mode='x') except Va

[issue21057] TextIOWrapper does not support reading bytearrays or memoryviews

2014-03-24 Thread Nikolaus Rath
Nikolaus Rath added the comment: If someone is willing to review, I'd be happy to write a patch for this. -- ___ Python tracker ___ __

[issue21057] TextIOWrapper does not support reading bytearrays or memoryviews

2014-03-24 Thread Nikolaus Rath
New submission from Nikolaus Rath: In Python 3.4, TextIOWrapper can not read from streams that return bytearrays or memoryviews: from io import TextIOWrapper, BytesIO class MyByteStream(BytesIO): def read1(self, len_): return memoryview(super().read(len_)) bs = MyByteStream(b'some d

[issue21056] csv documentation is incorrect

2014-03-24 Thread NRGunby
New submission from NRGunby: The documentation for the csv reader objects next() method is incorrect. It states ' csvreader.next() Return the next row of the reader’s iterable object as a list, parsed according to the current dialect.' Either the documentation for DictReader objects needs to

[issue15955] gzip, bz2, lzma: add option to limit output size

2014-03-24 Thread Nikolaus Rath
Nikolaus Rath added the comment: I have attached a patch adding the max_length parameter to LZMADecompressor.decompress(). I have chosen to store the pointer to any unconsumed input in the lzma stream object itself. The new convention is: if lzs.next_in != NULL, then there is valid data that

[issue15955] gzip, bz2, lzma: add option to limit output size

2014-03-24 Thread Nikolaus Rath
Nikolaus Rath added the comment: Thanks Nadeem. I'll get going. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue20951] SSLSocket.send() returns 0 for non-blocking socket

2014-03-24 Thread Nikolaus Rath
Nikolaus Rath added the comment: (refreshed patch) -- Added file: http://bugs.python.org/file34608/issue20951.diff ___ Python tracker ___

[issue20904] HAVE_PY_SET_53BIT_PRECISION for m68k

2014-03-24 Thread Benjamin Peterson
Benjamin Peterson added the comment: On Mon, Mar 24, 2014, at 14:56, Martin v. Löwis wrote: > > Martin v. Löwis added the comment: > > What triggered my interpretation might have been this conversation: > > https://mail.python.org/pipermail/python-dev/2002-May/023998.html > https://mail.python

[issue20469] ssl.getpeercert() should include extensions

2014-03-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: The ssl module doesn't return all cert contents simply because it isn't easy to do so, or at least AFAICT it isn't. If you look at _decode_certificate() in Modules/_ssl.c you'll see the kind of code that is needed for the few fields that Python currently retur

[issue20469] ssl.getpeercert() should include extensions

2014-03-24 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- stage: test needed -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20469] ssl.getpeercert() should include extensions

2014-03-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: If you can, write test code that fails now and indicate what success would look like. It can start as a separate file rather than a patch to test_ssl. It does not have to use unittest, though that would be helpful. -- nosy: +terry.reedy stage: -> test

[issue21043] Stop recommending CACert.org in the SSL documentation

2014-03-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7ef262eafecd by Donald Stufft in branch '2.7': Issue #21043 - Remove CACert.org from the recommendations http://hg.python.org/cpython/rev/7ef262eafecd -- ___ Python tracker

[issue21043] Stop recommending CACert.org in the SSL documentation

2014-03-24 Thread Donald Stufft
Changes by Donald Stufft : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue21043] Stop recommending CACert.org in the SSL documentation

2014-03-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0485552b487e by Donald Stufft in branch 'default': Merge in 3.4 to bring forward the Issue #21043 changes. http://hg.python.org/cpython/rev/0485552b487e -- ___ Python tracker

[issue21055] Index (augmented) assignment symbols

2014-03-24 Thread Terry J. Reedy
New submission from Terry J. Reedy: Dependency of 21054 -- files: index-assign.diff keywords: patch messages: 214763 nosy: terry.reedy priority: normal severity: normal stage: patch review status: open title: Index (augmented) assignment symbols type: behavior versions: Python 2.7, Pytho

[issue21043] Stop recommending CACert.org in the SSL documentation

2014-03-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6f776c91da08 by Donald Stufft in branch '3.4': Issue #21043: Remove the recommendation for specific CA organizations http://hg.python.org/cpython/rev/6f776c91da08 -- nosy: +python-dev ___ Python tracker

[issue21054] Improve indexing of syntax symbols

2014-03-24 Thread Terry J. Reedy
New submission from Terry J. Reedy: Since I will post multiple patches for review on separate issues, this is an index issue that will have multiple dependencies. -- messages: 214761 nosy: terry.reedy priority: normal severity: normal status: open title: Improve indexing of syntax symbo

[issue21044] tarfile does not handle file .name being an int

2014-03-24 Thread Antoine Pietri
Antoine Pietri added the comment: Well, this behavior seems pretty inconsistent to me, it means that every library has to check if the name attribute is actually a string (which would correspond to a path) or an int (that would mean a fd), and I think a "fd" attribute would seem more consiste

[issue20992] reading individual bytes of multiple binary files using the Python module fileinput

2014-03-24 Thread Josh Rosenberg
Josh Rosenberg added the comment: And of course, missed another typo. open's first arg should be file, not filename. -- ___ Python tracker ___ __

[issue20992] reading individual bytes of multiple binary files using the Python module fileinput

2014-03-24 Thread Josh Rosenberg
Josh Rosenberg added the comment: On memory: Yeah, it could be if the file didn't include any newline characters. Same problem could apply if a text input file relied on word wrap in an editor and included very few or no newlines itself. There are non-fileinput ways of doing this, like I said;

[issue21044] tarfile does not handle file .name being an int

2014-03-24 Thread Antoine Pietri
Antoine Pietri added the comment: Yes, the bug report was originally titled like this ("TemporaryFile should'nt have a name attribute") but apparently this is a common and expected behavior for FileIO subclasses. -- ___ Python tracker

[issue21044] tarfile does not handle file .name being an int

2014-03-24 Thread R. David Murray
R. David Murray added the comment: See the documentation link in msg214670. This isn't a characteristic of TemporaryFile, it's a characteristic of the Python IO system. So you'd have to argue that the documented behavior of the io system is a bug. --

[issue20904] HAVE_PY_SET_53BIT_PRECISION for m68k

2014-03-24 Thread Stefan Krah
Stefan Krah added the comment: Benjamin Peterson wrote: > I don't want to scare away contributors. I think this is a very important point. Initially I was skeptical about m68k, too (msg182388), but I've completely changed my opinion due to the nature of the patches. So far, the m68k issues wer

[issue21044] tarfile does not handle file .name being an int

2014-03-24 Thread Éric Araujo
Éric Araujo added the comment: Isn’t the bug here really that TemporaryFile has a name attribute that’s not a string? I don’t see how an integer name makes sense within the IO system. -- nosy: +eric.araujo ___ Python tracker

[issue21053] Idle Crash with the ^ button

2014-03-24 Thread Pierre K
Pierre K added the comment: Thanks Ned for the advice & the links, indeed, there is a warning. The Tcl/Tk 8.5.15 version works like a charm! -- status: pending -> closed ___ Python tracker

[issue20992] reading individual bytes of multiple binary files using the Python module fileinput

2014-03-24 Thread Tommy Carstensen
Tommy Carstensen added the comment: I read the fileinput code and realized how heavily tied it is to line input. Will reading individual bytes as suggested not be very memory intensive, if each line is billions of characters? def bytefileinput(): return (bytes((b,)) for line in fil

[issue20210] Provide configure options to enable/disable Python modules and extensions

2014-03-24 Thread Thomas Petazzoni
Thomas Petazzoni added the comment: But this expectation is not true: if dependencies are not available, Python silently disables the build of certain modules. So this story of making the standard library always has all the modules does not really stand. -- ___

[issue21040] socketserver: use selectors module

2014-03-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3047db8f6126 by Charles-François Natali in branch 'default': Issue #21040: socketserver: Use the selectors module. http://hg.python.org/cpython/rev/3047db8f6126 -- nosy: +python-dev ___ Python tracker

[issue20210] Provide configure options to enable/disable Python modules and extensions

2014-03-24 Thread Éric Araujo
Éric Araujo added the comment: The main issue with the proposed changes is that it redefines what “the Python standard library” is. Right now, users can mostly expect modules listed in the official Python docs to be available in their installation, regardless of how they got their Python. I

[issue20904] HAVE_PY_SET_53BIT_PRECISION for m68k

2014-03-24 Thread Andreas Schwab
Andreas Schwab added the comment: We are actually talking about Linux here, I assume everyone knows what that is :-) Also the patch is 2 files changed, 32+ (if you ignore the autoconf generated files), which is quite a bit smaller than the final version of the atheos patch (which is 19 files

[issue20210] Provide configure options to enable/disable Python modules and extensions

2014-03-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: > For example, a normal Python installation requires OpenSSL, > libncurses, and lots of other things. Not really. If some development libraries are not available, Python should still install fine without the corresponding modules. -- _

[issue20210] Provide configure options to enable/disable Python modules and extensions

2014-03-24 Thread Thomas Petazzoni
Thomas Petazzoni added the comment: No, because it's not simply about the size of the installed Python standard library: it's also about the number of dependencies to build before being able to build Python. For example, a normal Python installation requires OpenSSL, libncurses, and lots of ot

[issue19537] Fix misalignment in fastsearch_memchr_1char

2014-03-24 Thread Mark Lawrence
Mark Lawrence added the comment: Please do not threaten me, I've been told that I'm to be ignored, and I now observe that committers seem to be sneaking patches into the source control system when the platform is unsupported. I'll stop placing comments on appropriate issues if and only if I g

[issue20904] HAVE_PY_SET_53BIT_PRECISION for m68k

2014-03-24 Thread Martin v . Löwis
Martin v. Löwis added the comment: What triggered my interpretation might have been this conversation: https://mail.python.org/pipermail/python-dev/2002-May/023998.html https://mail.python.org/pipermail/python-dev/2002-May/024006.html -- ___ Python t

[issue21053] Idle Crash with the ^ button

2014-03-24 Thread Ned Deily
Ned Deily added the comment: >From the crash report provided, you are using the buggy Apple-supplied system >Tcl/Tk 8.5 in OS X 10.7. You should have seen a warning message about this >when starting IDLE. There are also warnings in the installer README and the >download pages. Please downlo

[issue20210] Provide configure options to enable/disable Python modules and extensions

2014-03-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't really like the idea of complicating our build tools even more. Can't you simply prune the install tree yourself? -- nosy: +pitrou ___ Python tracker _

[issue20992] reading individual bytes of multiple binary files using the Python module fileinput

2014-03-24 Thread Josh Rosenberg
Josh Rosenberg added the comment: That example should have included mode="rb" when using fileinput.input(); oops. Pretend I didn't forget it. -- ___ Python tracker ___ _

[issue21036] typo in hashtable API: _PY_HASHTABLE_ENTRY_DATA -> _Py_HASHTABLE_ENTRY_DATA

2014-03-24 Thread STINNER Victor
STINNER Victor added the comment: Thanks for the report Charles-François. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue21036] typo in hashtable API: _PY_HASHTABLE_ENTRY_DATA -> _Py_HASHTABLE_ENTRY_DATA

2014-03-24 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue20992] reading individual bytes of multiple binary files using the Python module fileinput

2014-03-24 Thread Josh Rosenberg
Josh Rosenberg added the comment: fileinput's semantics are heavily tied to lines, not bytes. And processing binary files byte by byte is rather inefficient; can you explain why this feature would be of general utility such that it would be worth including it in the standard library? It's not

[issue6011] python doesn't build if prefix contains non-ascii characters

2014-03-24 Thread STINNER Victor
STINNER Victor added the comment: > Victor, was this ticket kept open only for the backport to distutils2? I have no idea :) It's probably fine now. Open a new and fresh issue if it's not fixed yet, this issue has a too long history. -- resolution: -> fixed status: open -> closed ___

[issue21052] Consider dropping ImportWarning for empty sys.path_hooks and sys.meta_path

2014-03-24 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue16535] json encoder unable to handle decimal

2014-03-24 Thread Stefan Krah
Stefan Krah added the comment: I think we should really apply #19232. At least that would take care of the import issue. -- ___ Python tracker ___ ___

[issue21036] typo in hashtable API: _PY_HASHTABLE_ENTRY_DATA -> _Py_HASHTABLE_ENTRY_DATA

2014-03-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2bbda947a5b3 by Victor Stinner in branch '3.4': Issue #21036: Fix typo in macro name http://hg.python.org/cpython/rev/2bbda947a5b3 New changeset 0251614e853d by Victor Stinner in branch 'default': (Merge 3.4) Issue #21036: Fix typo in macro name htt

[issue19537] Fix misalignment in fastsearch_memchr_1char

2014-03-24 Thread Stefan Krah
Stefan Krah added the comment: Mark Lawrence, stop playing off committers against each other. This is outright trolling. -- ___ Python tracker ___ ___

[issue20904] HAVE_PY_SET_53BIT_PRECISION for m68k

2014-03-24 Thread Martin v . Löwis
Martin v. Löwis added the comment: It seems it wasn't actually a formal ruling (although I took it for that); see for yourself - or better, ask Guido what he thinks about this topic today: https://mail.python.org/pipermail/python-3000/2007-August/009692.html https://mail.python.org/pipermail/py

[issue16535] json encoder unable to handle decimal

2014-03-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: The patch isn't really ok, IMO. It forcibly imports the decimal module and then looks up the type there. The decimal module is a rather large one and it shouldn't get imported if it doesn't get used. I think it would be better to rely on the __float__ special

[issue20990] pyflakes: undefined names, get_context() and main(), in multiprocessing

2014-03-24 Thread STINNER Victor
STINNER Victor added the comment: Can we close this issue? Or Richard wants to write a test? -- ___ Python tracker ___ ___ Python-bugs

[issue21040] socketserver: use selectors module

2014-03-24 Thread STINNER Victor
STINNER Victor added the comment: I sent a review on Rietveld. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue6011] python doesn't build if prefix contains non-ascii characters

2014-03-24 Thread Éric Araujo
Éric Araujo added the comment: Victor, was this ticket kept open only for the backport to distutils2? If everything is fixed in Python stdlib and docs, then it could be closed, as distutils2 development has stopped. -- components: -Distutils2 nosy: +dstufft versions: -3rd party ___

[issue20904] HAVE_PY_SET_53BIT_PRECISION for m68k

2014-03-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: > That's why I haven't said firmly yes or no yet. I expect to see Guido > in just over two weeks, and if nothing turns up by then I'll ask him > in person. It's a minor patch for a niche platform. What exactly is the point of asking Guido in person? At worse, s

[issue20904] HAVE_PY_SET_53BIT_PRECISION for m68k

2014-03-24 Thread Tim Peters
Tim Peters added the comment: In the absence of Guido here, I'll channel him ;-) "The problem" with oddball platforms has been that some require major changes in many parts of the interpreter, and then all the added cruft complicates life for every maintainer, while few people benefit and the

[issue19537] Fix misalignment in fastsearch_memchr_1char

2014-03-24 Thread Mark Lawrence
Mark Lawrence added the comment: Martin, Larry msg214639 states "Fix PyUnicode_DATA() alignment under m68k.", your comments please. -- nosy: +BreamoreBoy, larry, loewis ___ Python tracker _

[issue21053] Idle Crash with the ^ button

2014-03-24 Thread Pierre K
New submission from Pierre K: Idle crashes systematically when holding the ^button, which is regularly used in French. Very very annoying. -- components: IDLE files: Script.sh messages: 214726 nosy: pancakesnutella priority: normal severity: normal status: open title: Idle Crash with th

[issue16535] json encoder unable to handle decimal

2014-03-24 Thread Chris Rebert
Changes by Chris Rebert : -- nosy: +cvrebert ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue19871] json module won't parse a float that starts with a decimal point

2014-03-24 Thread Chris Rebert
Changes by Chris Rebert : -- nosy: +cvrebert ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue20904] HAVE_PY_SET_53BIT_PRECISION for m68k

2014-03-24 Thread Benjamin Peterson
Benjamin Peterson added the comment: I don't want to scare away contributors. -- ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue20904] HAVE_PY_SET_53BIT_PRECISION for m68k

2014-03-24 Thread Larry Hastings
Larry Hastings added the comment: That's why I haven't said firmly yes or no yet. I expect to see Guido in just over two weeks, and if nothing turns up by then I'll ask him in person. Is anybody here in a hurry? -- ___ Python tracker

[issue20904] HAVE_PY_SET_53BIT_PRECISION for m68k

2014-03-24 Thread Benjamin Peterson
Benjamin Peterson added the comment: Well, no one has produced a reference for this phantom announcement. -- ___ Python tracker ___ __

[issue20904] HAVE_PY_SET_53BIT_PRECISION for m68k

2014-03-24 Thread Larry Hastings
Larry Hastings added the comment: I agree that it's a short and straightforward patch, and as stated I wouldn't mind accepting it. However, I don't make a habit of going against Guido's rulings. -- ___ Python tracker

[issue17975] libpython3.so conflicts between $VERSIONs

2014-03-24 Thread koobs
koobs added the comment: Confirming that altinstall installs libpython3.so -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue20904] HAVE_PY_SET_53BIT_PRECISION for m68k

2014-03-24 Thread Benjamin Peterson
Benjamin Peterson added the comment: This is a short and straightforward patch that improves the Python experience for m86k users. I think it should be applied. -- ___ Python tracker __

[issue20904] HAVE_PY_SET_53BIT_PRECISION for m68k

2014-03-24 Thread Andreas Schwab
Andreas Schwab added the comment: That's what I call hostile. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20904] HAVE_PY_SET_53BIT_PRECISION for m68k

2014-03-24 Thread Larry Hastings
Larry Hastings added the comment: It sounds like this definitely won't happen for 3.4. And if Guido has indeed declared "no code for unsupported platforms", it won't happen for 3.5 either. -- versions: -Python 3.4 ___ Python tracker

[issue21041] pathlib.PurePath.parents rejects negative indexes

2014-03-24 Thread R. David Murray
R. David Murray added the comment: Which is exactly what I mean by saying it is not a sequence. It is 'sequence-like'. Kind of like email Messages are dict-like: they share many methods and behaviors, but the exact behaviors and semantics are different. -- __

[issue21041] pathlib.PurePath.parents rejects negative indexes

2014-03-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, it is a sequence, it's just that it doesn't respect the convention about negative indices :-) As to why they are disallowed, I don't remember exactly (!) but I think it's because the exact semantics would be confusing otherwise. --

[issue21052] Consider dropping ImportWarning for empty sys.path_hooks and sys.meta_path

2014-03-24 Thread Brett Cannon
Brett Cannon added the comment: It's a simple `if not sys.meta_path` check so it doesn't differentiate. But that's actually a good point about it being None in this case due to the shutdown; if the check changed to `if sys.meta_path is not None and len(sys.meta_path) == 0` then that should ski

[issue21051] incorrect utf-8 conversion with c api

2014-03-24 Thread Mark Dickinson
Mark Dickinson added the comment: > I suspect that the actual bytes you get depend on your locale. And from the output you're seeing, I'd guess that Windows is using the CP1250 (Latin: Central European) codepage to make the translation on your machine: http://en.wikipedia.org/wiki/Windows-1250

[issue21051] incorrect utf-8 conversion with c api

2014-03-24 Thread Mark Dickinson
Mark Dickinson added the comment: Indeed: the \u010d is being interpreted by your *C compiler* as a multibyte character, and the individual bytes of that multibyte character end up in the string that you actually pass to Python. I suspect that the actual bytes you get depend on your locale.

[issue21052] Consider dropping ImportWarning for empty sys.path_hooks and sys.meta_path

2014-03-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: Note that in issue #21409, sys.meta_path isn't "empty", it is actually None. Another possibility is to drop those warnings only when the interpreter is shutting down (it would be easy to add a private API in sys to get that information). -- nosy: +pit

[issue21046] Document formulas used in statistics

2014-03-24 Thread Alextp
Alextp added the comment: Without details like these it must be URLS to wikipedia or Wolfram. Usual users don't know how to search wolfram. -- ___ Python tracker ___ ___

[issue11481] The copy module already uses copyreg

2014-03-24 Thread hans.meine
hans.meine added the comment: Maybe some 2.7 backport is missing w.r.t. the documentation of the copy module? At least, http://docs.python.org/2/library/copy.html still states: "The copy module does not use the copy_reg registration module." -- nosy: +hans-meine versions: -Python 3.2

[issue21041] pathlib.PurePath.parents rejects negative indexes

2014-03-24 Thread R. David Murray
R. David Murray added the comment: I think this is a doc bug. That object shouldn't be called a sequence, since it isn't one. -- ___ Python tracker ___

[issue21044] tarfile does not handle file .name being an int

2014-03-24 Thread Antoine Pietri
Antoine Pietri added the comment: Here's the test case as requested by berkerpeksag in the patch review. -- Added file: http://bugs.python.org/file34605/test_tarfile_fobj_int.diff ___ Python tracker ___

[issue21041] pathlib.PurePath.parents rejects negative indexes

2014-03-24 Thread R. David Murray
Changes by R. David Murray : -- nosy: +pitrou, r.david.murray ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue21041] pathlib.PurePath.parents rejects negative indexes

2014-03-24 Thread akira
Changes by akira <4kir4...@gmail.com>: -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue21049] Flood of “ImportWarning: sys.meta_path is empty” after exception with socket subclass

2014-03-24 Thread Brett Cannon
Brett Cannon added the comment: Sure, I'm fine with closing this as "Won't Fix" based on the cause being an edge case and rely on issue #21052 to discuss the value of the ImportWarning. Thanks for the report, Martin. -- resolution: -> wont fix status: open -> closed _

[issue21046] Document formulas used in statistics

2014-03-24 Thread Mark Lawrence
Mark Lawrence added the comment: IMHO the docs shouldn't be cluttered with details such as this. -- nosy: +BreamoreBoy ___ Python tracker ___

[issue21046] Document formulas used in statistics

2014-03-24 Thread Alextp
Alextp added the comment: 5) pvariance. Calculates "population variance" of iterable by such formula: pvariance([x1, x2, ..., xN], M) = ((x1 - M)**2 + ... + (xN - M)**2) / N M is optional argument which should be value of mean([x1, ... xN]) calculated before. If M parameter is missed in call,

[issue21049] Flood of “ImportWarning: sys.meta_path is empty” after exception with socket subclass

2014-03-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: Of course the use case presented here is very contrived, so we can also choose to not fix it. -- ___ Python tracker ___ ___

[issue21052] Consider dropping ImportWarning for empty sys.path_hooks and sys.meta_path

2014-03-24 Thread Brett Cannon
Brett Cannon added the comment: I should also say that dropping warnings leaves only a single case of ImportWarning related to empty directory names (in relation to Finder.find_module()). Once that can go away that will eliminate all uses of warnings in importlib and thus won't necessitate imp

[issue21052] Consider dropping ImportWarning for empty sys.path_hooks and sys.meta_path

2014-03-24 Thread Brett Cannon
New submission from Brett Cannon: Issue #21049 managed to trigger a huge output of "ImportWarning: sys.meta_path is empty" because it managed to trigger an import during interpreter shutdown. The ImportWarning for sys.path_hooks and sys.meta_path were originally added because before importlib

[issue21049] Flood of “ImportWarning: sys.meta_path is empty” after exception with socket subclass

2014-03-24 Thread Brett Cannon
Brett Cannon added the comment: So the import warnings were added for sys.meta_path and sys.path_hooks because prior to Python 3.3 you could empty out those values and import would continue to work, but with importlib that stopped being the case. My thinking was that it would be easier to debu

[issue21043] Stop recommending CACert.org in the SSL documentation

2014-03-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: Looks good to me too. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue21049] Flood of “ImportWarning: sys.meta_path is empty” after exception with socket subclass

2014-03-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: For a more detailed analysis: - the warning gets printed very late because the socket is caught in a reference cycle (self.attr = self), which itself is tied to the exception traceback - when the socket is collected, it tries to print a ResourceWarning because

[issue21043] Stop recommending CACert.org in the SSL documentation

2014-03-24 Thread Donald Stufft
Donald Stufft added the comment: The latest patch looks good to me. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue21049] Flood of “ImportWarning: sys.meta_path is empty” after exception with socket subclass

2014-03-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, basically some sys attributes (including meta_path) are cleaned during shutdown, so if some code executes afterwards and tries to import something, importlib will complain that meta_path is empty. Unless the warning is genuinely useful, I would suggest s

[issue21050] Failure to import win32api (from pywin32)

2014-03-24 Thread Thomas Heller
Thomas Heller added the comment: It was most certainly an issue on my side, something with leftover files or directories from a previous installation. After cleaning everything up it works now. Sorry for the confusion. (A personal remark: sometimes, the bdist_wininst uninstaller does not rem

[issue21046] Document formulas used in statistics

2014-03-24 Thread Alextp
Alextp added the comment: I wrote not ok formula for median_grouped. But i can't get idea from source. THIS SHOWS that source code is NOT ok doc, even student can't get it e.g. pvariance. Calculates population variance of iterable. It's given by formula: pvariance([x1, x2, ..., xN]) = ((x1 -

[issue21051] incorrect utf-8 conversion with c api

2014-03-24 Thread STINNER Victor
STINNER Victor added the comment: In the C language, \u must be escaped as "\\u". -- ___ Python tracker ___ ___ Python-bugs-list maili

[issue21051] incorrect utf-8 conversion with c api

2014-03-24 Thread David Zámek
New submission from David Zámek: I use python 2.7.6 on win32. If I enter u'\u010d'.encode('utf-8') to console, I get '\xc4\x8d' as response. That's correct. But it I use C API for the same, I get incorrect '\xc3\xa8' as response. I was testing it on this program: #include int main() { Py_I

[issue21046] Document formulas used in statistics

2014-03-24 Thread Alextp
Alextp added the comment: I'm author or topic I suggest to give simple formulas. for ex - 1) mean. Calculates sum of all values in iterable, divided by number of elements. E.g. mean([x1, x2, ..., xN]) = (x1 + x2 + ... + xN) / N 2) median. Calculates value with middle index from iterable.

[issue21050] Failure to import win32api (from pywin32)

2014-03-24 Thread Brett Cannon
Brett Cannon added the comment: For those that don't read German, the exception says "The specified module could not be found". Anyway, what looks suspicious to me is this line that gets imported by pywintypes: # extension module loaded from 'C:\\Python34\\lib\\site-packages\\win32\\_win32sy

[issue21049] Flood of “ImportWarning: sys.meta_path is empty” after exception with socket subclass

2014-03-24 Thread Brett Cannon
Brett Cannon added the comment: This might be a shutdown issue. If you print out what module is being imported at the time of the warning its 'io' and it's only coming up after the script has exited (you will notice the warnings come up after the traceback is printed). My guess is some cleanup

[issue21035] Python's HTTP server implementations hangs after 16.343 requests on MacOSX

2014-03-24 Thread Ronald Oussoren
Ronald Oussoren added the comment: You could trace using dtruss (as root), which behaves similarly to strace. What happens when you first set "http_proxy" in the environment: $ env http_proxy= python -m SimpleHTTPServer If that doesn't cause problems the hang is caused by the _scproxy extensio

[issue20992] reading individual bytes of multiple binary files using the Python module fileinput

2014-03-24 Thread Berker Peksag
Changes by Berker Peksag : -- stage: -> needs patch versions: +Python 3.5 -Python 3.3, Python 3.4 ___ Python tracker ___ ___ Python-b

[issue20135] FAQ need list mutation answers

2014-03-24 Thread M. Volz
M. Volz added the comment: Thanks David, I've updated the patch to move the default values question into the programming FAQ where you recommended it go, and also changed the title of the mutable list question. -- Added file: http://bugs.python.org/file34604/sortFAQ_defaultval.patch

[issue17975] libpython3.so conflicts between $VERSIONs

2014-03-24 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: 'make altinstall' installs libpython3.so. -- ___ Python tracker ___ ___ Python-

[issue17975] libpython3.so conflicts between $VERSIONs

2014-03-24 Thread Martin v . Löwis
Martin v. Löwis added the comment: Patrick: it is very difficult to track an issue with shifting focus, since it is never clear what the actual issue is. Please confirm that it is consensus that 1. It is desired and correct behavior that python3.so is a conflicting file 2. It is possible to avo

[issue21044] tarfile does not handle file .name being an int

2014-03-24 Thread R. David Murray
Changes by R. David Murray : -- title: tarfile does not handle file __name__ being an int -> tarfile does not handle file .name being an int ___ Python tracker ___ _

  1   2   >