[issue21514] update json module docs in light of RFC 7159 ECMA-404

2014-05-16 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti, pitrou, rhettinger stage: - needs patch type: - enhancement versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21514

[issue634412] RFC 2387 in email package

2014-05-16 Thread Abhilash Raj
Abhilash Raj added the comment: I would like to work on this issue, but I would need a little help to start working on this feature. -- nosy: +abhilash.raj ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue634412

[issue21046] Document formulas used in statistics

2014-05-16 Thread Ezio Melotti
Ezio Melotti added the comment: Do you want to propose a patch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21046 ___ ___ Python-bugs-list

[issue20177] Derby #8: Convert 28 sites to Argument Clinic across 2 files

2014-05-16 Thread Tal Einat
Tal Einat added the comment: Regarding the handling of time_t arguments which can be None, I agree that the second version (without custom convertors) is simpler and clearer while having no disadvantage that I can see. I'd like to review the rest of the patches, but you mention changes to the

[issue20177] Derby #8: Convert 28 sites to Argument Clinic across 2 files

2014-05-16 Thread Stefan Krah
Changes by Stefan Krah stefan-use...@bytereef.org: -- nosy: -skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20177 ___ ___ Python-bugs-list

[issue21515] Use Linux O_TMPFILE flag in tempfile.TemporaryFile?

2014-05-16 Thread STINNER Victor
New submission from STINNER Victor: Linux 3.11 introduced a new file flag O_TMPFILE. The flag is exposed in Python, see the issue #18673. O_TMPFILE is a new open(2)/openat(2) flag that makes easier the creation of secure temporary files. Files opened with the O_TMPFILE flag are created but

[issue21515] Use Linux O_TMPFILE flag in tempfile.TemporaryFile?

2014-05-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't think we can use this by default, or it will break the expected semantics of temporary files under Unix (visible by other processes). -- nosy: +georg.brandl, ncoghlan, pitrou ___ Python tracker

[issue21515] Use Linux O_TMPFILE flag in tempfile.TemporaryFile?

2014-05-16 Thread STINNER Victor
STINNER Victor added the comment: I don't think we can use this by default, or it will break the expected semantics of temporary files under Unix (visible by other processes). I proposed to change TemporaryFile, not NamedTemporaryFile. Do you mean that other processes are supposed to have

[issue21046] Document formulas used in statistics

2014-05-16 Thread Steven D'Aprano
Steven D'Aprano added the comment: On Fri, May 16, 2014 at 07:50:16AM +, Ezio Melotti wrote: Do you want to propose a patch? I'm really not sure that I agree with this request. I'm currently sitting on the fence, undecided, about 60% against and 40% in favour of explicitly documenting

[issue21046] Document formulas used in statistics

2014-05-16 Thread Ezio Melotti
Ezio Melotti added the comment: From msg214692 it seems to me that Alex wants Python-friendly formulas or examples, rather than mathematical formulas. Most functions seems to already have them, so I was asking for a patch to get a better idea of which functions he thinks should be improved

[issue21515] Use Linux O_TMPFILE flag in tempfile.TemporaryFile?

