[issue19038] Fix sort order in Misc/ACKS.

2013-09-16 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- status: open -> pending ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue19038] Fix sort order in Misc/ACKS.

2013-09-16 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever status: pending -> open ___ Python tracker ___ ___ Python-bugs-lis

[issue19038] Fix sort order in Misc/ACKS.

2013-09-16 Thread Georg Brandl
Georg Brandl added the comment: Please do not change the ordering of Å -- it is correct after Z, at least in Swedish, Danish and Norwegian. If you want to sort German umlauts correctly, in lists of names they are treated as [aou]+e, so "Löwis" goes before "Lowe". As for Aahz, he appears by th

[issue14984] netrc module allows read of non-secured .netrc file

2013-09-16 Thread Georg Brandl
Georg Brandl added the comment: I would welcome a "versionchanged" block in the docs addition. There seems to be a stray space in the string in the last line here: +try: +user = pwd.getpwuid(os.getuid())[0] +

[issue3173] external strftime for Python?

2013-09-16 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue10984] argparse add_mutually_exclusive_group should accept existing arguments to register conflicts

2013-09-16 Thread paul j3
paul j3 added the comment: Another situation in which this MultiGroupHelpFormatter helps is when one or more of the groups includes an optional positional. The regular formatter moves all the positionals to the end, after the optionals. This move could easily break up a mutually exclusive g

[issue16038] ftplib: unlimited readline() from connection

2013-09-16 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Succeeds on OS X 10.8 (although there are other failures) -- ___ Python tracker ___ ___ Python-bugs

[issue18050] embedded interpreter or virtualenv fails with "ImportError: cannot import name MAXREPEAT"

2013-09-16 Thread Ned Deily
Ned Deily added the comment: To answer your earlier question, there are other inter-version incompatibilities in some of the non-static standard library modules such that test_re cannot be run without errors. However, applying the patch at least allows the embedded interpreter to not crash du

[issue16038] ftplib: unlimited readline() from connection

2013-09-16 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Yep, confirmed that ftplib.patch causes test_ftplib to fail, at least on Ubuntu 10.04 chroot. -- ___ Python tracker ___ __

[issue18873] "Encoding" detected in non-comment lines

2013-09-16 Thread R. David Murray
R. David Murray added the comment: This appears to be resulting in buildbot lib2to3 test failures. ex: http://buildbot.python.org/all/builders/x86%20Ubuntu%20Shared%202.7/builds/2319/steps/test/logs/stdio http://buildbot.python.org/all/builders/PPC64%20PowerLinux%202.7/builds/206/steps/test/lo

[issue18050] embedded interpreter or virtualenv fails with "ImportError: cannot import name MAXREPEAT"

2013-09-16 Thread Ned Deily
Ned Deily added the comment: The patch LGTM. And I agree that the fix is not needed for 3.4. Thanks, Serhiy. I verified that it does solve the "embedded" problem (case 1 above) when using embedded versions of all previous releases of 2.7.x (except 2.7.0) and 3.3.x. For the record, it appears

[issue19036] setlocale fails due to locale.h being wrapped up in LANGINFO check.

2013-09-16 Thread Alan Hourihane
Alan Hourihane added the comment: Sure, Look in the function. check_force_ascii() You'll see a hunk of code that is ifdef'd for ... #if defined(HAVE_LANGINFO_H) && defined(CODESET) Then you'll see setlocale() is called outside of that check, just before another hunk of code is ifdef'd

[issue18874] Add a new tracemalloc module to trace memory allocations

2013-09-16 Thread STINNER Victor
STINNER Victor added the comment: TODO list: * remove dependency to psutil * enable PYMEM_RAW: fix subinterpreter issue, check which variables are protected by which lock * test the command line interface? * don't trace objects created by get_stats(), reentrant flag should be a thread-local va

[issue18961] Non-UTF8 encoding line

2013-09-16 Thread Martin v . Löwis
Martin v. Löwis added the comment: One issue at a time, please, and issue18960 is already its own issue. In any case, item "1" in "Concepts" of PEP 263 is clear that any deviation from the declared encoding should cause a decoding error. -- ___ Pyth

[issue18874] Add a new tracemalloc module to trace memory allocations

