[issue9862] PIPE_BUF is invalid on AIX
Sébastien Sablé sa...@users.sourceforge.net added the comment: Thanks R. David. I checked in 3.1 and PIPE_BUF is not defined in the select module, so the default value of 512 is used in subprocess. So no correction is needed for that version. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9862 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10048] urllib.request documentation confusing
Changes by Senthil Kumaran orsent...@gmail.com: -- assignee: d...@python - orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10048 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1531775] HTTPSConnection request hangs
Senthil Kumaran orsent...@gmail.com added the comment: Not an issue anymore as socket timeout at client is supposed to happen with the connection is hung due to unresponsive host. The original bug was raised py2.3. Closing it as out of date. -- nosy: +orsenthil resolution: - out of date stage: unit test needed - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1531775 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1520831] urrlib2 max_redirections=0 disables redirects
Changes by Senthil Kumaran orsent...@gmail.com: -- assignee: - orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1520831 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9778] Make hash values the same width as a pointer (or Py_ssize_t)
Marc-Andre Lemburg m...@egenix.com added the comment: Wouldn't it be better to use Py_hash_t instead of size_t for calculating the hash values in those hash functions ? -- nosy: +lemburg ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9778 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9778] Make hash values the same width as a pointer (or Py_ssize_t)
Marc-Andre Lemburg m...@egenix.com added the comment: And related to my previous comment: shouldn't Py_hash_t map to size_t instead of Py_ssize_t ? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9778 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue678250] test_mmap failling on AIX
Sébastien Sablé sa...@users.sourceforge.net added the comment: I also believe this patch should be backported. If the issue2643 is not backported, then the patch to apply should be patch_flush_mmap.diff instead of patch_mmap_flush_updated.diff -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue678250 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10135] Format specifier 'n' not working
New submission from Boštjan Mejak bostjan.me...@gmail.com: Have your default locale set to 'Slovenian' which uses a comma for the decimal symbol, like 2.76 is written as 2,76. Observe that the format specifier 'n' does not work for the default 'Slovenian' locale setting. Then try running this in the Python interpreter: '{number:.3n}'.format(number=2.76) You get this: '{number:.3n}'.format(number=2.76) '2.76' Excepted the is the return value '2,76'. Please fix this bug. -- components: Interpreter Core messages: 119003 nosy: Retro priority: normal severity: normal status: open title: Format specifier 'n' not working type: behavior versions: 3rd party, Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10135 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4733] Add a decode to declared encoding version of urlopen to urllib
Changes by Senthil Kumaran orsent...@gmail.com: -- assignee: - orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4733 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9730] base64 docs refers to strings instead of bytes
Senthil Kumaran orsent...@gmail.com added the comment: On Fri, Sep 03, 2010 at 10:57:17PM +, Georg Brandl wrote: That's why I said to use testsetup directives -- they are not visible in the HTML/PDF/... output, but used when running the tests. Do you already have such a directive in sphinx? I think, it would be a good idea to have doctests succeed. And having examples in the docs working 'directly out of text'. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9730 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9807] deriving configuration information for different builds with the same prefix
Matthias Klose d...@debian.org added the comment: Index: Misc/python.pc.in === --- Misc/python.pc.in (Revision 85644) +++ Misc/python.pc.in (Arbeitskopie) @@ -8,6 +8,6 @@ Requires: Version: @VERSION@ Libs.private: @LIBS@ -Libs: -L${libdir} -lpyt...@version@ +Libs: -L${libdir} -lpyt...@version@@ABIFLAGS@ Cflags: -I${includedir}/pyt...@version@ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9807 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9807] deriving configuration information for different builds with the same prefix
Matthias Klose d...@debian.org added the comment: the name of the library should not differ for the static and the shared library. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9807 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10136] kill_python doesn't work with short path
New submission from Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp: When kill_python[,d].exe was called via short path, no python processes won't be killed. This happens because, directory path is compared via simple wcsnicmp. If one is short path and another is long path, wcsnicmp determines they are not same path. This patch solves this issue with GetFileInformationByHandle's File ID information. Probably this won't happen so much, so priority is low. -- components: Build files: py3k_fix_kill_python_for_short_path.patch keywords: patch messages: 119007 nosy: ocean-city priority: normal severity: normal status: open title: kill_python doesn't work with short path type: behavior versions: Python 2.7, Python 3.1, Python 3.2 Added file: http://bugs.python.org/file19262/py3k_fix_kill_python_for_short_path.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10136 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10135] Format specifier 'n' not working
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +eric.smith, rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10135 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10127] ssl.SSLSocket().close() does not close the connection
Changes by Antoine Pitrou pit...@free.fr: -- status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10127 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5736] Add the iterator protocol to dbm modules
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5736 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10135] Format specifier 'n' not working
Eric Smith e...@trueblade.com added the comment: How are you setting the Slovenian locale? Could please let me know what this prints: import locale locale.localeconv() Also, could you let me know what: locale.format('%.3f', 2.45) prints? Both of these would be when the Slovenian locale is selected. Thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10135 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9730] base64 docs refers to strings instead of bytes
R. David Murray rdmur...@bitdance.com added the comment: Yes, Georg mentioned the directive because it exists :) See the turtle docs for some examples, I think. I seem to remember using it when I made those doctests pass on 2.7 (warning: it writes weird stuff on your screen :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9730 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10135] Format specifier 'n' not working
Eric Smith e...@trueblade.com added the comment: Oops, I meant locale.format('%.3f', 2.76), although of course the number shouldn't matter. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10135 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue678250] test_mmap failing on AIX
Changes by Georg Brandl ge...@python.org: -- title: test_mmap failling on AIX - test_mmap failing on AIX ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue678250 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9778] Make hash values the same width as a pointer (or Py_ssize_t)
Benjamin Peterson benja...@python.org added the comment: 2010/10/18 Marc-Andre Lemburg rep...@bugs.python.org: Marc-Andre Lemburg m...@egenix.com added the comment: And related to my previous comment: shouldn't Py_hash_t map to size_t instead of Py_ssize_t ? No, negative values have to be allowed. -- title: Make hash values the same width as a pointer (or Py_ssize_t) - Make hash values the same width as a pointer (or Py_ssize_t) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9778 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9539] python-2.6.4: test failure in test_distutils due to linking to system libpython2.6
jan matejek jmate...@suse.cz added the comment: i was able to reproduce this in clean 2.7 Sandro, this is only reproducible on systems without python - so by definition, you can hit this only during installation as for issue8335, yes, i think that it's a duplicate distutils2 is irrelevant here, because you can only install it on top of existing python. The problem here is that stdlib's distutils must use the newly built libpython, *not* the systemwide one - a problem that distutils2 don't need to solve until they become part of stdlib. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9539 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3526] Customized malloc implementation on SunOS and AIX
Changes by Floris Bruynooghe floris.bruynoo...@gmail.com: -- nosy: +flub ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3526 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9539] python-2.6.4: test failure in test_distutils due to linking to system libpython2.6
Éric Araujo mer...@netwok.org added the comment: i was able to reproduce this in clean 2.7 as for issue8335, yes, i think that it's a duplicate Ok, then please add your failure messages on the other bug. Sandro, this is only reproducible on systems without python - so by definition, you can hit this only during installation Hm, Sandro didn’t say whether he had a system Python or not. distutils2 is irrelevant here This is internal bookkeeping, you can ignore it. When we fix something in distutils, it’s forward-ported to distutils2. I don’t want to wait until the end to synchronize bug fixes. -- resolution: - duplicate stage: - committed/rejected status: open - closed superseder: - distutils test_build_ext's test_get_outputs fails in bootstrap environment ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9539 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8335] distutils test_build_ext's test_get_outputs fails in bootstrap environment
Éric Araujo mer...@netwok.org added the comment: This may be solved by backporting the fix in #10126. I’ll do it when my network gives me access to svn again :/ -- components: +Distutils2 versions: +3rd party, Python 2.7, Python 3.1, Python 3.2 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8335 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9778] Make hash values the same width as a pointer (or Py_ssize_t)
Case Van Horsen cas...@gmail.com added the comment: Some quick comments on the latest patch. 1) I don't think you can remove the type cast used when comparing the hash value against -1 and -2. IIRC, GCC considers that undefined behavior. 2) In sysmodule.c, we need to use PyLong_FromSsize_t when storing _PyHASH_MODULUS. 3) In pyport.h, we need a better way to define _PyHASH_MODULUS. The existing ((1UL _PyHASH_BITS) - 1) fails when unsigned long is smaller than Py_ssize_t. ((1ULL _PyHASH_BITS) - 1) works on 64-bit Windows but is not a good solution for systems that don't have an unsigned long long type. I haven't thought of a better solution for one. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9778 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8335] distutils test_build_ext's test_get_outputs fails in bootstrap environment
Changes by Éric Araujo mer...@netwok.org: -- nosy: +sandro.tosi, valeo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8335 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9539] python-2.6.4: test failure in test_distutils due to linking to system libpython2.6
Sandro Tosi sandro.t...@gmail.com added the comment: On Mon, Oct 18, 2010 at 15:29, Éric Araujo rep...@bugs.python.org wrote: Éric Araujo mer...@netwok.org added the comment: Sandro, this is only reproducible on systems without python - so by definition, you can hit this only during installation Hm, Sandro didn’t say whether he had a system Python or not. yes I have :) I can try on an isolated chroot to replicate the problem, but it will probably take me some day to have the time to do that, Cheers, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9539 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9778] Make hash values the same width as a pointer (or Py_ssize_t)
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Mon, Oct 18, 2010 at 8:45 AM, Benjamin Peterson rep...@bugs.python.org wrote: .. No, negative values have to be allowed. Why? As far as I can tell, negative values are only used as sentinels and we can use say (size_t)-1 instead of -1L. Are there cases where hash values' ordering is important? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9778 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5117] os.path.relpath problem with root directory
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Committed fixes in r85689(py3k), r85693(release31-maint), r85694(release27-maint). (This should work because I simply ported already working fix in ntpath.relpath) -- resolution: - fixed stage: commit review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5117 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9778] Make hash values the same width as a pointer (or Py_ssize_t)
Antoine Pitrou pit...@free.fr added the comment: Le lundi 18 octobre 2010 à 13:56 +, Alexander Belopolsky a écrit : Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Mon, Oct 18, 2010 at 8:45 AM, Benjamin Peterson rep...@bugs.python.org wrote: .. No, negative values have to be allowed. Why? As far as I can tell, negative values are only used as sentinels and we can use say (size_t)-1 instead of -1L. You can, except that changing the sentinel value will probably break a lot of code out there (and there's no benefit AFAICT). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9778 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9778] Make hash values the same width as a pointer (or Py_ssize_t)
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Mon, Oct 18, 2010 at 9:59 AM, Antoine Pitrou rep...@bugs.python.org wrote: .. Why? As far as I can tell, negative values are only used as sentinels and we can use say (size_t)-1 instead of -1L. You can, except that changing the sentinel value will probably break a lot of code out there (and there's no benefit AFAICT). AFAICT, a change from (Py_ssize_t)-1 to (size_t)-1 is less likely to break code than a change from -1L to (Py_ssize_t)-1. (Assuming a sizeof(long) != sizeof(void*) platform.) The benefit, though is that hash computations can be performed natively on the hash values without casting to an unrelated type. If Py_hash_t needs to be signed, I would like to see a typedef Py_uhash_t size_t next to that for Py_hash_t and Py_uhash_t used in hash computations rather than explicit size_t. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9778 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1646068] Dict lookups fail if sizeof(Py_ssize_t) sizeof(long)
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Issue #9778 makes this out of date. -- assignee: tim_one - belopolsky nosy: -BreamoreBoy resolution: - out of date status: open - pending superseder: - Make hash values the same width as a pointer (or Py_ssize_t) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1646068 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9539] python-2.6.4: test failure in test_distutils due to linking to system libpython2.6
Barry A. Warsaw ba...@python.org added the comment: Even though this one's older, I'm going to mark it as a duplicate of issue 10126, which is tracking the backport of the fix I made in Python 3.2 to 3.1 and 2.7. The key issues here are that Python was built with --enabled-shared and the test *only* fails when running 'make test'. Running ./python as Sandro did does not trigger the bug - at least it didn't in 3.2. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9539 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9539] python-2.6.4: test failure in test_distutils due to linking to system libpython2.6
Barry A. Warsaw ba...@python.org added the comment: Seems like roundup hates me. Just go to issue 10126. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9539 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5117] os.path.relpath problem with root directory
Stephen Hansen me+pyt...@ixokai.io added the comment: FYI, this fix broke some buildbots: http://www.python.org/dev/buildbot/all/builders/x86%20Snow%20Leopard%202.7/builds/50 for instance. Gentoo too. -- nosy: +ixokai ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5117 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9539] python-2.6.4: test failure in test_distutils due to linking to system libpython2.6
Changes by Éric Araujo mer...@netwok.org: -- superseder: distutils test_build_ext's test_get_outputs fails in bootstrap environment - test_distutils failure with --enable-shared ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9539 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9778] Make hash values the same width as a pointer (or Py_ssize_t)
Marc-Andre Lemburg m...@egenix.com added the comment: Benjamin Peterson wrote: Benjamin Peterson benja...@python.org added the comment: Marc-Andre Lemburg m...@egenix.com added the comment: And related to my previous comment: shouldn't Py_hash_t map to size_t instead of Py_ssize_t ? No, negative values have to be allowed. Ah, right... we use -1 as error indicator. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9778 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10117] Tools/scripts/reindent.py fails on non-UTF-8 encodings
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Committed in r85695. Leaving open to discuss whether anything can/should be done for the case when reindent acts as an stdin to stdout filter. Also, what is the policy on backporting Tools' bug fixes? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10117 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1699259] replacing char* with const char* in sysmodule.c/.h
Sebastian Ramacher sebasti...@users.sourceforge.net added the comment: Any news on that? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1699259 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8335] distutils test_build_ext's test_get_outputs fails in bootstrap environment
Éric Araujo mer...@netwok.org added the comment: Marking as duplicate, following Barry in msg119022 -- nosy: +barry resolution: - duplicate stage: - committed/rejected status: open - closed superseder: - test_distutils failure with --enable-shared ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8335 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9778] Make hash values the same width as a pointer (or Py_ssize_t)
Case Van Horsen cas...@gmail.com added the comment: Also, note that hash(-12) is -12. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9778 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9778] Make hash values the same width as a pointer (or Py_ssize_t)
Antoine Pitrou pit...@free.fr added the comment: AFAICT, a change from (Py_ssize_t)-1 to (size_t)-1 is less likely to break code than a change from -1L to (Py_ssize_t)-1. (Assuming a sizeof(long) != sizeof(void*) platform.) That's true. The benefit, though is that hash computations can be performed natively on the hash values without casting to an unrelated type. I don't understand what you mean by native and unrelated. Signed integers are not less native than unsigned ones. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9778 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1699259] replacing char* with const char* in sysmodule.c/.h
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Mon, Oct 18, 2010 at 11:17 AM, Sebastian Ramacher rep...@bugs.python.org wrote: .. Any news on that? Is this patch still relevant for 3.2? It looks like const has been added when char* was changed to wchar_t* in the affected functions. See r62178. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1699259 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1699259] replacing char* with const char* in sysmodule.c/.h
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: In fact, it looks like const has been added in py3k as early as r57439. I am resetting versions to 2.7, but I am -0 on backporting. I am also unselecting type because with feature request type this should be closed while some may argue that this is a bug. -- nosy: -BreamoreBoy type: feature request - versions: +Python 2.7 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1699259 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10137] Patch to IDLE for Python 2.7, at Guido's request
New submission from Bruce Sherwood bruce.sherw...@gmail.com: At Guido's request, I've carried out the same update to the IDLE distributed with Python 2.7 that I submitted for Python 3, to incorporate the work of Guilherme Polo in the Google Summer of Code 2009. Guido was concerned that with significant problems reported for IDLE 2.7, there should be an update despite Python 2.7 itself being essentially frozen. The basic structure for IDLE 3.2 was carried over. The main changes that had to be made were the change in module names between Python 2.7 and Python 3.2 (e.g. Tkinter in 2.7 is tkinter in 3.2). -- components: IDLE files: idlelib2.7.patch keywords: patch messages: 119033 nosy: Bruce.Sherwood priority: normal severity: normal status: open title: Patch to IDLE for Python 2.7, at Guido's request type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file19263/idlelib2.7.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10137 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10135] Format specifier 'n' not working
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo versions: -3rd party, Python 2.5, Python 2.6, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10135 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9778] Make hash values the same width as a pointer (or Py_ssize_t)
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Mon, Oct 18, 2010 at 11:27 AM, Antoine Pitrou rep...@bugs.python.org wrote: .. The benefit, though is that hash computations can be performed natively on the hash values without casting to an unrelated type. I don't understand what you mean by native and unrelated. Signed integers are not less native than unsigned ones. Sorry, I could have been clearer indeed. Consider the following code: static Py_hash_t long_hash(PyLongObject *v) { unsigned long x; ... x = x * sign; if (x == (unsigned long)-1) x = (unsigned long)-2; return (Py_hash_t)x; } Wouldn't it be cleaner if x was the same type as hash? Note that unsigned long is now wrong. What is needed is unsigned integer type of the same size as Py_hash_t. If Py_hash_t has to stay signed, I think we should at least not rely of sizeof(Py_hash_t) to always remain the same as sizeof(size_t). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9778 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10118] Tkinter does not find font
Changes by Éric Araujo mer...@netwok.org: -- nosy: +gpolo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10118 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10087] HTML calendar is broken
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10087 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2571] cmd.py always uses raw_input, even when another stdin is specified
Éric Araujo mer...@netwok.org added the comment: You could say my question was half-academic. I read your closing message and thought “this feature request has been closed because of the version, not really rejected”, so I asked about reopening. On a second level, it appears from your detailed message (thanks for writing it) that the situation is still unclear, so I do think that a review of docs and tests is needed, and maybe an API cleanup. I’m assigning this to myself as an opportunity to learn the insides of cmd in some months. -- assignee: - eric.araujo resolution: out of date - remind stage: unit test needed - type: feature request - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2571 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10073] calendar.isleap() not checking parameter type
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Sun, Oct 17, 2010 at 3:54 PM, Boštjan Mejak rep...@bugs.python.org wrote: .. About the if year == 0 check... Well, read Wikipedia's article http://en.wikipedia.org/wiki/0_(year) which clearly states that Year zero does not exist in the widely used Gregorian calendar or in its predecessor, the Julian calendar. So we raise a ValueError if this value is used in the calendar.isleap() function. Well, Wikipedia is not the most authoritative source, but if you go the right article there, you will find that Mathematically, it is more convenient to include a year zero and represent earlier years as negative, for the specific purpose of facilitating the calculation of the number of years between a negative (BC) year and a positive (AD) year. This is the convention used in astronomical year numbering and in the international standard date system, ISO 8601. In these systems, the year 0 is a leap year.[2] Python documentation states that calendar module implements 'the “proleptic Gregorian” calendar in Dershowitz and Reingold’s book “Calendrical Calculations”'. See http://docs.python.org/dev/py3k/library/calendar.html I don't have Dershowitz and Reingold’s book to check, but ISO/FDIS 8601:2000(E) standard contains a note that states: In the prolaptic [sic] Gregorian calendar the calendar year [] is a leap year. In any case, I think there are more important issues with the calendar module than perceived bugs in isleap() function. See for example issue 10087. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10073 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10086] test_sysconfig failure with site-packages
Éric Araujo mer...@netwok.org added the comment: Thanks for the fix, good catch! Do you want to write a patch to test_sysconfig to add a test? Otherwise I’ll do it. -- components: +Distutils2, Library (Lib) versions: +3rd party, Python 2.7, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10086 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10086] test_sysconfig failure with site-packages
Éric Araujo mer...@netwok.org added the comment: I wrote too fast, I thought your diff was for sysconfig itself, not test_sysconfig. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10086 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5111] httplib: wrong Host header when connecting to IPv6 litteral URL
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5111 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10039] python é.py fails with UnicodeEncodeErr or if PYTHONFSENCODING is used
Éric Araujo mer...@netwok.org added the comment: Do you know something better than the locale encoding? I don't. Neither do I, sorry. Can’t each filesystem have its own encoding? Yes, but how do you get the encoding of each filesystem? If I really had to, on linux I could parse the output of the mount command, but this could get messy quickly, and of course is not okay for official Python. Backup programs can use the raw (bytes) API of Python 3 to avoid all encoding issues. Neat! As wrote R. David Murray, read issue #9992 if you would like to know more about this problem and the different proposed solutions. I did so, thanks for the pointer and all the explanations. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10039 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5111] httplib: wrong Host header when connecting to IPv6 litteral URL
Changes by Senthil Kumaran orsent...@gmail.com: -- assignee: - orsenthil nosy: +orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5111 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5111] httplib: wrong Host header when connecting to IPv6 litteral URL
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo versions: -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5111 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10086] test_sysconfig failure with site-packages
Éric Araujo mer...@netwok.org added the comment: Attaching a patch with your two suggestions. Two things worry me and prevent me from committing right now: 1) sysconfig was originally distutils.sysconfig, and some duplication remains. Can’t this bug happen with distutils.sysconfig too? Should we duplicate tests from test_sysconfig to distutils.test_sysconfig? 2) How to prevent a regression? That is, how to run tests with custom ./configure options? -- keywords: +needs review, patch stage: needs patch - patch review Added file: http://bugs.python.org/file19264/fix10086.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10086 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10138] calendar module does not support years outside [1, 9999] range
New submission from Alexander Belopolsky belopol...@users.sourceforge.net: Documentation for the calendar module says: Most of these functions and classes rely on the datetime module which uses an idealized calendar, the current Gregorian calendar indefinitely extended in both directions. However, neither the datetime nor as a consequence the calendar module support years outside [1, ] range. -- assignee: belopolsky components: Documentation messages: 119041 nosy: belopolsky priority: normal severity: normal status: open title: calendar module does not support years outside [1, ] range versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10138 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10135] Format specifier 'n' not working
Boštjan Mejak bostjan.me...@gmail.com added the comment: {'mon_decimal_point': '', 'int_frac_digits': 127, 'p_sep_by_space': 127, 'frac_digits': 127, 'thousands_sep': '', 'n_sign_posn': 127, 'decimal_point': '.', 'int_curr_symbol': '', 'n_cs_precedes': 127, 'p_sign_posn': 127, 'mon_thousands_sep': '', 'negative_sign': '', 'currency_symbol': '', 'n_sep_by_space': 127, 'mon_grouping': [], 'p_cs_precedes': 127, 'positive_sign': '', 'grouping': []} '2.760' And the output of locale.format() in this case should be '2,760' On Mon, Oct 18, 2010 at 2:00 PM, Eric Smith rep...@bugs.python.org wrote: Eric Smith e...@trueblade.com added the comment: Oops, I meant locale.format('%.3f', 2.76), although of course the number shouldn't matter. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10135 ___ -- Added file: http://bugs.python.org/file19265/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10135 ___divgt;gt;gt; import localebrgt;gt;gt; locale.localeconv()/div divdiv{#39;mon_decimal_point#39;: #39;#39;, #39;int_frac_digits#39;: 127, #39;p_sep_by_space#39;: 127, #39;frac_digits#39;: 127, #39;thousands_sep#39;: #39;#39;, #39;n_sign_posn#39;: 127, #39;decimal_point#39;: #39;.#39;, #39;int_curr_symbol#39;: #39;#39;, #39;n_cs_precedes#39;: 127, #39;p_sign_posn#39;: 127, #39;mon_thousands_sep#39;: #39;#39;, #39;negative_sign#39;: #39;#39;, #39;currency_symbol#39;: #39;#39;, #39;n_sep_by_space#39;: 127, #39;mon_grouping#39;: [], #39;p_cs_precedes#39;: 127, #39;positive_sign#39;: #39;#39;, #39;grouping#39;: []}/div /div div /div divIt prints this:/div divgt;gt;gt; import localebrgt;gt;gt; locale.format(#39;%.3f#39;, 2.76)br#39;2.760#39;/div div /div divAnd the output of locale.format() in this case should be/div div#39;2,760#39;brbr/div div class=gmail_quoteOn Mon, Oct 18, 2010 at 2:00 PM, Eric Smith span dir=ltrlt;a href=mailto:rep...@bugs.python.org; target=_blankrep...@bugs.python.org/agt;/span wrote:br blockquote style=border-left:#ccc 1px solid;margin:0px 0px 0px 0.8ex;padding-left:1ex class=gmail_quote divbrEric Smith lt;a href=mailto:e...@trueblade.com; target=_blanke...@trueblade.com/agt; added the comment:brbr/divOops, I meant quot;locale.format(#39;%.3f#39;, 2.76)quot;, although of course the number shouldn#39;t matter.br br--br div div/div divbr___brPython tracker lt;a href=mailto:rep...@bugs.python.org; target=_blankrep...@bugs.python.org/agt;brlt;a href=http://bugs.python.org/issue10135; target=_blankhttp://bugs.python.org/issue10135/agt;br ___br/div/div/blockquote/divbr ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9778] Make hash values the same width as a pointer (or Py_ssize_t)
Case Van Horsen cas...@gmail.com added the comment: Sorry, I could have been clearer indeed. Consider the following code: static Py_hash_t long_hash(PyLongObject *v) { unsigned long x; ... x = x * sign; if (x == (unsigned long)-1) x = (unsigned long)-2; return (Py_hash_t)x; } Wouldn't it be cleaner if x was the same type as hash? Note that unsigned long is now wrong. What is needed is unsigned integer type of the same size as Py_hash_t. If Py_hash_t has to stay signed, I think we should at least not rely of sizeof(Py_hash_t) to always remain the same as sizeof(size_t). The calculation of long_hash assumes an unsigned temporary type to get correct results for the bit shifting and masking. The calculation is done on the absolute value of the long and then the sign is applied. We either needed to (1) add an unsigned Py_hash_t type or (2) just use size_t and Py_ssize_t. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9778 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10137] Patch to IDLE for Python 2.7, at Guido's request
Changes by Brian Curtin cur...@acm.org: -- nosy: +kbk, taleinat ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10137 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10137] Patch to IDLE for Python 2.7, at Guido's request
Changes by Brian Curtin cur...@acm.org: -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10137 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9778] Make hash values the same width as a pointer (or Py_ssize_t)
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Mon, Oct 18, 2010 at 1:25 PM, Case Van Horsen rep...@bugs.python.org wrote: .. We either needed to (1) add an unsigned Py_hash_t type or (2) just use size_t and Py_ssize_t. Option (2) may actually be preferable because dict and set implementations rely on Py_hash_t being compatible with Py_ssize_t. See issue 1646068. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9778 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10135] Format specifier 'n' not working
Eric Smith e...@trueblade.com added the comment: It looks like the float.__format__ code is correctly using the value of decimal_point = '.'. It also agrees with locale.format(). How are you setting the locale? The problem appears to be either how you are setting the locale or the contents of the locale, not in the formatting code. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10135 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9437] can't build extensions with non-default ldflags (e.g. -m32)
Changes by Antoine Pitrou pit...@free.fr: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9437 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10137] Patch to IDLE for Python 2.7, at Guido's request
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: But this patch is a diff between a 2.7 and a 3.2 version of IDLE, isn't it? The tkinter-Tkinter renaming is not supposed to happen in the 2.7 branch. Could you instead show a diff between the present version of IDLE in 2.7 and the result of your work, so we can better see the impact of the change? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10137 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10135] Format specifier 'n' not working
Boštjan Mejak bostjan.me...@gmail.com added the comment: So do I need additional things to set in my code if I use the 'n' format specifier in order for it to be locale-aware? So using just the 'n' format specifier is not enough? Please explain in depth. On Mon, Oct 18, 2010 at 7:32 PM, Eric Smith rep...@bugs.python.org wrote: Eric Smith e...@trueblade.com added the comment: It looks like the float.__format__ code is correctly using the value of decimal_point = '.'. It also agrees with locale.format(). How are you setting the locale? The problem appears to be either how you are setting the locale or the contents of the locale, not in the formatting code. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10135 ___ -- Added file: http://bugs.python.org/file19266/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10135 ___So do I need additional things to set in my code if I use the #39;n#39; format specifier in order for it to be locale-aware? So using just the #39;n#39; format specifier is not enough? Please explain in depth.brbrdiv class=gmail_quote On Mon, Oct 18, 2010 at 7:32 PM, Eric Smith span dir=ltrlt;a href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt;/span wrote:brblockquote class=gmail_quote style=margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex; div class=imbr Eric Smith lt;a href=mailto:e...@trueblade.com;e...@trueblade.com/agt; added the comment:br br /divIt looks like the float.__format__ code is correctly using the value of decimal_point = #39;.#39;. It also agrees with locale.format().br br How are you setting the locale? The problem appears to be either how you are setting the locale or the contents of the locale, not in the formatting code.br br --br divdiv/divdiv class=h5br ___br Python tracker lt;a href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt;br lt;a href=http://bugs.python.org/issue10135; target=_blankhttp://bugs.python.org/issue10135/agt;br ___br /div/div/blockquote/divbr ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10073] calendar.isleap() not checking parameter type
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: The most pedantic implementation of calendar.isleap() would be from datetime import date, timedelta def isleap(year): return date(year, 3, 1) - date(year, 2, 1) == timedelta(29) Since python calendar only supports years in the range [1, ], the above will properly raise ValueError: year is out of range on negative or zero year. This also guarantees that calendar module's notion of leap year is the same as that of datetime module. If this is found to be a worthwhile change, I would also rewrite monthrange as def monthrange(year, month): first = date(year, month, 1) if month == 12: ndays = 31 else: ndays = (date(year, month + 1, 1) - first).days return first.weekday(), ndays -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10073 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10051] distutils fail to install unicode-encoded files with POSIX locale
Éric Araujo mer...@netwok.org added the comment: Thanks for the report. This is a duplicate, you can add yourself to the nosy list on the superseder bug to track status. -- resolution: - duplicate stage: - committed/rejected status: open - closed superseder: - distutils: set encoding to utf-8 for input and output files ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10051 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10134] test_email failures on Windows: end of line issue?
R. David Murray rdmur...@bitdance.com added the comment: The interesting question is, why aren't the buildbots seeing this failure? I can reproduce it in my Windows VM using 3.2a3, and will work on a fix (to the tests, the code under test is doing the correct thing, though that thing is somewhat broken by design). -- components: +Tests priority: normal - high stage: - needs patch type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10134 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10134] test_email failures on Windows: end of line issue?
Changes by R. David Murray rdmur...@bitdance.com: -- assignee: - r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10134 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10073] calendar.isleap() not checking parameter type
Changes by Georg Brandl ge...@python.org: -- nosy: -georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10073 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9377] socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names
David Watson bai...@users.sourceforge.net added the comment: The result from gethostname likely comes out of machine-local configuration. It may have non-ASCII in it, which is then likely encoded in the local encoding. When looking it up in DNS, IDNA should be applied. I would have thought that someone who intended a Unicode hostname to be looked up in its IDNA form would have encoded it using IDNA, rather than an 8-bit encoding - how many C programs would transcode the name that way, rather than just passing the char * from one interface to another? In fact, I would think that non-ASCII bytes in a hostname most probably indicated that a name resolution mechanism other than the DNS was in use, and that the byte string should be passed unaltered just as a typical C program would. OTOH, output from gethostbyaddr likely comes out of the DNS itself. Guessing what encoding it may have is futile - other than guessing that it really ought to be ASCII. Sure, but that doesn't mean the result can't be made to round-trip if it turns out not to be ASCII. The guess that it will be ASCII is, after all, still a guess (as is the guess that it comes from the DNS). Python's socket module is clearly focused on the internet, and intends to support that well. So if you pass a non-ASCII string, it will have to encode that using IDNA. If that's not what you want to get, tough luck. I don't object to that, but it does force a choice between decoding an 8-bit name for display (e.g. by using the locale encoding), and decoding it to round-trip automatically (e.g. by using ASCII/surrogateescape, with support on the encoding side). Using PyUnicode_DecodeFSDefault() for the hostname or other returned names (thus decoding them for display) would make this issue solvable with programmer intervention - for instance, socket.gethostbyaddr(socket.gethostname()) could be replaced by socket.gethostbyaddr(os.fsencode(socket.gethostname())), but programmers might well neglect to do this, given that no encoding was needed in Python 2. Also, even displaying a non-ASCII name decoded according to the locale creates potential for confusion, as when the user types the same characters into a Python program for lookup (again, barring programmer intervention), they will not represent the same byte sequence as the characters the user sees on the screen (as they will instead represent their IDNA ASCII-compatible equivalent). So overall, I do think it is better to decode names for automatic round-tripping rather than for display, but my main concern is simply that it should be possible to recover the original bytes so that round-tripping is at least possible. PyUnicode_DecodeFSDefault() would accomplish that much at least. -- title: socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names - socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9377 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10073] calendar.isleap() not checking parameter type
Boštjan Mejak bostjan.me...@gmail.com added the comment: Also, your pedantic version of isleap() is not pedantic at all. return date(year, 3, 1) - date(year, 2, 1) == timedelta(29) does not seem readable at all. Readability counts! return date(year, 3, 1) is not understandable. What are the arguments 3 and 1 in the date() function for? On Mon, Oct 18, 2010 at 8:06 PM, Boštjan Mejak bostjan.me...@gmail.comwrote: else: --ndays = (date(year, month + 1, 1) - first).days return first.weekday(), ndays Oh my God! The line with a pointer is so ugly! On Mon, Oct 18, 2010 at 7:59 PM, Alexander Belopolsky rep...@bugs.python.org wrote: Alexander Belopolsky belopol...@users.sourceforge.net added the comment: The most pedantic implementation of calendar.isleap() would be from datetime import date, timedelta def isleap(year): return date(year, 3, 1) - date(year, 2, 1) == timedelta(29) Since python calendar only supports years in the range [1, ], the above will properly raise ValueError: year is out of range on negative or zero year. This also guarantees that calendar module's notion of leap year is the same as that of datetime module. If this is found to be a worthwhile change, I would also rewrite monthrange as def monthrange(year, month): first = date(year, month, 1) if month == 12: ndays = 31 else: ndays = (date(year, month + 1, 1) - first).days return first.weekday(), ndays -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10073 ___ -- Added file: http://bugs.python.org/file19267/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10073 ___Also, your quot;pedanticquot; version of isleap() is not pedantic at all.divbr/divdivspan class=Apple-style-span style=font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; return date(year, 3, 1) - date(year, 2, 1) == timedelta(29)/span/div divfont class=Apple-style-span face=arial, sans-serifspan class=Apple-style-span style=border-collapse: collapse;does not seem readable at all. Readability counts!/span/font/divdivfont class=Apple-style-span face=arial, sans-serifspan class=Apple-style-span style=border-collapse: collapse;br /span/font/divdivfont class=Apple-style-span face=arial, sans-serifspan class=Apple-style-span style=border-collapse: collapse;span class=Apple-style-span style=font-size: 13px; return date(year, 3, 1) is not understandable. What are the arguments 3 and 1 in the date() function for?/spanbr /span/fontbr/divdivbrdiv class=gmail_quoteOn Mon, Oct 18, 2010 at 8:06 PM, Boštjan Mejak span dir=ltrlt;a href=mailto:bostjan.me...@gmail.com;bostjan.me...@gmail.com/agt;/span wrote:brblockquote class=gmail_quote style=margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex; div class=imspan style=font-family:arial, sans-serif;font-size:13px;border-collapse:collapse   else:br--gt;   ndays = (date(year, month + 1, 1) - first).daysbr   return first.weekday(), ndays/spandiv font face=arial, sans-serifspan style=border-collapse:collapsebr/span/font/div/divdivfont face=arial, sans-serifspan style=border-collapse:collapseOh my God! The line with a pointer is so ugly!br /span/fontdivdiv/divdiv class=h5brdiv class=gmail_quoteOn Mon, Oct 18, 2010 at 7:59 PM, Alexander Belopolsky span dir=ltrlt;a href=mailto:rep...@bugs.python.org; target=_blankrep...@bugs.python.org/agt;/span wrote:br blockquote class=gmail_quote style=margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex divbr Alexander Belopolsky lt;a href=mailto:belopol...@users.sourceforge.net; target=_blankbelopol...@users.sourceforge.net/agt; added the comment:br br /divThe most pedantic implementation of calendar.isleap() would bebr br from datetime import date, timedeltabr def isleap(year):br   return date(year, 3, 1) - date(year, 2, 1) == timedelta(29)br br Since python calendar only supports years in the range [1, ], the above will properly raise ValueError: year is out of range on negative or zero year.  This also guarantees that calendar module#39;s notion of leap year is the same as that of datetime module.br br If this is found to be a worthwhile change, I would also rewrite monthrange asbr br def monthrange(year, month):br   first = date(year, month, 1)br   if month == 12:br     ndays = 31br   else:br     ndays = (date(year, month + 1, 1) - first).daysbr   return first.weekday(), ndaysbr divdiv/divdivbr --br br ___br Python tracker lt;a href=mailto:rep...@bugs.python.org; target=_blankrep...@bugs.python.org/agt;br lt;a href=http://bugs.python.org/issue10073; target=_blankhttp://bugs.python.org/issue10073/agt;br
[issue10135] Format specifier 'n' not working
Georg Brandl ge...@python.org added the comment: You need to call setlocale() in your program. For more in-depth explanations, please refer to the docs at http://docs.python.org/library/locale. -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10135 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10091] ast.literal_eval does not handled new set literals
Éric Araujo mer...@netwok.org added the comment: Set literals, a new feature indeed, have been backported to 2.7 and 3.1. The lack of support in ast.literal_eval is arguably a bug. Benjamin, can you make a statement as release manager? Thanks. -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10091 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10073] calendar.isleap() not checking parameter type
Georg Brandl ge...@python.org added the comment: return date(year, 3, 1) is not understandable. What are the arguments 3 and 1 in the date() function for? Boštjan, we appreciate your concern for the programming style of the Python standard library. However, your question shows that you should probably spend a bit more time reading documentation than fixing code. -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10073 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10073] calendar.isleap() not checking parameter type
Boštjan Mejak bostjan.me...@gmail.com added the comment: else: --ndays = (date(year, month + 1, 1) - first).days return first.weekday(), ndays Oh my God! The line with a pointer is so ugly! On Mon, Oct 18, 2010 at 7:59 PM, Alexander Belopolsky rep...@bugs.python.org wrote: Alexander Belopolsky belopol...@users.sourceforge.net added the comment: The most pedantic implementation of calendar.isleap() would be from datetime import date, timedelta def isleap(year): return date(year, 3, 1) - date(year, 2, 1) == timedelta(29) Since python calendar only supports years in the range [1, ], the above will properly raise ValueError: year is out of range on negative or zero year. This also guarantees that calendar module's notion of leap year is the same as that of datetime module. If this is found to be a worthwhile change, I would also rewrite monthrange as def monthrange(year, month): first = date(year, month, 1) if month == 12: ndays = 31 else: ndays = (date(year, month + 1, 1) - first).days return first.weekday(), ndays -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10073 ___ -- Added file: http://bugs.python.org/file19268/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10073 ___span class=Apple-style-span style=font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse;    else:br--gt;   ndays = (date(year, month + 1, 1) - first).daysbr   return first.weekday(), ndays/spandiv font class=Apple-style-span face=arial, sans-serifspan class=Apple-style-span style=border-collapse: collapse;br/span/font/divdivfont class=Apple-style-span face=arial, sans-serifspan class=Apple-style-span style=border-collapse: collapse;Oh my God! The line with a pointer is so ugly!br /span/fontbrdiv class=gmail_quoteOn Mon, Oct 18, 2010 at 7:59 PM, Alexander Belopolsky span dir=ltrlt;a href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt;/span wrote:brblockquote class=gmail_quote style=margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex; div class=imbr Alexander Belopolsky lt;a href=mailto:belopol...@users.sourceforge.net;belopol...@users.sourceforge.net/agt; added the comment:br br /divThe most pedantic implementation of calendar.isleap() would bebr br from datetime import date, timedeltabr def isleap(year):br   return date(year, 3, 1) - date(year, 2, 1) == timedelta(29)br br Since python calendar only supports years in the range [1, ], the above will properly raise ValueError: year is out of range on negative or zero year.  This also guarantees that calendar module#39;s notion of leap year is the same as that of datetime module.br br If this is found to be a worthwhile change, I would also rewrite monthrange asbr br def monthrange(year, month):br   first = date(year, month, 1)br   if month == 12:br     ndays = 31br   else:br     ndays = (date(year, month + 1, 1) - first).daysbr   return first.weekday(), ndaysbr divdiv/divdiv class=h5br --br br ___br Python tracker lt;a href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt;br lt;a href=http://bugs.python.org/issue10073; target=_blankhttp://bugs.python.org/issue10073/agt;br ___br /div/div/blockquote/divbr/div ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10135] Format specifier 'n' not working
Boštjan Mejak bostjan.me...@gmail.com added the comment: I thought having Slovenian locale set in Windows OS is the way the 'n' format specifier works. So I must set the locale in the app. Now we're cookin'! ;) Thanks Georg. On Mon, Oct 18, 2010 at 8:14 PM, Georg Brandl rep...@bugs.python.orgwrote: Georg Brandl ge...@python.org added the comment: You need to call setlocale() in your program. For more in-depth explanations, please refer to the docs at http://docs.python.org/library/locale. -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10135 ___ -- Added file: http://bugs.python.org/file19269/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10135 ___I thought having quot;Slovenianquot; locale set in Windows OS is the way the #39;n#39; format specifier works. So I must set the locale in the app. Now we#39;re cookin#39;! ;) Thanks Georg.brbrdiv class=gmail_quote On Mon, Oct 18, 2010 at 8:14 PM, Georg Brandl span dir=ltrlt;a href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt;/span wrote:brblockquote class=gmail_quote style=margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex; br Georg Brandl lt;a href=mailto:ge...@python.org;ge...@python.org/agt; added the comment:br br You need to call setlocale() in your program.  For more in-depth explanations, please refer to the docs at lt;a href=http://docs.python.org/library/locale; target=_blankhttp://docs.python.org/library/locale/agt;.br br --br nosy: +georg.brandlbr divdiv/divdiv class=h5br ___br Python tracker lt;a href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt;br lt;a href=http://bugs.python.org/issue10135; target=_blankhttp://bugs.python.org/issue10135/agt;br ___br /div/div/blockquote/divbr ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9778] Make hash values the same width as a pointer (or Py_ssize_t)
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: My expectation is that Py_hash_t is the same as Py_ssize_t. The goal is to make hashes match the range of possible table sizes. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9778 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10031] Withdraw anti-recommendation of relative imports from documentation
Éric Araujo mer...@netwok.org added the comment: Thanks for the report and suggestions. I agree to the gist of your changes, but I wouldn’t remove the explanation of implicit relative imports (the part starting with “If you’re writing code”). -- keywords: +patch nosy: +eric.araujo stage: - patch review versions: -Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10031 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10073] calendar.isleap() not checking parameter type
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: I don't think anything good will come out of this. Closing as rejected. -- resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10073 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10073] calendar.isleap() not checking parameter type
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: Removed file: http://bugs.python.org/file19267/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10073 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10073] calendar.isleap() not checking parameter type
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: Removed file: http://bugs.python.org/file19268/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10073 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9561] distutils: set encoding to utf-8 for input and output files
Changes by Michał Górny mgo...@gentoo.org: -- nosy: +mgorny ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9561 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10135] Format specifier 'n' not working
Changes by Eric Smith e...@trueblade.com: -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10135 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10135] Format specifier 'n' not working
Changes by Eric Smith e...@trueblade.com: Removed file: http://bugs.python.org/file19265/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10135 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10135] Format specifier 'n' not working
Changes by Eric Smith e...@trueblade.com: Removed file: http://bugs.python.org/file19266/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10135 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10135] Format specifier 'n' not working
Changes by Eric Smith e...@trueblade.com: Removed file: http://bugs.python.org/file19269/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10135 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5117] os.path.relpath problem with root directory
Changes by Georg Brandl ge...@python.org: -- status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5117 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1467929] %-formatting and dicts
Vetoshkin Nikita nikita.vetosh...@gmail.com added the comment: Updated patch against py3k. Fixing last reported issue with '%(a)s %%' % {'a':'xyz'} -- nosy: +nvetoshkin Added file: http://bugs.python.org/file19270/issue1467929_py3k.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1467929 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9344] please add posix.getgrouplist()
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: I don't see how this difference is relevant for exposing the functionality in python: Linux: int getgrouplist(const char *user, gid_t group, gid_t *groups, int *ngroups); MacOS: int getgrouplist(const char *name, int basegid, int *groups, int *ngroups); The only difference is that Linux uses gid_t and MacOS uses int. The requested posix.getgrouplist() will take a python string and a python integer and return a list of integers. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9344 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10137] Patch to IDLE for Python 2.7, at Guido's request
Ned Deily n...@acm.org added the comment: I believe the enhancements here are the same as submitted for py3k in Issue10079. Since it is likely the same comments will apply to both variants, I think it would be better to have just one issue, so I would recommend regenerating the patch against the current 2.7 svn top of trunk (or the 2.7 release), attaching the patch to #10079, and closing this as a duplicate. -- nosy: +ned.deily ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10137 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10091] ast.literal_eval does not handled new set literals
Benjamin Peterson benja...@python.org added the comment: 2010/10/18 Éric Araujo rep...@bugs.python.org: Éric Araujo mer...@netwok.org added the comment: Set literals, a new feature indeed, have been backported to 2.7 and 3.1. The lack of support in ast.literal_eval is arguably a bug. Benjamin, can you make a statement as release manager? Thanks. No change please. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10091 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9344] please add posix.getgrouplist()
Vetoshkin Nikita nikita.vetosh...@gmail.com added the comment: @Alexander, it was just a note, that implementation in posixmodule.c won't be the same across all flavours of Unix :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9344 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10134] test_email failures on Windows: end of line issue?
R. David Murray rdmur...@bitdance.com added the comment: Drat, there's a real bug here, too. The bytes parsing machinery doesn't correctly translate crlf on input. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10134 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1467929] %-formatting and dicts
Changes by Vetoshkin Nikita nikita.vetosh...@gmail.com: Removed file: http://bugs.python.org/file19270/issue1467929_py3k.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1467929 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1467929] %-formatting and dicts
Vetoshkin Nikita nikita.vetosh...@gmail.com added the comment: Updated patch to capture another patological case: '%(a)s %' % {'a':'xyz'} - incomplete formatter at the end of the line -- Added file: http://bugs.python.org/file19271/issue1467929_py3k.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1467929 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com