2014-05-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: I proposed to change TemporaryFile, not NamedTemporaryFile. Ah, sorry. Then it sounds ok. (I couldn't find any documentation for O_TMPFILE, though) -- ___ Python tracker rep...@bugs.python.org

[issue21507] set and frozenset constructor should use operator.length_hint to guess the size of the iterator

2014-05-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: AFAIU, Lev merely posted this because he feared it might be indicative of a bug. Since it isn't a bug but the by-product of a feature, I propose to close this issue as not a bug. Regardless, thank you for posting this report! We appreciate the concern.

[issue13916] disallow the surrogatepass handler for non utf-* encodings

2014-05-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch which tests encoding name with cp65001 instead of CP_UTF8. I can't test on Windows and don't know which of two patches are correct. -- Added file: http://bugs.python.org/file35262/surrogatepass_cp65001.patch

[issue21027] difflib new cli interface

2014-05-16 Thread Claudiu.Popa
Claudiu.Popa added the comment: Attached the new version of the patch which removes the resource warnings. Raymond, I disagree on certain points. `difflib -m` does help the development, especially for platforms where there aren't many readily available alternatives (like Windows). I gave an

[issue13299] namedtuple row factory for sqlite3

2014-05-16 Thread Glenn Langford
Glenn Langford added the comment: In abstract, I like the namedtuple interface for sqlite3 as well. One caution is that the approach suggested at http://peter-hoffmann.com/2010/python-sqlite-namedtuple-factory.html can have a dramatic impact on performance. For one DB-intensive application,

[issue13916] disallow the surrogatepass handler for non utf-* encodings

2014-05-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8ee2b73cda7a by Victor Stinner in branch 'default': Issue #13916: Fix surrogatepass error handler on Windows http://hg.python.org/cpython/rev/8ee2b73cda7a -- ___ Python tracker rep...@bugs.python.org

[issue13916] disallow the surrogatepass handler for non utf-* encodings

2014-05-16 Thread STINNER Victor
STINNER Victor added the comment: But an exception reports about CP_UTF8. Oh, that's my fault! And it is a bug: CP_UTF8 is the Windows constant, but it is not a valid Python codec name. Attached patch cp_encoding_name.patch fixes this issue. I don't think that Py_LOWER() is needed because

[issue21515] Use Linux O_TMPFILE flag in tempfile.TemporaryFile?

2014-05-16 Thread STINNER Victor
STINNER Victor added the comment: It looks like O_TMPFILE is supported by tmpfs (3.11), ext3 (3.11), ext4 (3.11), XFS (3.15). It looks like BTRFS will also support the O_TMPFILE: https://btrfs.wiki.kernel.org/index.php/Project_ideas#Implement_O_TMPFILE_support -- It looks like os.open() fails

[issue21515] Use Linux O_TMPFILE flag in tempfile.TemporaryFile?

2014-05-16 Thread STINNER Victor
STINNER Victor added the comment: It looks like open() ignores O_TMPFILE (0o2000) on old Linux kernels. Test on Linux 3.2: fd=os.open(/tmp, os.O_RDWR | O_TMPFILE, 0o600) Traceback (most recent call last): File stdin, line 1, in module OSError: [Errno 21] Is a directory: '/tmp'

[issue21047] html.parser.HTMLParser: convert_charrefs should become True by default

2014-05-16 Thread Berker Peksag
Berker Peksag added the comment: Here's a patch to set the default convert_charrefs value to True (with documentation and whatsnew updates). -- keywords: +patch nosy: +berker.peksag stage: - patch review Added file: http://bugs.python.org/file35265/issue21047.diff

[issue21047] html.parser.HTMLParser: convert_charrefs should become True by default

2014-05-16 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- assignee: - ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21047 ___ ___

[issue634412] RFC 2387 in email package

2014-05-16 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue634412 ___

[issue634412] RFC 2387 in email package

2014-05-16 Thread R. David Murray
R. David Murray added the comment: There is some support for this in the new email policies. Take a look at the new examples in the 3.4 email documentation in particular. The additional thing I would like to see is support in the content manager that recognizes multipart/related and makes it

[issue21516] pathlib.Path(...).is_dir() crashes on readonly directories (Windows)

2014-05-16 Thread Thomas Heller
New submission from Thomas Heller: On Windows, pathlib.Path(...).is_dir() crashes on readonly directories while os.path.isdir(...) works fine. Example on Windows7: Python 3.4.0 (v3.4.0:04f714765c13, Mar 16 2014, 19:24:06) [MSC v.1600 32 bit (Intel)] on win32 Type help, copyright, credits or

[issue21516] pathlib.Path(...).is_dir() crashes on some directories (Windows)

2014-05-16 Thread Thomas Heller
Thomas Heller added the comment: Well, not 'readonly' directories but directories where the user has no access rights. I corrected the title of this bug. -- title: pathlib.Path(...).is_dir() crashes on readonly directories (Windows) - pathlib.Path(...).is_dir() crashes on some

[issue21503] Use test_both() consistently throughout test_importlib

2014-05-16 Thread Brett Cannon
Brett Cannon added the comment: I see you noticed my shift in strategy after I realized part way through a cleaner way of doing things. =) LGTM I don't love the formatting of the test_both() lines, but I think that one is just an aesthetic thing that will never make people happy -- weird