2013-09-16 Thread STINNER Victor
STINNER Victor added the comment: Include/tracemalloc.h: PyTraceMalloc_DisableTemporary() and PyTraceMalloc_RestoreTemporary() should be removed, they were tests to try to fix issues with subinterpreter when tracing PyMem_RawMalloc(). Lib/test/regrtest.py: These changes should not be commited,

[issue1615] descriptor protocol bug

2013-09-16 Thread Ethan Furman
Changes by Ethan Furman : -- nosy: +ethan.furman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue18874] Add a new tracemalloc module to trace memory allocations

2013-09-16 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file31517/tracemalloc.patch ___ Python tracker ___ ___ Python-bugs-list maili

[issue18874] Add a new tracemalloc module to trace memory allocations

2013-09-16 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file31805/5d8817cc9e69.patch ___ Python tracker ___ ___ Python-bugs-list mail

[issue18874] Add a new tracemalloc module to trace memory allocations

2013-09-16 Thread STINNER Victor
Changes by STINNER Victor : Added file: http://bugs.python.org/file31806/21f7c3df0f15.patch ___ Python tracker ___ ___ Python-bugs-list mailin

[issue18874] Add a new tracemalloc module to trace memory allocations

2013-09-16 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file31545/tracemalloc-2.patch ___ Python tracker ___ ___ Python-bugs-list mai

[issue18874] Add a new tracemalloc module to trace memory allocations

2013-09-16 Thread STINNER Victor
STINNER Victor added the comment: Updated patch. -- Added file: http://bugs.python.org/file31805/5d8817cc9e69.patch ___ Python tracker ___ ___

[issue19009] Enhance HTTPResponse.readline() performance

2013-09-16 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Ok, I'm adding a more comprehensive patch. It adds support for peek, readline, and read1 for both regular and chunked responses. readline falls back to IOBase.readline for chunked, which again makes use of peek() for performance. read1() is available fo

[issue19038] Fix sort order in Misc/ACKS.

2013-09-16 Thread Tae-Wong SEO
Tae-Wong SEO added the comment: Letter a-with-ring is used in Swedish, Danish, Norwegian, Finnish and several other languages. You have accentuated some contributor names (for example: Bozon, Donmez and Niksic). You want to make a diff file for this. -- ___

[issue18873] "Encoding" detected in non-comment lines

2013-09-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: One of the problem with encoding recognition is that the same logic is more-or-less reproduced multiple places, so any fix needs to be applied multiple places. From the detect_encoding_in_comments_only.patch: Lib/idlelib/IOBinding.py Lib/lib2to3/pgen2/tokenize.

[issue18873] "Encoding" detected in non-comment lines

2013-09-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > If there is not now, it would be nice if there were just one python-coded > function in Lib/tokenize.py that could be imported and used by the other > python code. Agree. But look how many tokenize issues are opened around. Thank you for your report Paul.

[issue18873] "Encoding" detected in non-comment lines

2013-09-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2dfe8262093c by Serhiy Storchaka in branch '3.3': Issue #18873: The tokenize module, IDLE, 2to3, and the findnocoding.py script http://hg.python.org/cpython/rev/2dfe8262093c New changeset 6b747ad4a99a by Serhiy Storchaka in branch 'default': Issue #

[issue19038] Fix sort order in Misc/ACKS.

2013-09-16 Thread Tae-Wong SEO
New submission from Tae-Wong SEO: This patch fixes sort order in file Misc/ACKS. -- assignee: docs@python components: Documentation files: ACKS messages: 197945 nosy: docs@python, taewong.seo priority: normal severity: normal status: open title: Fix sort order in Misc/ACKS. type: enhance

[issue19038] Fix sort order in Misc/ACKS.

