[issue13466] new timezones
Marc-Andre Lemburg m...@egenix.com added the comment: Amaury Forgeot d'Arc wrote: Amaury Forgeot d'Arc amaur...@gmail.com added the comment: A fairly correct way is to query the time zone database at time module import time by using the DST and GMT offset of that time. But that does not give the *other* timezone :-( Which other timezone ? You set time.timezone to the GMT offset of the import time and then subtract another 3600 seconds in case tm_isdst is set. IMO time.timezone and time.daylight should be deprecated since they will give wrong results around DST changes (both switch times and legal changes such as the described one) in long running processes such as daemons. time.timezone is the non-DST timezone: this value does not change around the DST change date. No, but time.daylight changes and time.timezone can change in situations like these where a region decides to change the way DST is dealt with, e.g. switches to the DST timezone or moves the switchover date. Since both values are tied to a specific time I don't think it's a good idea to have them as module globals. That's why the current implementation uses absolute dates like the of January: DST changes are often in March and October. Such an algorithm can be used as fallback solution in case tm_isdst is -1 (unknown), but not in case the DST information is available. What about this algorithm: - pick the first of January and the first of July surrounding the current date - if both have tm_idst==0, the region has no DST. Use the current GMT offset for both timezone and altzone; daylight=0 Those two steps are not necessary. If tm_isdst == 0, you already know that the current time zone is not DST. - otherwise, use the *current* time and get its DST and GMT offset. This is enough to compute both timezone and altzone (with the relation altzone=timezone-3600) That's what I suggested above. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13466 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12776] argparse: type conversion function should be called only once
flying sheep flying-sh...@web.de added the comment: this is annoying: i’m creating a reindentation script that reindents any valid python script. the user can specify if, and how many spaces he/she wants to use per indentation level. `0` or leaving the option out means “one tab per level”. if the argument is given, appended code works as intended. but in the default case, the code fails for any of the two default values i tried. i would expect that one of the default values works: either `0`, if the default value *is* converted via the `type` function, or `\t` if the default value bypasses it. it seems that argparse applies the `type` function to the default instantly, and then to the argument (be it the already-converted default or a passed option). this breaks `type` functions which aren’t reflexive for values from their result set, i.e.: `t(x) = y = t(y) = y` must be true for all `x` that the function can handle -- nosy: +flying sheep Added file: http://bugs.python.org/file23767/argparse_test.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12776 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12776] argparse: type conversion function should be called only once
Arnaud Fontaine ar...@debian.org added the comment: Does the patch I attached fix your issue? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12776 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13465] A Jython section in the dev guide would be great
Antoine Pitrou pit...@free.fr added the comment: Hosting docs.python.org/devguide/jython doesn't seem like an unreasonable idea at all to me, and what's the benefit to CPython in making the Jython team go to the effort of building out independent deployment and source control infrastructure for their own devguide? We can *host* (in the Web hosting sense) the jython devguide. That certainly doesn't mean it belongs in the same piece of documentation. Our devguide was created to explain how to contribute to the CPython project. Creating a Jython section only makes things messier than they are, and it certainly doesn't help our users. Really, I'm sure setting up a crontab and creating an hg repo is easy enough for the Jython people (or whoever wants to help them in that matter). wiki.python.org is already shared between the two projects, and pydotorg hosts the Jython source control infrastructure in addition to CPython's. Providing infrastructure is not the same as sharing the development resources themselves. We don't share the (CPython) hg repo, and we don't share the (CPython) bug tracker. There's no reason to share the (CPython) devguide, not until the two projects merge together. (as for the wiki... well, suffice to say that it's a terrible mess and I hope it's not an example for the devguide. If the wiki was actually useful and practical we wouldn't have made the devguide a separate site, I guess) More generally, given that we now provide cross-links to PyPy, Jython and IronPython from the download pages, it also seems reasonable to provide pointers to their own get involved resources from the CPython devguide. We already provide pointers from the devguide: http://docs.python.org/devguide/#other-interpreter-implementations It's only a matter of changing the URLs if these projects ask us to. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13465 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12170] index() and count() methods of bytes and bytearray should accept byte ints
Antoine Pitrou pit...@free.fr added the comment: Just a thought: Would this change be worthy for the What's new in 3.3 list? I think so. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12170 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13466] new timezones
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: But that does not give the *other* timezone :-( Which other timezone ? I meant the other timezone *name*. I think we don't understand each other: - time.timezone is the offset of the local (non-DST) timezone. - time.altzone is the offset of local DST timezone. They don't depend on the current date, they depend only on the timezone database. localtime() only gives the timezone for a given point in time, and the time module needs to present two timezones. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13466 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12776] argparse: type conversion function should be called only once
flying sheep flying-sh...@web.de added the comment: i don’t know, since i get python from the ubuntu repositories, sorry. in which python release will this patch first be integrated? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12776 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13466] new timezones
Marc-Andre Lemburg m...@egenix.com added the comment: Amaury Forgeot d'Arc wrote: Amaury Forgeot d'Arc amaur...@gmail.com added the comment: But that does not give the *other* timezone :-( Which other timezone ? I meant the other timezone *name*. I think we don't understand each other: - time.timezone is the offset of the local (non-DST) timezone. - time.altzone is the offset of local DST timezone. Yes, I know. They don't depend on the current date, they depend only on the timezone database. localtime() only gives the timezone for a given point in time, and the time module needs to present two timezones. Right, but they should only depend on the data in the timezone database at the time of import of the module and not determine the values by looking at specific dates in the past. The only problem is finding out whether the locale uses DST in case the current import time points to a non-DST time. This can be checked by looking at Jan 1st and June 1st after the current import time (ie. in the future) and then testing tm_isdst. If there is a DST change, then you set time.altzone = time.timezone - 3600. Otherwise, you set time.altzone = time.timezone. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13466 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12776] argparse: type conversion function should be called only once
Arnaud Fontaine ar...@debian.org added the comment: It would definitely help if you could apply the patch for Python 2.7 manually on your local installation (after making a backup of course). You can just download the patch for Python 2.7 then (only the first part of the patch can be applied, the second part is for the test so it doesn't matter): # cd /usr/lib/python2.7/ # patch -b -p2 -i /PATH/TO/THE/PATCH Thanks much. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12776 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13415] del os.environ[key] ignores errors
STINNER Victor victor.stin...@haypocalc.com added the comment: Using broken_unsetenv.diff + autoconf, Python compiles correctly on Mac OS X Tiger. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13415 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13470] A user may need ... when she has ...
Antoine Pitrou pit...@free.fr added the comment: they is right and she is actually right too. See http://en.wikipedia.org/wiki/Singular_they -- nosy: +pitrou resolution: - works for me status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13470 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13469] TimedRotatingFileHandler fails to handle intervals of several weeks correctly
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +vinay.sajip type: - behavior versions: +Python 2.7, Python 3.2, Python 3.3 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13469 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6407] multiprocessing Pool should allow custom task queue
Antoine Pitrou pit...@free.fr added the comment: As the name implies, _setup_queues is a private method. It feels a bit weird to recommend overriding it in a subclass. -- nosy: +pitrou stage: test needed - needs patch versions: +Python 3.3 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6407 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13415] del os.environ[key] ignores errors
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 1b83fd683e28 by Victor Stinner in branch 'default': Close #13415: Test in configure if unsetenv() has a return value or not. http://hg.python.org/cpython/rev/1b83fd683e28 -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13415 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6407] multiprocessing Pool should allow custom task queue
Ask Solem a...@celeryproject.org added the comment: @swindmill, if you provide a doc/test patch then this can probably be merged. @pitrou, We could change it to `setup_queues`, though I don't think even changing the name of private methods is a good idea. It could simply be an alias to `_setup_queues` or vice versa. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6407 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10359] ISO C cleanup
Éric Araujo mer...@netwok.org added the comment: Do the changes to Python/Python-ast.c and Modules/_ctypes/libffi/src/x86/ffi.c still apply? (libffi is an external project, but our copy is already edited so we might as well do one more change). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10359 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13471] setting access time beyond Jan. 2038 on remote share failes on Win7 x64
New submission from Thorsten Simons t...@snomis.de: Using Python '3.2.2 (default, Sep 4 2011, 09:07:29) [MSC v.1500 64 bit (AMD64)]' on Windows 7 Professional SP1: If you set an access time for a file beyond Jan. 2038 on a file stored in a local NTFS filesystem, all's well: os.utime('c:\\temp_target\\ulp', (3433232323, 3433232323)) os.stat('c:\\temp_target\\ulp') nt.stat_result(st_mode=33206, st_ino=2251799813820060, st_dev=0, st_nlink=1, st_uid=0, st_gid=0, st_size=0, st_atime=3433232323, st_mtime=3433232323, st_ctime=1322133855) time.ctime(3433232323) 'Mon Oct 17 13:38:43 2078' If you try to do this on a remote share (mounted as y:), provided by a Linux x64 box running Samba x64, things are different: os.utime('y:\\temp_target2\\ulp', (3433232323, 3433232323)) os.stat('y:\\temp_target2\\ulp') nt.stat_result(st_mode=33206, st_ino=67150103, st_dev=0, st_nlink=1, st_uid=0, st_gid=0, st_size=0, st_atime=910692730085, st_mtime=910692730085, st_ctime=1322133629) time.ctime(910692730085) Traceback (most recent call last): File pyshell#22, line 1, in module time.ctime(910692730085) ValueError: unconvertible time So, setting of access/modification time does not work - assumeably, we run into a 32-bit boundary somewhere... Interestingly, if you set the respective access time from a Linux x64 box, you can see the right access time within Windows 7 via Explorer/Properties... -- components: Windows messages: 148248 nosy: Thorsten.Simons priority: normal severity: normal status: open title: setting access time beyond Jan. 2038 on remote share failes on Win7 x64 type: behavior versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13471 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13472] Quick Start in devguide doesn’t mention build dependencies
New submission from Éric Araujo mer...@netwok.org: The Quick Start section in the devguide does not tell people what they need to install in order to compile Python. A short mention or a link to a section with all info should be added. I can contribute info for Debian and derivative systems: “aptitude build-dep pythonX.Y” -- messages: 148249 nosy: eric.araujo, ezio.melotti priority: normal severity: normal status: open title: Quick Start in devguide doesn’t mention build dependencies ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13472 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12776] argparse: type conversion function should be called only once
Éric Araujo mer...@netwok.org added the comment: Mucking with your installed Python is probably a bad idea, and it may also be an old version (compared to the current development version which has seen hundreds of changes) where testing the patch would not give useful results. Please see the devguide. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12776 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13471] setting access time beyond Jan. 2038 on remote share failes on Win7 x64
STINNER Victor victor.stin...@haypocalc.com added the comment: The timestamp is converted to time_t (32 bits) and then to FILE_TIME (64 bits). A function to convert directly a PyObject to FILE_TIME should be written. -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13471 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13448] PEP 3155 implementation
Éric Araujo mer...@netwok.org added the comment: BTW Antoine, will you update the doc to mention __qualname__ or would you like help? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13448 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13448] PEP 3155 implementation
Éric Araujo mer...@netwok.org added the comment: Doc patch looks good. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13448 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13448] PEP 3155 implementation
Éric Araujo mer...@netwok.org added the comment: And of course, right after I post this I look at my terminal and see the “Add docs” commit. Ignore me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13448 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13448] PEP 3155 implementation
Changes by Éric Araujo mer...@netwok.org: -- Removed message: http://bugs.python.org/msg148253 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13448 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13448] PEP 3155 implementation
Changes by Éric Araujo mer...@netwok.org: -- Removed message: http://bugs.python.org/msg148252 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13448 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12934] pysetup doesn’t work for the docutils project
Éric Araujo mer...@netwok.org added the comment: This is a problem on my side, not in distutils2. My pysetupX.Y scripts are just shell one-liners of this form: PYTHONPATH=~/path/to/d2 pythonX.Y -m distutils2.run $@ Because of sys.path initialization, d2 tried to import docutils from the working directory instead of the version in site-packages. If I install d2 and run the installed pysetup script, d2 and docutils are imported from site-packages and everything is fine. -- resolution: - invalid stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12934 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13472] Quick Start in devguide doesn’t mention build dependencies
Antoine Pitrou pit...@free.fr added the comment: Well, it's a quick start. The link to build Python actually tells you about dependencies. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13472 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13461] Error on test_issue_1395_5 with Python 2.7 and VS2010
Antoine Pitrou pit...@free.fr added the comment: What if you replace: PyObject *decoded = PyObject_CallMethod( self-decoder, decode, s#, input, 1); with: PyObject *decoded = PyObject_CallMethod( self-decoder, decode, s#, input, (Py_ssize_t) 1); -- nosy: +brian.curtin, loewis, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13461 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13473] Add tests for files byte-compiled by distutils[2]
New submission from Éric Araujo mer...@netwok.org: I recently changed packaging.util.byte_compile, the function used by the build_py and install_lib commands, so that it can create .pyc and/or .pyo files independently of the calling’s Python -O or -B flags (dad02a080bbc), but I think I introduced a bug. To check that bug and fully test byte_compile before I further simplify the function and backport the whole fix to distutils, I wanted to add tests that load a .pyc or .pyo file and make sure that the right optimization level is used (nothing for --compile, level one for --optimize=1, level 2 for --optimize=2). In the attached patch, I run a Python with -O, -OO or no flag in a subprocess to import a module that prints different things depending on the optimization level. The .pyc or .pyo file is already created by packaging, but I have no check that makes sure that they are not recreated (which I don’t want) and I don’t know if the optimizations in compile.c are applied during byte-compilation or after import (which would make my tests not exercise what I want). (I tried to use imp.load_module at first but it’s not very friendly. Other ideas that I had after the patch was done: Use subprocess + imp so that I can import pyc or pyo as I wish; use open + dis module.) So, could you import experts review the functions added in packaging.tests.support and tell me if they exercise what I want? -- assignee: eric.araujo components: Distutils, Distutils2 files: p7g-tests-bytecompiled-files.diff keywords: patch messages: 148258 nosy: alexis, brett.cannon, eric.araujo, ncoghlan, tarek priority: normal severity: normal stage: commit review status: open title: Add tests for files byte-compiled by distutils[2] versions: 3rd party, Python 2.7, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file23768/p7g-tests-bytecompiled-files.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13473 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13470] A user may need ... when she has ...
Florent Xicluna florent.xicl...@gmail.com added the comment: This explanation is enough. Thanks. -- resolution: works for me - invalid stage: needs patch - committed/rejected status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13470 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13473] Add tests for files byte-compiled by distutils[2]
Éric Araujo mer...@netwok.org added the comment: (For the reference, the bug I added is this: http://hg.python.org/cpython/rev/c10946a17420#l6.45 p7g.util.byte_compile calls py_compile.compile with a filename ending in .pyc or .pyo as appropriate, but the optimization level in the py_compile.compile function depends on the calling Python’s -O option. When byte_compile wants to create a .pyo file but is run under a python without -O, it spawns a subprocess with the -O option. The fix I did made sure that the filename used (pyc or pyo) did not depend on the calling Python’s -O, *but* it should not have removed the setting of -O/-OO in the subprocess, as it’s the only way to control the optimization level in py_compile.compile before 3.2. I think I will use a py_compile or compileall function so that I can have control over the optimization level from Python, which will let me remove the inelegant spawning in byte_compile, and I will backport that function for distutils2. If this makes no sense, please ignore. I’m not sure I would have understood what I’m talking about a year ago.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13473 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11886] test_time.test_tzset() fails on x86 FreeBSD 7.2 3.x: AEST timezone called EST
STINNER Victor victor.stin...@haypocalc.com added the comment: Issue #13313 has been marked as a duplicate of this issue. Interesting message from flox: Maybe it is related. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=93810 Ambiguous timezone names (AEST vs EST) -- nosy: +flox ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11886 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13313] test_time fails: tzset() do not change timezone
STINNER Victor victor.stin...@haypocalc.com added the comment: Duplicate of #11886. -- nosy: +haypo resolution: - duplicate status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13313 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2377] Replace __import__ w/ importlib.__import__
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2377 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11886] test_time.test_tzset() fails on x86 FreeBSD 7.2 3.x: AEST timezone called EST
STINNER Victor victor.stin...@haypocalc.com added the comment: Is there a way to force configure run on the bot? ./configure is run for each build of each buildbot. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11886 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12759] (?P=) input for Tools/scripts/redemo.py raises unnhandled exception
Masha Katsman mkats...@yahoo.com added the comment: Updating the patch with the test. The test checks that the re exception is thrown in case of the (?P=) and (?P) expressions. It used to raise an Index exception. My only question is, the exception we raise now says, there invalid characters in the group name, whether in our case the group name is just empty. -- Added file: http://bugs.python.org/file23769/patch_for_12759 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12759 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11886] test_time.test_tzset() fails on x86 FreeBSD 7.2 3.x: AEST timezone called EST
STINNER Victor victor.stin...@haypocalc.com added the comment: I don't see this issue as a bug in Python, but just that the timezone database is different on some OSes. Can't we just accept both names, AEST and EST? Attached patch changes test_time to tolerate EST name for 'AEST-10AEDT-11,M10.5.0,M3.5.0' (Victoria) time zone. -- keywords: +patch Added file: http://bugs.python.org/file23770/time_aest.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11886 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13224] Change str(x) to return only __qualname__ for some types
Éric Araujo mer...@netwok.org added the comment: You are right, I misinterpreted “use”. I cloned the the PEP 3155 repo and ran my test script (I’ll attach it for reference) and reprs/strs are indeed class '__main__.A.B' and function makestrip.locals.strip at ..., so this request is not obsoleted. I’ve updated my patch to use qualnames for str(cls) and str(func). As I reported before, if I want str(sys.exc_info) to be 'exc_info', then Python unbound methods (i.e. functions) are affected: method 'update' of 'dict' objects built-in method update of dict object at ... method 'tolist' of 'array.array' objects built-in method tolist of array.array object at ... → Counter.update bound method Counter.update of Counter() → Top.Nested.method # this checks qualnames are used bound method Nested.method of __main__.Top.Nested object at ... It seems to me that this is not a problem: Python 3 unbound methods *are* functions. If you decide that having str(method) unchanged for all kinds of methods is more important than giving all kinds of functions a short str, I can do it. -- dependencies: +PEP 3155 implementation Added file: http://bugs.python.org/file23771/change-some-str.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13224 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13224] Change str(x) to return only __qualname__ for some types
Changes by Éric Araujo mer...@netwok.org: Added file: http://bugs.python.org/file23772/test-str-repr.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13224 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13224] Change str(x) to return only __qualname__ for some types
Changes by Éric Araujo mer...@netwok.org: Removed file: http://bugs.python.org/file23468/change-class-__str__.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13224 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13224] Change str(x) to return only __qualname__ for some types
Changes by Éric Araujo mer...@netwok.org: Removed file: http://bugs.python.org/file23591/change-some-__str__.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13224 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13224] Change str(x) to return only the (qual)name for some types
Changes by Éric Araujo mer...@netwok.org: -- title: Change str(x) to return only __qualname__ for some types - Change str(x) to return only the (qual)name for some types ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13224 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13443] wrong links and examples in the functional HOWTO
Éric Araujo mer...@netwok.org added the comment: Thanks for the fixed links amk. I think they can be fixed in the repo right now. [Eli] I still think it's a bigger problem that the page discusses a module which is not available on Python 3.x - this means that a user following the page can't just type in the code and make it run. It’s only one section that’s affected, so +1 to replacing its contents with just a link and short description (“the functional module does X and Y for Python 2”). Before doing that, would you have the time to contact its author and inquire about porting plans? (BTW, the file is also inconsistent in its use of :: vs. implicit code blocks; I wonder if that affects doctest or the “hide prompts” button.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13443 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13472] devguide doesn’t list all build dependencies
Éric Araujo mer...@netwok.org added the comment: Okay. I just hope that people following the quick start and having build issues will follow the link. I followed it and the section only mentions zlib, I think it could be exhaustive. -- title: Quick Start in devguide doesn’t mention build dependencies - devguide doesn’t list all build dependencies ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13472 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10507] Check well-formedness of reST markup within make patchcheck
Éric Araujo mer...@netwok.org added the comment: Alternatively, make patchcheck could print “Did you build the docs?”, just as it currently prints “Did you run the test suite?” if C or Python files were modified. Building the docs would not check Misc/NEWS, the original motivation for this request, but I’m not sure it’s a big issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10507 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7611] shlex not posix compliant when parsing foo#bar
Éric Araujo mer...@netwok.org added the comment: The manual just says When operating in POSIX mode, shlex will try to be as close as possible to the POSIX shell parsing rules. but gives no reference to which authority it is following or what the rules are in either case. I think it actually does: The POSIX specification defines the behavior of a compliant /bin/sh shell. See also #1521950. -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7611 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13443] wrong links and examples in the functional HOWTO
Eli Bendersky eli...@gmail.com added the comment: Before doing that, would you have the time to contact its author and inquire about porting plans? I hope to find the time. I was also thinking about an alternative - since the HOWTO probably uses just a handful of functions from that module perhaps they can just be re-implemented and placed in the HOWTO. This can remove the unhealthy dependency on an external module, as well as provide some extra examples. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13443 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1521950] shlex.split() does not tokenize like the shell
Éric Araujo mer...@netwok.org added the comment: Thanks for the comments. There are really two cases in one bug. The first part is that the shell will split tokens at characters that shlex doesn't. The handling of , |, ;, , and could be done by adjusting the definition of shlex.wordchars. The shell may also understands things like: , ||, |, and . The exact definition of these depends on the shell, so maybe it's best to just split them out as separate tokens and let the user figure out the compound meanings. Yes. I think that the main use of shlex is really to parse a line into chunks with a way to embed spaces; it’s intended to parse a program command line (“prog --blah value stillthesamevalue arg samearg”), but not necessarily a full shell line (with and | and whatnot). When people have a line containing and |, then they need a shell to execute it, so they would not call shlex.split but just pass the full line to os.system or subprocess.Popen. Do you remember what use cases you had when you opened this report? The proper handling of quotes/escapes requires some kind of new interface. You need to distinguish between tokens that were modified by the quote/escape rules and those that were not. I don’t see why I would care about quotes in the result of shlex.split. See also #7611. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1521950 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13455] Reorganize tracker docs in the devguide
Éric Araujo mer...@netwok.org added the comment: [...] The devguide is *already* too big. [...] The devguide was supposed to be something that you read quickly and easily, not an exhaustive reference of how development works. Or at least there should be a clear separation between the two (the guide part, and the reference part). [...] The devguide is *not* primarily for core developers. It's for new contributors who want to get set up, so that they don't give up in the absence of clear indications. [...] Thanks Antoine, I was not aware of that or I had forgotten it. The old python.org/dev pages contained information for new and experienced core devs too, so I thought the devguide was intended to contain the same info. I’ll support a clearer separation between the guide and the reference, to make the devguide less overwhelming for new contributors but still complete for core devs. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13455 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13422] Subprocess: children hang due to open pipes
Charles-François Natali neolo...@free.fr added the comment: The problem I have with the solution that is currently implemented is that subprocess is waiting for the spawned child although the child is not running anymore. In my case this issue occured when invoking samba or the small sample daemon (see attached file above). For example, invoking the daemon from a bash, the daemon program exits immediately and its spawned child is running in the background. The point is that the bash is accessible right after starting the daemon. It is not waiting for the daemon process in the background to close the open pipe. What do you think of using a waitpid for this scenario? subprocess.Popen could wait for the pid of the daemon starter and gets back control once the pid of the daemon starter is gone. This way, subprocess.Popen does not need to wait for EOF on left-open pipes. That would defeat the semantics of communicate(): it is supposed to wait until EOF. If this doesn't work for your use case, simply don't use communicate(), or close stdout and stderr in your child process. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13422 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13443] wrong links and examples in the functional HOWTO
Éric Araujo mer...@netwok.org added the comment: Good idea. The functions used are: compose, partial (which we have in functools), flip, foldl. I will disagree with “unhealthy”: I’m sure adding this link was a deliberate exposure of an external module, to put a well-written solution to the spotlight as a service to the users and an acknowledgment to the author. If the cost is a little links bookkeeping for us, it is small :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13443 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5302] Allow package_data specs/globs to match directories
Éric Araujo mer...@netwok.org added the comment: I need to fix this for distutils2’s next release (with #13463 and #5302), to include distutils2/tests/fake_dists. -- assignee: tarek - eric.araujo priority: high - release blocker title: Allow package_data globs match directories - Allow package_data specs/globs to match directories versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5302 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13463] Fix parsing of package_data
Changes by Éric Araujo mer...@netwok.org: -- dependencies: +Allow package_data specs/globs to match directories, package_data only allows one glob per-package ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13463 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11805] package_data only allows one glob per-package
Éric Araujo mer...@netwok.org added the comment: I need this to package test files for distutils2’s own next release, so pragmatism/compatibility will win for the short term :) I’ll fix it together with #13463 and #5302. -- priority: normal - release blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11805 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9510] sqlite3.Warning isnt a subclass of exceptions.Warning
Éric Araujo mer...@netwok.org added the comment: Reading PEP 0249 I can see Gerhard is correct, this patch would violate the PEP. Me too. I think that the PEP is slightly flawed in that users are encouraged to raise exceptions called Warning. IMHO a Warning is never an exceptional condition and should be notified by the warnings framework. That’s probably a bad word choice in the PEP. This obviously confused the authors of MySQLdb, who do indeed warn() their Warning classes rather than raise() them, and it is very useful to be able to filter them. To obey the letter of the PEP the authors of the MySQLdb interface multiply inherit their Warning class from exceptions.StandardError and exceptions.Warning. I think they are mistaken, given that the DB API warnings are actually errors. -- stage: patch review - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9510 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8473] doctest fails if you have inconsistent lineendings
Éric Araujo mer...@netwok.org added the comment: The string in the test does not have mixed line endings, and the accompanying comment talks about testing files with CRLF on Unix. Terry, do you want to (update and) commit this? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8473 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9458] xml.etree.ElementTree.ElementTree.write(): encoding handling problems
Éric Araujo mer...@netwok.org added the comment: Thanks for the patch. The examples in your message need to be converted to a patch that applies to 3.2 or 2.7, so that we can reproduce the bug before fixing it. -- stage: - test needed versions: +Python 2.7, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9458 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9458] xml.etree.ElementTree.ElementTree.write(): encoding handling problems
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9458 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9957] SpooledTemporayFile.truncate should take size parameter
Éric Araujo mer...@netwok.org added the comment: Patch looks good to me, but I’d like another review. -- nosy: +ncoghlan type: feature request - behavior versions: +Python 2.7, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9957 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13469] TimedRotatingFileHandler fails to handle intervals of several weeks correctly
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: TimedRotatingFileHandler does not, by design, support multiple-week rollovers: the W mode is for a specific day of the week, and is documented as Weekday rather than Weeks (the other modes are documented as Seconds, Minutes, Hours, Days). I don't currently have time to consider such support, but I'll certainly look at a patch (with tests). -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13469 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12485] textwrap.wrap: new argument for more pleasing output
Changes by Éric Araujo mer...@netwok.org: -- stage: patch review - test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12485 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9957] SpooledTemporayFile.truncate should take size parameter
Antoine Pitrou pit...@free.fr added the comment: Looks ok to me as well. I think this is a new feature, so 3.3-only IMHO. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9957 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Re: [issue13471] setting access time beyond Jan. 2038 on remote share failes on Win7 x64
The timestamp is converted to time_t (32 bits) and then to FILE_TIME (64 bits). A function to convert directly a PyObject to FILE_TIME should be written. I thought that time_t was 64 bits on Windows ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13472] devguide doesn’t list all build dependencies
Ezio Melotti ezio.melo...@gmail.com added the comment: I agree with Antoine, there's no need to mention them in the quickstart. Moreover these dependencies are optional, so there's no need to install them unless they are specifically needed (on a related note I would also add an optional in the warning that says Python build finished, but the necessary bits to build these modules were not found -- I've seen enough people complaining that the build failed because this dependencies were missing). Explaining how to get them in the build page sounds fine to me. -- stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13472 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10507] Check well-formedness of reST markup within make patchcheck
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti versions: -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10507 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13465] A Jython section in the dev guide would be great
Ezio Melotti ezio.melo...@gmail.com added the comment: I'd search the Jython devguide at http://www.jython.org/devguide/, having it at http://docs.python.org/devguide/jython/ doesn't make much sense IMHO (especially if it is a full guide with several pages). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13465 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12170] index() and count() methods of bytes and bytearray should accept byte ints
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 736b0aec412b by Petri Lehtinen in branch 'default': Add a What's New entry for #12170 http://hg.python.org/cpython/rev/736b0aec412b -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12170 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13474] Mention of -m Flag Missing From Doc on Execution Model
New submission from Eric Snow ericsnowcurren...@gmail.com: The doc on code execution[1] leaves out mention of the -m flag. Seems like it belongs there too. [1] Doc/reference/executionmodel.rst -- assignee: docs@python components: Documentation messages: 148288 nosy: docs@python, eric.snow priority: normal severity: normal status: open title: Mention of -m Flag Missing From Doc on Execution Model versions: Python 2.7, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13474 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13474] Mention of -m Flag Missing From Doc on Execution Model
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13474 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13448] PEP 3155 implementation
sbt shibt...@gmail.com added the comment: Is it intended that pickle will use __qualname__? -- nosy: +sbt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13448 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9957] SpooledTemporayFile.truncate should take size parameter
Changes by Nick Coghlan ncogh...@gmail.com: -- versions: -Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9957 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis
Changes by Nick Coghlan ncogh...@gmail.com: Added file: http://bugs.python.org/file23773/9512712044a6.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11816 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11682] PEP 380 reference implementation for 3.3
Changes by Nick Coghlan ncogh...@gmail.com: Added file: http://bugs.python.org/file23774/0d1d76f68750.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11682 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13448] PEP 3155 implementation
Nick Coghlan ncogh...@gmail.com added the comment: Yes, but that can be a separate patch - step 1 is to make the attribute available, then relevant modules can subsequently be updated to use it as appropriate. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13448 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10131] deepcopying an xml.dom.minidom.Document generates an invalid XML document
Marian Ganisin marian.gani...@gmail.com added the comment: Code from msg146175 with attached patch applied: import sys print(sys.version_info) sys.version_info(major=2, minor=7, micro=2, releaselevel='final', serial=0) import copy, pickle from xml.dom.minidom import NodeList obj = NodeList() obj.append('a') obj2 = copy.deepcopy(obj) print(obj2) ['a'] obj2 = pickle.loads(pickle.dumps(obj)) print(obj2) ['a'] Result is same in both cases. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10131 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7652] Merge C version of decimal into py3k.
Changes by Cédric Krier cedric.kr...@b2ck.com: -- nosy: +ced ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7652 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7611] shlex not posix compliant when parsing foo#bar
Terry J. Reedy tjre...@udel.edu added the comment: The doc section has no reference, as in a live web link, to any version of the POSIX specification. This is unlike other doc sections that implement various RFCs (which also get updated). The docs also link to specific references for the Unicode version supported, which has changed from version to version. The OP quotes (without giving a link) from the 2008 version. POSIX and shlex are much older than that, implying that shlex might conform to an earlier version, just as other modules implement older RFCs that have been superceded. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7611 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11849] glibc allocator doesn't release all free()ed memory
Antoine Pitrou pit...@free.fr added the comment: For the record, this seems to make large allocations slower: - with patch: $ ./python -m timeit b'x'*20 1 loops, best of 3: 27.2 usec per loop - without patch: $ ./python -m timeit b'x'*20 10 loops, best of 3: 7.4 usec per loop Not sure we should care, though. It's still very fast. (noticed in http://mail.python.org/pipermail/python-dev/2011-November/114610.html ) -- nosy: +eli.bendersky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11849 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13448] PEP 3155 implementation
Antoine Pitrou pit...@free.fr added the comment: Is it intended that pickle will use __qualname__? That's part of the plan for PEP 3154, yes. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13448 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13475] Add '-p'/'--path0' command line option to override sys.path[0] initialisation
New submission from Nick Coghlan ncogh...@gmail.com: PEP 395 spends a lot of time discussing ways that the current automatic initialisation of sys.path[0] can go wrong, and even the proposed improvements in that PEP don't claim to fix the default behaviour for every possible scenario (just many of the most common ones). The unittest module gets around similar problems with test autodiscovery by providing an explicit -t (for 'toplevel') command line option. While '-t' is not available for the main interpreter executable (and nor is '-d' for directory), '-p' for path0 is a possibility. Directory execution (for example) would then be equivalent to: python -p dirname dirname/__main__.py A separate '--nopath0' option could also be provided to explicitly disable path initialisation based on the script being executed (see http://lists.debian.org/debian-python/2011/11/msg00058.html) -- messages: 148295 nosy: ncoghlan priority: normal severity: normal status: open title: Add '-p'/'--path0' command line option to override sys.path[0] initialisation ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13475 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10318] make altinstall installs many files with incorrect shebangs
Nick Coghlan ncogh...@gmail.com added the comment: I created #13475 to discuss the idea of a command line option to override sys.path[0] initialisation. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10318 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11849] glibc allocator doesn't release all free()ed memory
Antoine Pitrou pit...@free.fr added the comment: More surprising is that, even ignoring the allocation cost, other operations on the memory area seem more expensive: $ ./python -m timeit -s b=bytearray(50) b[:] = b - python 3.3: 1000 loops, best of 3: 367 usec per loop - python 3.2: 1 loops, best of 3: 185 usec per loop (note how this is just a dump memcpy) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11849 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1521950] shlex.split() does not tokenize like the shell
Dan Christian robo...@users.sourceforge.net added the comment: Of course, that's how it's used. That's all it can do right now. I was was splitting and combining commands (using ;, , and ||) and then running the resulting (mega) one liners over ssh. It still gets run by a shell, but I was specifying the control flow. 0 It's kind of like a makefile command block. You want to be able to specify if a failure aborts the sequence, or is ignored ( vs ;). Sometimes there are fallback commands (via ||). Of course, you can also group using (). Once things are split properly, then understanding the shell control characters is straight forward. I my mind, shlex.split() should either be as close to shell syntax as possible, or have a clear explanation of what is different (and why). I ended up doing my own parsing. I'm not actually at that company anymore, so I can't pull up the code. I'll see if I can come up with a reference case and maybe a unittest this weekend (that's really the only time I'll have to dig into it). -Dan On Thu, Nov 24, 2011 at 9:20 AM, Éric Araujo rep...@bugs.python.org wrote: Éric Araujo mer...@netwok.org added the comment: Thanks for the comments. There are really two cases in one bug. The first part is that the shell will split tokens at characters that shlex doesn't. The handling of , |, ;, , and could be done by adjusting the definition of shlex.wordchars. The shell may also understands things like: , ||, |, and . The exact definition of these depends on the shell, so maybe it's best to just split them out as separate tokens and let the user figure out the compound meanings. Yes. I think that the main use of shlex is really to parse a line into chunks with a way to embed spaces; it’s intended to parse a program command line (“prog --blah value stillthesamevalue arg samearg”), but not necessarily a full shell line (with and | and whatnot). When people have a line containing and |, then they need a shell to execute it, so they would not call shlex.split but just pass the full line to os.system or subprocess.Popen. Do you remember what use cases you had when you opened this report? The proper handling of quotes/escapes requires some kind of new interface. You need to distinguish between tokens that were modified by the quote/escape rules and those that were not. I don’t see why I would care about quotes in the result of shlex.split. See also #7611. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1521950 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1521950 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13476] Simple exclusion filter for unittest autodiscovery
New submission from Nick Coghlan ncogh...@gmail.com: unittest autodiscovery is very nice, but a '-x' option to specify directory patterns *not* to search could be a nice enhancement. (In my specific case, I want to run most of my tests, but one batch are Django tests and it would be nice to have an easy way to tell unittest to ignore them) -- components: Library (Lib) messages: 148299 nosy: michael.foord, ncoghlan priority: normal severity: normal stage: needs patch status: open title: Simple exclusion filter for unittest autodiscovery type: feature request versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13476 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13476] Simple exclusion filter for unittest autodiscovery
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13476 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13475] Add '-p'/'--path0' command line option to override sys.path[0] initialisation
Changes by Eric Snow ericsnowcurren...@gmail.com: -- nosy: +eric.snow ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13475 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13477] tarfile module should have a command line
New submission from Brandon Craig Rhodes bran...@rhodesmill.org: The tarfile module should have a simple command line that allows it to be executed with -m — even if its only ability was to take a filename and extract it to the current directory, it could be a lifesaver on Windows machines where Python has been installed but nothing else. Would such a patch be welcome if I could write one up? -- messages: 148300 nosy: brandon-rhodes priority: normal severity: normal status: open title: tarfile module should have a command line ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13477 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13477] tarfile module should have a command line
Ezio Melotti ezio.melo...@gmail.com added the comment: The feature request seems reasonable to me, but this can only go in 3.3. If you want to propose a patch, you might want to check the devguide and what other modules like zipfile do. -- nosy: +ezio.melotti, lars.gustaebel stage: - test needed type: - feature request versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13477 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11365] Integrate Buildroot patches (cross-compilation)
Changes by Ezio Melotti ezio.melo...@gmail.com: -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11365 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4966] Improving Lib Doc Sequence Types Section
Changes by Ezio Melotti ezio.melo...@gmail.com: -- versions: -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4966 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10811] sqlite segfault with generators
Ezio Melotti ezio.melo...@gmail.com added the comment: Can this be closed? -- nosy: +ezio.melotti status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10811 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12776] argparse: type conversion function should be called only once
Arnaud Fontaine ar...@debian.org added the comment: I have had a look at the issue more closely and my initial patch was not completely right as it didn't work properly with argparse_test.py despite all tests passing. Therefore, I have amended my patch to not check whether action.default was a basestring which didn't make sense at all, but check instead if action.default is None (action.default default value is None if not given to add_argument as far as I understand). I also added a test for the issue reported above as it was missing and ran patchcheck to make sure everything was fine. All the tests (include argparse_test.py) passes without problem. Could you please apply them? Many thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12776 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12776] argparse: type conversion function should be called only once
Changes by Arnaud Fontaine ar...@debian.org: Added file: http://bugs.python.org/file23775/py2.7-argparse-call-type-function-once-v3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12776 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12776] argparse: type conversion function should be called only once
Changes by Arnaud Fontaine ar...@debian.org: Added file: http://bugs.python.org/file23776/py3k-argparse-call-type-function-once-v3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12776 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12776] argparse: type conversion function should be called only once
Arnaud Fontaine ar...@debian.org added the comment: BTW, about argparse_test, the default should be either '0' or 0 but not '\t' AFAIK because even the default value is converted using the given type function. It fails even with the last 2.7 version but it works well with my patch... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12776 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13475] Add '-p'/'--path0' command line option to override sys.path[0] initialisation
Eric Snow ericsnowcurren...@gmail.com added the comment: +1 Both the -p and --nopath0 would be great additions and a good match for PEP 395. So -p . would be equivalent to the current implicit sys.path[0] initialization, right? Would any other effects happen with -p than sys.path[0] initialization? I'll follow up with my one concern (the implicit -p .) in a follow-up message. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13475 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1459867] Message.as_string should use mangle_from_=unixfrom?
kxroberto kxrobe...@users.sourceforge.net added the comment: I'd still say this is a plain bug, which simply should be fixed. People who have working code must have already a smart work around: either - or! : By doing the 5 low level code lines of .as_string() on their own. (there is no other way to produce clearly either a unixfrom=True or unixfrom=False Message). As of now this is simply neither nor. People are just quiet (I wonder), because the bug effect is rare. If somebody really wants to produce a unix mbox format for antiquated purposes, he would use unixfrom=True, when calling this function. (because otherwise its not complete unixfrom). And then the patched version is ok as well. But when you call with unixfrom=False (default), a partially unixfrom=True mangled MIME body comes out. This is just buggy ... Most striking is, that all lines in the message body (which the mail recipient reads), which start with the word From, are converted to From. This is not acceptable. a little bit more likely to preserve format of the message that was fed into it : Certainly mail message bodies must not be altered in a funny way when mangling is not ordered. I cannot imagine that sb can consciously or unconsciously rely on the bug. But in 99% of cases the patch would just fix peoples buggy programs. If this really cannot be fixed, then at least a extra function next to as_string should be added (e.g. as_unmangled_string()), which allows creation of legal unmangled message. The current function can so far only produce a managled message, but consistently only then if in addition it is called explicitely with unixfrom=True ;-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1459867 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com