[issue21515] Use Linux O_TMPFILE flag in tempfile.TemporaryFile?

2014-05-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: So we should catch OSError(21, Is a directory: '/tmp') and fallback to the current implementation (random name, unlink), and remember that the kernel version is too old. Just catch any OSError? -- ___ Python

[issue13299] namedtuple row factory for sqlite3

2014-05-16 Thread Glenn Langford
Glenn Langford added the comment: ...if I understand the proposed caching scheme, then repeated executions of the query SELECT a,b,c FROM table would result in cache hits, since the column names remain the same. I'm guessing this would resolve the performance problem in the app I saw, but it

[issue21503] Use test_both() consistently throughout test_importlib

2014-05-16 Thread Eric Snow
Eric Snow added the comment: I don't love the formatting of the test_both() lines, but I think that one is just an aesthetic thing that will never make people happy -- weird line wrapping or really long lines -- so just leave it as-is in your patch. Yeah, I went with the formatting that I

[issue21515] Use Linux O_TMPFILE flag in tempfile.TemporaryFile?

2014-05-16 Thread STINNER Victor
STINNER Victor added the comment: Just catch any OSError? If possible, I would prefer to not retry O_TMPFILE each time if the kernel version does not support the flag. Pseudo-code: -- if o_tmpfile_supported: try: fd = os.open(dir, os.O_TMPFILE | ...) except IsADirectoryError:

[issue21515] Use Linux O_TMPFILE flag in tempfile.TemporaryFile?

2014-05-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: Just catch any OSError? If possible, I would prefer to not retry O_TMPFILE each time if the kernel version does not support the flag. How likely it is to have a glibc flag that's not supported by the kernel (on a normal setup, not a self-compiled

[issue21503] Use test_both() consistently throughout test_importlib

2014-05-16 Thread Eric Snow
Eric Snow added the comment: FWIW, this change was motivated by the importlib backport (I found some time to work on it). The import_importlib()/test_both() approach definitely makes backporting the tests easier (thanks for that). BTW, thanks for also consolidating the various test_importlib

[issue19610] setup.py does not allow a tuple for classifiers

2014-05-16 Thread Berker Peksag
Berker Peksag added the comment: A patch to detect bad type for classifiers in the check command would also be acceptable for 3.5, or to catch it earlier, a check in the Distribution class. Thanks for the idea, Éric. New patch attached. -- stage: needs patch - patch review versions:

[issue21516] pathlib.Path(...).is_dir() crashes on some directories (Windows)

2014-05-16 Thread Matthew Barnett
Matthew Barnett added the comment: I wouldn't call it a crash. It's an exception. -- nosy: +mrabarnett ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21516 ___

[issue6445] Add check parameter to subprocess.Popen.communicate

2014-05-16 Thread akira
akira added the comment: subprocess.check_output() could be used in communicate() + check process exit status one-liners. It returns child process output (stdout) and raises an exception if the returncode is not zero. It is available since Python 2.7 (3.1) If you don't want to raise an error

[issue21503] Use test_both() consistently throughout test_importlib

2014-05-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 34d65746d5ca by Eric Snow in branch 'default': Issue #21503: Use test_both() consistently in test_importlib. http://hg.python.org/cpython/rev/34d65746d5ca -- nosy: +python-dev ___ Python tracker

[issue21503] Use test_both() consistently throughout test_importlib

2014-05-16 Thread Eric Snow
Changes by Eric Snow ericsnowcurren...@gmail.com: -- resolution: - fixed stage: needs patch - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21503 ___

[issue21516] pathlib.Path(...).is_dir() crashes on some directories (Windows)

2014-05-16 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- type: crash - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21516 ___ ___

[issue2506] Add mechanism to disable optimizations

2014-05-16 Thread Trip Volpe
Changes by Trip Volpe t...@flowroute.com: -- nosy: +Trip.Volpe ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2506 ___ ___ Python-bugs-list mailing

[issue21468] NNTPLib connections become corrupt after long periods of activity

2014-05-16 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21468 ___ ___ Python-bugs-list mailing