2013-09-16 Thread Ezio Melotti
Ezio Melotti added the comment: The Å sorts correctly after the Z. Have you changed anything else other than that? (If you upload a diff file it's better) -- nosy: +ezio.melotti ___ Python tracker _

[issue19037] mailbox module modifies maildir file times after moving from tmp directory

2013-09-16 Thread janzert
Changes by janzert : -- keywords: +patch Added file: http://bugs.python.org/file31802/mailbox.patch ___ Python tracker ___ ___ Python-

[issue18960] First line can be executed twice

2013-09-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It also makes non-working a common idiom for running Python files on Windows. When add first line "@python -x", it will be interpreted by Python and will cause SyntaxError. -- ___ Python tracker

[issue17003] Unification of read() and readline() argument names

2013-09-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 46c1c2b34e2b by Serhiy Storchaka in branch 'default': Issue #17003: Unified the size argument names in the io module with common http://hg.python.org/cpython/rev/46c1c2b34e2b -- nosy: +python-dev ___ Pyth

[issue19036] setlocale fails due to locale.h being wrapped up in LANGINFO check.

2013-09-16 Thread STINNER Victor
STINNER Victor added the comment: It looks like a real issue, but on which platform did you get the error? > setlocale fails due to locale.h being wrapped up in LANGINFO check. What do you mean by "fail"? Is it an error at runtime? Or during the compilation? -- The include was added recently

[issue19036] setlocale fails due to locale.h being wrapped up in LANGINFO check.

2013-09-16 Thread STINNER Victor
STINNER Victor added the comment: Oh by the way, please attach the patch as a file to the issue. -- ___ Python tracker ___ ___ Python-

[issue19036] setlocale fails due to locale.h being wrapped up in LANGINFO check.

2013-09-16 Thread STINNER Victor
Changes by STINNER Victor : -- versions: +Python 3.2, Python 3.4 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue19036] setlocale fails due to locale.h being wrapped up in LANGINFO check.

2013-09-16 Thread STINNER Victor
STINNER Victor added the comment: > Yes, it's a "Build" issue as mentioned using the "Components" field. Again, what is your platform (OS name, OS version)? What is the compiler error message? -- ___ Python tracker

[issue19037] mailbox module modifies maildir file times after moving from tmp directory

2013-09-16 Thread R. David Murray
R. David Murray added the comment: Hopefully a 2.7 patch would also apply to 3.3, so yes, start there. For the test, I was thinking that in 3.3+ we could use mock to introduce a delay. But looking at the code again it isn't obvious that there is a meaningful way to do it that is worth the eff

[issue19036] setlocale fails due to locale.h being wrapped up in LANGINFO check.

2013-09-16 Thread Alan Hourihane
Alan Hourihane added the comment: You'll see the error on any platform that doesn't include "locale.h" when it should, i.e. a platform that doesn't have NL_LANGINFO. This is the build error. Python/fileutils.c: In function 'check_force_ascii': Python/fileutils.c:101:5: warning: implicit de

[issue19036] setlocale fails due to locale.h being wrapped up in LANGINFO check.

2013-09-16 Thread Alan Hourihane
Alan Hourihane added the comment: Yes, it's a "Build" issue as mentioned using the "Components" field. But cut & pasting from other files is incorrect in this case because setlocale() is still used outside of the #ifdef. File attached. -- keywords: +patch Added file: http://bugs.pytho

[issue19037] mailbox module modifies maildir file times after moving from tmp directory

2013-09-16 Thread janzert
janzert added the comment: I can certainly write a patch if wanted. It should be simply moving and modifying two lines in each of the two methods. My understanding is that it should be against 2.7 so it can be applied there first then merged forward? Unfortunately while I can consistently repr

[issue19036] setlocale fails due to locale.h being wrapped up in LANGINFO check.

2013-09-16 Thread R. David Murray
R. David Murray added the comment: So the real problem is that the setlocale call is outside the ifdef, which means Victor is the right person to look at this, since it was his patch that introduced the code in question. I'll remove MAL from nosy, since I only added him by accident.

[issue19036] setlocale fails due to locale.h being wrapped up in LANGINFO check.

2013-09-16 Thread R. David Murray
Changes by R. David Murray : -- nosy: -lemburg ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue19017] selectors: towards uniform EBADF handling

2013-09-16 Thread Charles-François Natali
Charles-François Natali added the comment: > Interesting issue. ISTM that closing the FD before unregistering it is a > programmer's mistake that shouldn't pass silently. And closing it in a > separate thread while the selector is active sounds like an even bigger bug. Agreed. > Could we re

[issue18996] unittest: more helpful truncating long strings

2013-09-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Indeed, I'll rename _common_shorten() to _common_shorten_repr() and call safe_repr() inside. As for two vs multiple args, first I wrote a variant with two args (you can see it in my first unlinked patch), but then I seen that general variant is not harder an

[issue14984] netrc module allows read of non-secured .netrc file