[issue21477] Idle: improve idle_test.htest

2014-05-16 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- title: Idle: improve idle_test,htest - Idle: improve idle_test.htest ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21477 ___

[issue21484] More clarity needed about difference between x += e and x = x + e

2014-05-16 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21484 ___ ___ Python-bugs-list

[issue21495] Sane default for logging config

2014-05-16 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- components: +Library (Lib) stage: - test needed type: - enhancement versions: +Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21495

[issue21495] Sane default for logging config

2014-05-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: Moving discussion to python-ideas was the right thing to do. I am closing this for the present as there is no concrete accepted idea to write a patch for. Thomas, if that changes, you can re-open. -- nosy: +terry.reedy resolution: - later stage: test

[issue21511] Thinko in Lib/quopri.py

2014-05-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: Senthil, David, I hope one of you understands this. I looks like a minor fix. -- nosy: +orsenthil, r.david.murray, terry.reedy stage: - test needed versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org

[issue21511] Thinko in Lib/quopri.py

2014-05-16 Thread R. David Murray
R. David Murray added the comment: We should resolve issue 18022 before we decide how to fix this. -- dependencies: +Inconsistency between quopri.decodestring() and email.quoprimime.decode() ___ Python tracker rep...@bugs.python.org

[issue2506] Add mechanism to disable optimizations

2014-05-16 Thread Jean-Paul Calderone
Changes by Jean-Paul Calderone jean-p...@hybridcluster.com: -- nosy: -exarkun ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2506 ___ ___

[issue21511] Thinko in Lib/quopri.py

2014-05-16 Thread Paul Sokolovsky
Paul Sokolovsky added the comment: This is minor issue indeed, uncovered when trying to run quopri.py with MicroPython http://micropython.org . I now worked around this on MicroPython side, but otherwise I set to report any issues I've seen with MicroPython porting, in the hope that

[issue21511] Thinko in Lib/quopri.py

2014-05-16 Thread R. David Murray
R. David Murray added the comment: Thanks. It's very clear. What isn't clear is if the line should be made to work as apparently intended, or removed :) (My guess at this point without re-reading the RFCs is that it should be removed.) -- ___

[issue21112] 3.4 regression: unittest.expectedFailure no longer works on TestCase subclasses

2014-05-16 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +larry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21112 ___ ___ Python-bugs-list mailing list

[issue21516] pathlib.Path(...).is_dir() crashes on some directories (Windows)

2014-05-16 Thread eryksun
eryksun added the comment: nt._isdir calls GetFileAttributes. CPython's stat implementation calls CreateFile to get a handle to pass to GetFileInformationByHandle. If it can't get a valid handle, it falls back to calling FindFirstFileW to get the file information, but only for

[issue21112] 3.4 regression: unittest.expectedFailure no longer works on TestCase subclasses

2014-05-16 Thread Larry Hastings
Larry Hastings added the comment: Berker: do you consider your diff ready to go in, or is it an early diff (like a work-in-progress)? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21112

[issue21516] pathlib.Path(...).is_dir() crashes on some directories (Windows)

2014-05-16 Thread eryksun
eryksun added the comment: but only for ERROR_SHARING_VIOLATION. Shouldn't this include ERROR_ACCESS_DENIED? To clarify, I meant that I think it should fall back to using FindFirstFile for either error, not that ERROR_SHARING_VIOLATION somehow includes ERROR_ACCESS_DENIED. (Proofreading?

[issue7776] http.client.HTTPConnection tunneling is broken

2014-05-16 Thread Senthil Kumaran
Senthil Kumaran added the comment: I am glad that issues with 3rdparty libs which dependent on the previous wrong behavior has been resolved. As indicated previously, I think, it makes sense to have this in 2.7 as well. I created a patch and tested it 2.7 and it is all good. I plan to commit

[issue21516] pathlib.Path(...).is_dir() crashes on some directories (Windows)

2014-05-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: When you say os.path.isdir(...) works fine, you mean it's returning False? -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21516 ___

[issue21516] pathlib.Path(...).is_dir() crashes on some directories (Windows)

2014-05-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: Apparently os.path.isdir() has been special-cased under Windows to use other, native APIs (see #11583). -- nosy: +steve.dower, tim.golden, zach.ware ___ Python tracker rep...@bugs.python.org

[issue7776] http.client.HTTPConnection tunneling is broken

2014-05-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 568041fd8090 by Senthil Kumaran in branch '2.7': Backport Fix for Issue #7776: Fix ``Host:'' header and reconnection when using http.client.HTTPConnection.set_tunnel(). http://hg.python.org/cpython/rev/568041fd8090 --

[issue7776] http.client.HTTPConnection tunneling is broken

2014-05-16 Thread Senthil Kumaran
Senthil Kumaran added the comment: This is fixed in 2.7 as well here (changeset 568041fd8090). We shall close this ticket after @dstufft pulls in the updated pip for 3.4 Thanks! -- priority: high - release blocker versions: +Python 2.7 ___ Python

[issue21515] Use Linux O_TMPFILE flag in tempfile.TemporaryFile?

2014-05-16 Thread Nick Coghlan
Nick Coghlan added the comment: Reasonably common, I believe. For example, Red Hat ships a Developer Toolset, so you may be building with an up to date gcc on RHEL 6 or 7, but still support deploying against the older kernel in RHEL 5. -- ___ Python

[issue7776] http.client.HTTPConnection tunneling is broken

2014-05-16 Thread Donald Stufft
Donald Stufft added the comment: Requests has been released and I've pulled it into the pip tree. I'll be releasing tonight probably, or maybe tomorrow. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7776

[issue21515] Use Linux O_TMPFILE flag in tempfile.TemporaryFile?

2014-05-16 Thread Josh Rosenberg
Changes by Josh Rosenberg shadowranger+pyt...@gmail.com: -- nosy: +josh.rosenberg ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21515 ___ ___

[issue7776] http.client.HTTPConnection tunneling is broken

2014-05-16 Thread Larry Hastings
Larry Hastings added the comment: I tag 3.4.1 final in less than 24 hours. I really would prefer that the embedded pip not contain such, uh, fresh software. But let's try it and hope for the best. -- ___ Python tracker rep...@bugs.python.org

[issue7776] http.client.HTTPConnection tunneling is broken

2014-05-16 Thread Donald Stufft
Donald Stufft added the comment: Well you're the RM Larry :) I'll do whatever you think is best. I would greatly prefer it if the pip shipped with CPython 3.4.1 wasn't broken with proxies. I think the choices are 1) Ship it with the new pip, I can give a delta of the differences if that is

[issue7776] http.client.HTTPConnection tunneling is broken

2014-05-16 Thread Larry Hastings
Larry Hastings added the comment: Yeah, I'd like to see the diff. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7776 ___ ___ Python-bugs-list

[issue7776] http.client.HTTPConnection tunneling is broken

2014-05-16 Thread Donald Stufft
Donald Stufft added the comment: I just released pip 1.5.6. The ensurepip package currently has 1.5.4 inside of it. 1.5.5 has been out for 2 weeks or so and there haven't been any reported regressions. The only difference between 1.5.5 and 1.5.6 is that requests has been upgraded. Here's the

[issue7776] http.client.HTTPConnection tunneling is broken

2014-05-16 Thread Donald Stufft
Donald Stufft added the comment: Just FYI, I upgraded setuptools and pip in 3.5: http://hg.python.org/cpython/rev/acb5cc616052 http://hg.python.org/cpython/rev/308ff6a5ce67 If you decide to go that way dunno if you can just cherry pick or not. --

[issue21517] installer Python default setting fails with mac Python Launcher

2014-05-16 Thread Andrew Harrington
New submission from Andrew Harrington: I installed Python 3.4 on my Mac (OSX 10.9.2), with the option to make python 3.4 my default python3, so which python3 prints /Library/Frameworks/Python.framework/Versions/3.4/bin/python3 which is fine. A terminal then brings up python 3.4, fine.

[issue7776] http.client.HTTPConnection tunneling is broken

2014-05-16 Thread Senthil Kumaran
Senthil Kumaran added the comment: I prefer we update the ensurepip in 3.4.1 That will be helpful too since 3.5 has the fix. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7776 ___