2013-09-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset e5c4eb6b8e05 by R David Murray in branch '2.6': #14984: On POSIX, enforce permissions when reading default .netrc. http://hg.python.org/cpython/rev/e5c4eb6b8e05 New changeset 2e19c65d6688 by R David Murray in branch '2.7': Merge #14984: On POSIX, en

[issue14984] netrc module allows read of non-secured .netrc file

2013-09-16 Thread R. David Murray
R. David Murray added the comment: Removing 2.6 and 2.7 from versions since it is now fixed there. I'll work on porting it to python3. -- versions: -Python 2.6, Python 2.7 ___ Python tracker

[issue19036] setlocale fails due to locale.h being wrapped up in LANGINFO check.

2013-09-16 Thread Alan Hourihane
Alan Hourihane added the comment: Oops, meant to say. In pythonrun.c the setlocale() call is already wrapped inside the #ifdef so the problem ISN'T bumped into there. -- ___ Python tracker __

[issue19037] mailbox module modifies maildir file times after moving from tmp directory

2013-09-16 Thread R. David Murray
R. David Murray added the comment: That sounds reasonable. Would you be interested in trying your hand at a patch, ideally with a test? -- components: +email nosy: +barry, r.david.murray ___ Python tracker __

[issue19035] tokenize.generate_tokens treat '\f' symbol as the end of file (when reading in unicode)

2013-09-16 Thread R. David Murray
R. David Murray added the comment: I suspect this isn't the only place where the change in what is considered a (unicode) line ending character between 2.6 and 2.7/python3 is an issue. As you observe, it causes very subtle bugs. I'm going to have to go trolling through the python3 email pack

[issue19017] selectors: towards uniform EBADF handling

2013-09-16 Thread Guido van Rossum
Guido van Rossum added the comment: > The problem is that for epoll (and kqueue I think) the FD is > automagically removed from the backend, which means that we won't get > any notification for this FD, hence we're unable to report it as > closed. That makes it sound like it will be hard to resp

[issue18961] Non-UTF8 encoding line

2013-09-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What about first line? Currently both Python interpreter and the tokenize module decode it from UTF-8 (actually due to bug #18960 Python interprets it twice, in different encodings). PEP 263 says: 1. The complete Python source file should use a single en

[issue19037] mailbox module modifies maildir file times after moving from tmp directory

2013-09-16 Thread janzert
New submission from janzert: The Maildir.add and Maildir.__setitem__ methods in the mailbox module attempts to change the file mtime after moving the file into the new directory. This allows a race condition since other programs are can move or otherwise modify the file as soon as it is placed

[issue18960] First line can be executed twice

2013-09-16 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue14984] netrc module allows read of non-secured .netrc file

2013-09-16 Thread R. David Murray
R. David Murray added the comment: The patch for 3.1 is very close to the 2.7 patch, and is attached. Benjamin and Georg, I'd like to apply this to 3.1 and merge it up through default. May I and can I? -- Added file: http://bugs.python.org/file31800/netrc-py3.1.patch

[issue19036] setlocale fails due to locale.h being wrapped up in LANGINFO check.

2013-09-16 Thread R. David Murray
R. David Murray added the comment: Can you provide more information about the circumstances in which this is a problem? Presumably there is a reason why the code is currently the way it is, especially since it is done this way in several of the source files, and has been that way for a *long*

[issue19036] setlocale fails due to locale.h being wrapped up in LANGINFO check.

2013-09-16 Thread R. David Murray
R. David Murray added the comment: Oops, didn't mean to assign this to anyone. -- assignee: lemburg -> nosy: +haypo ___ Python tracker ___ __

[issue16038] ftplib: unlimited readline() from connection

2013-09-16 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Looks legitimate to me. I will come up with a separate patch for later Python versions. -- ___ Python tracker ___ __

[issue18961] Non-UTF8 encoding line

2013-09-16 Thread Martin v . Löwis
Martin v. Löwis added the comment: Terry: the comment isn't self-contradictory. Instead, the file constitutes a perfectly fine iso-8859-15 byte sequence (albeit a meaningless one: any byte sequence is perfectly fine iso-8559-15, and, in a comment, any characters are allowed by the Python synta

[issue19017] selectors: towards uniform EBADF handling

2013-09-16 Thread Guido van Rossum
Guido van Rossum added the comment: Interesting issue. ISTM that closing the FD before unregistering it is a programmer's mistake that shouldn't pass silently. And closing it in a separate thread while the selector is active sounds like an even bigger bug. Could we report an new event type f

[issue18626] Make "python -m inspect " meaningful

2013-09-16 Thread Claudiu.Popa
Claudiu.Popa added the comment: Hello, here's a basic patch. Currently, the header info is printed by default, while the source can be retrieved by using --source (although I would prefer them to be switched, the source should be shown by default and the header info only when requested). It un

[issue17734] Failure when running test_builtin after test_genexps

2013-09-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes. test_genexps uses doctests, doctest uses pdb, pdb imports readline. -- nosy: +serhiy.storchaka resolution: -> duplicate status: open -> closed superseder: -> readline-related test_builtin failure ___ Python t

[issue19036] setlocale fails due to locale.h being wrapped up in LANGINFO check.

2013-09-16 Thread Alan Hourihane
New submission from Alan Hourihane: Patch --- Python/fileutils.c.old 2013-09-11 07:04:42.0 + +++ Python/fileutils.c 2013-09-11 07:05:01.0 + @@ -4,8 +4,8 @@ # include #endif -#ifdef HAVE_LANGINFO_H #include +#ifdef HAVE_LANGINFO_H #include #endif

[issue19016] autospecced namedtuples should be truthy by default

2013-09-16 Thread Shawn Krisman
Shawn Krisman added the comment: Yeah in my head I was thinking it would affect relatively few people who depended on the change, but it's definitely hard to prove that! How about a change that special cases namedtuple? -- ___ Python tracker

[issue18230] test_builtin fails/hangs when run after test_getopt

2013-09-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, it is related. test_getopt uses doctests, doctest uses pdb, pdb imports readline. -- nosy: +serhiy.storchaka resolution: -> duplicate status: open -> closed superseder: -> readline-related test_builtin failure _

[issue17226] libintl should also check for libiconv

2013-09-16 Thread Alan Hourihane
Alan Hourihane added the comment: This works for me... --- configure.ac.old2013-09-10 14:37:20.0 + +++ configure.ac2013-09-10 14:56:27.0 + @@ -2190,7 +2190,11 @@ AC_CHECK_LIB(intl, textdomain, [AC_DEFINE(WITH_LIBINTL, 1, [Define to 1 if libint

[issue18987] distutils.utils.get_platform() for 32-bit Python on a 64-bit machine

2013-09-16 Thread Sam Ferencik
Sam Ferencik added the comment: Thanks for the context. > A compatibility issue here is that the value provided by get_platform() is > also used outside of Distutils, in particular by pkg_resources (provided by > setuptools) and by pip, in both cases to help determine whether a binary > distribu

[issue14984] netrc module allows read of non-secured .netrc file

2013-09-16 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Sep 16, 2013, at 03:12 PM, R. David Murray wrote: >Well, I was planning to merge it, since 2.7 needs the fix as well. Oh yeah, that's fine of course. And thanks! -- ___ Python tracker

[issue14984] netrc module allows read of non-secured .netrc file

2013-09-16 Thread R. David Murray
R. David Murray added the comment: Well, I was planning to merge it, since 2.7 needs the fix as well. -- ___ Python tracker ___ ___ Py

[issue18948] deliberately crashing tests should prevent core dumps

2013-09-16 Thread Zachary Ware
Zachary Ware added the comment: Perhaps it would be best to either combine SuppressCoreFiles and suppress_crash_popup, or provide a new construct that does so since both are used in almost every place one is used. Also, test_daemon_threads_fatal_error in test_threading should be using suppres

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-09-16 Thread Nick Coghlan
Nick Coghlan added the comment: The current behaviour is broken for *any* descriptor which doesn't return itself when retrieved from the class. It just so happens that all the *other* descriptors in the standard library work that way, so it doesn't matter if you retrieve them directly from __dict

[issue18526] Add resource management/guarding to unittest

2013-09-16 Thread Zachary Ware
Zachary Ware added the comment: Having thought about this more, I think I agree that this is the wrong approach to the issue and that a more general ability to add command line options to unittest would be better. Closing this issue. -- resolution: -> rejected status: open -> closed

[issue18857] urlencode of a None value uses the string 'None'

2013-09-16 Thread Joshua Johnston
Joshua Johnston added the comment: I know that languages like php will treat ?josh= the same as ?josh Using the attached test form in Google Chrome, you will see the data passed as josh= when empty in both GET and POST requests. This is probably the way to go, key=str(value) if value is not No

[issue16129] No good way to set 'PYTHONIOENCODING' when embedding python.

2013-09-16 Thread Nick Coghlan
Nick Coghlan added the comment: The gory details of the current startup situation are in PEP 432. However, the comprehensive solution described in that PEP isn't going to make it into Python 3.4, so a simpler interim fix would be worthwhile. Since Blender is designed to support building agains

[issue1519638] Unmatched Group issue - workaround

2013-09-16 Thread irdb
Changes by irdb : -- nosy: +irdb ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mail

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-09-16 Thread Ethan Furman
Ethan Furman added the comment: Switching the order to try getattr first is going to make getting the doc from the descriptor problematic -- we have no way of knowing if the descriptor doc goes with the object we got back from getattr. Current patch adds VirtualAttribute to types, and reworks

[issue18704] IDLE: PEP8 Style Check Integration

2013-09-16 Thread R. Jayakrishnan
R. Jayakrishnan added the comment: I would prefer this issue concludes with a navigation to the new proposed enhancement. -- ___ Python tracker ___ _

[issue18857] urlencode of a None value uses the string 'None'

2013-09-16 Thread Claudiu.Popa
Claudiu.Popa added the comment: No problem, David, working on these patches is just an occasion for me to learn more and be useful at the same time. -- ___ Python tracker ___ __

[issue19035] tokenize.generate_tokens treat '\f' symbol as the end of file (when reading in unicode)

2013-09-16 Thread Alexey Umnov
New submission from Alexey Umnov: I execute the following code on the attached file 'text.txt': import tokenize import codecs with open('text.txt', 'r') as f: reader = codecs.getreader('utf-8')(f) tokens = tokenize.generate_tokens(reader.readline) The file 'text.txt' has the followin

[issue18985] Improve the documentation in fcntl module

2013-09-16 Thread Vajrasky Kok
Vajrasky Kok added the comment: Updated patch based on Ezio's review. I reverted back the changes to Nul and module documentation (since it is not so clear whether we should categorize flock as Unix routine or not). -- Added file: http://bugs.python.org/file31795/fix_documentation_on_

[issue18050] embedded interpreter or virtualenv fails with "ImportError: cannot import name MAXREPEAT"

2013-09-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Well. While the running different versions of binaries and Python files is not a good idea, perhaps we can apply this change. But only for 2.7 and 3.3. There is no need in this garbage in 3.4. I'm still not sure that there are no other inconsistencies betwee

[issue14984] netrc module allows read of non-secured .netrc file

2013-09-16 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: @RDM: Please commit to 2.6 and null merge to 2.7. Thanks! -- ___ Python tracker ___ ___ Python-bug

[issue19032] __reduce_ex__ on lock object

2013-09-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Wrong, because the object itself could be pickleable but refer to a > different object which is non-pickleable. I want to know whether the > object itself, without any object it refers to, is pickleable. I think you're being too picky. Unless you're manually a

[issue16129] No good way to set 'PYTHONIOENCODING' when embedding python.

2013-09-16 Thread Brecht Van Lommel
Brecht Van Lommel added the comment: With the language summit passed some time ago, is there now a more clear picture of how this would fit in the initialisation process? Any idea of what a proper implementation would look like, or is the message still to wait? -- nosy: +Brecht.Van.Lo

[issue19032] __reduce_ex__ on lock object

2013-09-16 Thread Ram Rachum
Ram Rachum added the comment: Wrong, because the object itself could be pickleable but refer to a different object which is non-pickleable. I want to know whether the object itself, without any object it refers to, is pickleable. Also, pickling an object could be very resource-intensive, depen

[issue19032] __reduce_ex__ on lock object

2013-09-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I use that to test whether an object is pickleable or not. It used to > work in Python 2. Well, the obvious way to do it would be to call pickle.dumps() on the object, IMO :-) -- ___ Python tracker

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-09-16 Thread Nick Coghlan
Nick Coghlan added the comment: On the class, since that's the case which is breaking here (instances are already OK, since they trigger the success path in the custom descriptors) -- title: inspect.getmembers and inspect.classify_class_attrs mishandle descriptors -> inspect.getmem

[issue18996] unittest: more helpful truncating long strings

2013-09-16 Thread Michael Foord
Michael Foord added the comment: Awesome, thanks for this work. The only thing I'd say is that if _common_shorten is always called with two args - and safe_repr is always called on them - then why not have it take two args and call safe_repr on them? --

[issue19016] autospecced namedtuples should be truthy by default

2013-09-16 Thread Michael Foord
Michael Foord added the comment: The problem is that the change you're proposing is backwards incompatible. Code using MagicMock and objects with length will break. -- assignee: -> michael.foord versions: +Python 3.4 -Python 3.5 ___ Python tracker

[issue11798] Test cases not garbage collected after run

2013-09-16 Thread Michael Foord
Michael Foord added the comment: If we're sure suite._cleanupis a *good* api for this then fine to expose it (and document) it as a public api. I'll take a look at it in a bit. Test suites will still have to do *some* monkeying around to set suite.cleanup (presumably in load_tests), so I'm no

[issue19032] __reduce_ex__ on lock object

2013-09-16 Thread Ram Rachum
Ram Rachum added the comment: I use that to test whether an object is pickleable or not. It used to work in Python 2. -- ___ Python tracker ___ _

[issue1065986] Fix pydoc crashing on unicode strings

2013-09-16 Thread Akira Kitada
Akira Kitada added the comment: Attaching a modified version of issue1065986.patch. The differences are: - Added _binstr(), which is str() that works with unicode objects. - Changed getdoc() to return encoded docstrings/comments - Used _binstr() to convert __version__, __date__, __author__ and

[issue18975] timeit: Use thousands separators and print number of loops per second

2013-09-16 Thread Jakub Stasiak
Jakub Stasiak added the comment: That's right, I was actually wondering about it few minutes before you pointed it out. Find new patch attached. -- Added file: http://bugs.python.org/file31792/timeit-v4-actual-changes.patch ___ Python tracker

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-09-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Right, we definitely want inspect to swallow the exceptions from > descriptors. My suggestion is merely to switch the order to be: > 1. Try getattr > 2. If that throws an exception, check __dict__ directly > 3. If neither works (e.g. due to a buggy __dir__ meth

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-09-16 Thread Nick Coghlan
Nick Coghlan added the comment: Right, we definitely want inspect to swallow the exceptions from descriptors. My suggestion is merely to switch the order to be: 1. Try getattr 2. If that throws an exception, check __dict__ directly 3. If neither works (e.g. due to a buggy __dir__ method), ignore

[issue19029] tix.py uses StringType

2013-09-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___

[issue18975] timeit: Use thousands separators and print number of loops per second

2013-09-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Inconsistency: "sec per loop" vs. "loops/s". -- ___ Python tracker ___ ___ Python-bugs-list mailin

[issue19034] More useful repr for Tcl_Obj

2013-09-16 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Currently the repr() for Tcl_Obj is not very useful. It exposes only Tcl type name and Tcl object address. >>> import tkinter.ttk >>> tv = tkinter.ttk.Treeview() >>> tv.tag_configure('test', foreground='blue') {} >>> str(tv.tag_configure('test', 'foreground

[issue19032] __reduce_ex__ on lock object

2013-09-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't really know. It simply looks like the default implementation of __reduce_ex__. Is it important? -- nosy: +pitrou ___ Python tracker ___

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-09-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: > However, it seems to me that the fix for issue 1785 is simply *wrong*: it > eliminated the exceptions at the expense of sometimes returning the *wrong > answer*. The underlying problem is that those functions are not very well-specified (actually, classify_

[issue18975] timeit: Use thousands separators and print number of loops per second

2013-09-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'm fine with the change too. Tim, what do you think? Speaking of which, some examples were really done with an old machine: $ python -m timeit 'try:' ' str.__bool__' 'except AttributeError:' ' pass' - 10 loops, best of 3: 15.7 usec per loop + 100

[issue19029] tix.py uses StringType

2013-09-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9eab3e745061 by Serhiy Storchaka in branch '3.3': Issue #19029: Change non-existing since 3.0 StringType to str. http://hg.python.org/cpython/rev/9eab3e745061 New changeset 95b3efe3d7b7 by Serhiy Storchaka in branch 'default': Issue #19029: Change n

  1   2   >