[issue22236] Do not use _default_root in Tkinter tests

2014-08-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 32fdaf401e50 by Serhiy Storchaka in branch '2.7': Issue #22236: Tkinter tests now don't reuse default root window. New root http://hg.python.org/cpython/rev/32fdaf401e50 New changeset dd1dffe6f0d2 by Serhiy Storchaka in branch '3.4': Issue #22236:

[issue22263] Add a resource for CLI tests

2014-08-24 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Some modules have command-line interface (not always documented and tested). Their tests run a lot of subprocesses and requires long time, often longer than other tests of corresponding module. However command-line interface itself is much less important

[issue22236] Do not use _default_root in Tkinter tests

2014-08-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thanks Terry and Zachary for your reviews. I have committed the patch in haste because other issues depend on it. -- assignee: - serhiy.storchaka resolution: - fixed stage: patch review - resolved status: open - closed

[issue22260] Rearrange tkinter tests, use test discovery

2014-08-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Currently Tkinter tests are splitted on four tests: test_tcl, test_tk, test_ttk_textonly, test_ttk_guionly. Ttk tests are separated because ttk is optional on Tk 8.4 and because ttk is separate large part of Tkinter. test_tcl and test_ttk_textonly are

[issue22258] Use FD_CLOEXEC in Python/fileutils.c

2014-08-24 Thread Igor Pashev
Igor Pashev added the comment: errno is 25 (#define ENOTTY 25 /* Inappropriate ioctl for device */) It does not make sense to me to call unworkable ioctl() each time before other methods :-) I would consider adding a configure check for working ioctl() (but it won't work for cross

[issue18814] Add tools for cleaning surrogate escaped strings

2014-08-24 Thread Ezio Melotti
Ezio Melotti added the comment: I think similar functions should be added in the unicodedata module rather than the string module or as str methods. If I'm not mistaken this was already proposed in another issue. In C we already added macros like IS_{HIGH|LOW|}_SURROGATE and possibly others

[issue18814] Add tools for cleaning surrogate escaped strings

2014-08-24 Thread Nick Coghlan
Nick Coghlan added the comment: The purpose of these changes it to provide tools specifically for working with surrogate escaped data, not for working with arbitrary lone Unicode surrogates. escaped_surrogates is not defined by the Unicode spec, it's defined by the behaviour of the

[issue22261] Document how to use Concurrent Build when using MsBuild

2014-08-24 Thread sbspider
sbspider added the comment: Ok, thank you. Just wanted to confirm this, as I plan to help out on the code/documentation as well (and hence want to understand the process beforehand). I look forward to working on Python in the future. -- ___ Python

[issue17180] shutil copy* unsafe on POSIX - they preserve setuid/setgit bits

2014-08-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue15795. It would be good to make shutil, zipfile and tarfile interfaces consistent. I think we need more graduated interface matching coretools. --preserve[=ATTR_LIST] preserve the specified attributes (default:

[issue20912] [zipfile.py]: Make zip directory attributes more friendly for MS-Windows

2014-08-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could shutil experts please comment this patch? -- nosy: +christian.heimes, hynek, tarek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20912 ___

[issue22257] PEP 432: Redesign the interpreter startup sequence

2014-08-24 Thread sbspider
Changes by sbspider rajsho...@gmail.com: -- nosy: +sbspider ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22257 ___ ___ Python-bugs-list mailing

[issue22194] access to cdecimal / libmpdec API

2014-08-24 Thread Stefan Krah
Stefan Krah added the comment: Antoine Pitrou rep...@bugs.python.org wrote: Who are those people? #16745 was opened by you :-) MvL, in #4555 (msg176486). Platform specific maybe, but no hack: I was thinking about storing the DSO handle in the PyModuleObject struct and add functions to

[issue18814] Add tools for cleaning surrogate escaped strings

2014-08-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I agree with Ezio in all points. escaped_surrogates is inefficient for any purposes and incomplete. _match_surrogates can be created in more efficient way. clean() has too general and misleading name. redecode() looks just ridiculous, this cumbersome

[issue22034] posixpath.join() and bytearray

2014-08-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset d9607a71456e by Serhiy Storchaka in branch '3.4': Issue #22034: Got rid of misleading error message for bytearray arguments in http://hg.python.org/cpython/rev/d9607a71456e New changeset db600c927b2b by Serhiy Storchaka in branch 'default': Issue

[issue22034] posixpath.join() and bytearray

2014-08-24 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22034 ___

[issue22207] Test for integer overflow on Py_ssize_t: explicitly cast to size_t

2014-08-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think there are too many changes. Here is simpler patch which get rid of all warnings in Objects/unicodeobject.c on my computer (gcc 4.6.3, 32-bit Linux). -- Added file: http://bugs.python.org/file36451/unicode_2.patch

[issue18814] Add tools for cleaning surrogate escaped strings

2014-08-24 Thread Nick Coghlan
Nick Coghlan added the comment: Guys, you're Python 3 unicode experts, already thoroughly familiar with how surrogateescape works. These features are not for you. The exact implementations don't matter. These need to exist, and they need to be documented with detailed explanations. People

[issue22133] IDLE: Set correct WM_CLASS on X11

2014-08-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Grepping idlelib for 'toplevel, there are about 10. Do all of the Toplevels get put on the activity bar? I would not expect that popups like calltip would. I don't know how dialogs and calltip popups behave on Gnome Shell. But I think we should do this

[issue18814] Add tools for cleaning surrogate escaped strings

2014-08-24 Thread Ezio Melotti
Ezio Melotti added the comment: That's why I think a function like redecode is a bad idea. With Python 2 I've seen lot of people blindingly trying .decode when .encode failed (and the other way around) whenever they were getting an UnicodeError (and the fact that decoding Unicode results in an

[issue17896] Move Windows external libs from src\..\ to src\externals

2014-08-24 Thread Mark Lawrence
Mark Lawrence added the comment: I see that this has also been raised on #22262. As nobody has objected can't we just get on with it? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17896

[issue22258] Use FD_CLOEXEC in Python/fileutils.c

2014-08-24 Thread STINNER Victor
STINNER Victor added the comment: I propose to only call ioctl() once, and then remember (in a static variable) that it doesn't work and then always call fcntl(). I can work on a patch. -- ___ Python tracker rep...@bugs.python.org

[issue22264] Add wsgiref.fix_encoding

2014-08-24 Thread Nick Coghlan
New submission from Nick Coghlan: The WSGI 1.1 standard mandates that binary data be decoded as latin-1 text: http://www.python.org/dev/peps/pep-/#unicode-issues This means that many WSGI headers will in fact contain *improperly encoded data*. Developers working directly with WSGI (rather

[issue22264] Add wsgiref.util.fix_encoding

2014-08-24 Thread Nick Coghlan
Nick Coghlan added the comment: This would be a better fit for the util submodule rather than the top level package. -- title: Add wsgiref.fix_encoding - Add wsgiref.util.fix_encoding ___ Python tracker rep...@bugs.python.org

[issue22264] Add wsgiref.util.fix_decoding

2014-08-24 Thread Nick Coghlan
Nick Coghlan added the comment: Last tweak, since the purpose is to fix the original incorrect decoding to latin-1, this should be defined as a decoding operation: def fix_decoding(data, encoding, errors=surrogateescape): return data.encode(latin-1).decode(encoding, errors)

[issue18814] Add tools for cleaning surrogate escaped strings

2014-08-24 Thread Nick Coghlan
Nick Coghlan added the comment: The redecode thing is a distraction from my core concern here, so I've split that out to issue #22264, a separate RFE for a wsgiref.fix_encoding function. For this issue, my main concern is the function to *clean* a string of escaped binary data, so it can be

[issue18814] Add tools for cleaning surrogate escaped strings

2014-08-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What problem is purposed to solve clean_surrogate_escapes()? Could you please provide user scenario or two? Possible alternative implementation is: def clean_surrogate_escapes(s): return s.encode('utf-8', 'surrogatepass').decode('utf-8', 'replace') It

[issue22264] Add wsgiref.util.fix_decoding

2014-08-24 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Library (Lib), Unicode nosy: +benjamin.peterson, ezio.melotti, haypo, lemburg, pitrou, serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22264

[issue22264] Add wsgiref.util.fix_decoding

2014-08-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you please provide an example how this helper will improve stdlib or user code? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22264 ___

[issue22264] Add wsgiref.util.fix_decoding

2014-08-24 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +pje ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22264 ___ ___ Python-bugs-list

[issue22259] fdopen of directory causes segmentation fault

2014-08-24 Thread Brian Kearns
Brian Kearns added the comment: Updated to use assertEqual -- Added file: http://bugs.python.org/file36452/fdopen-directory.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22259 ___

[issue22259] fdopen of directory causes segmentation fault

2014-08-24 Thread Brian Kearns
Changes by Brian Kearns bdkea...@gmail.com: Removed file: http://bugs.python.org/file36450/fdopen-directory.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22259 ___

[issue22194] access to cdecimal / libmpdec API

2014-08-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le 24/08/2014 04:56, Stefan Krah a écrit : I'm not sure about OS X, but I would be surprised if it did not work. To my limited knowledge, Capsules are slow, see also here (the penultimate paragraph): They are slow if you have to lookup and unwrap a capsule

[issue18814] Add tools for cleaning surrogate escaped strings

2014-08-24 Thread Nick Coghlan
Nick Coghlan added the comment: My main use case is for passing data to other applications that *don't* have their Unicode handling in order - I want to be able to use Python to do the data scrubbing, but at the moment it requires intimate knowledge of the codec error handling system to do

[issue16808] inspect.stack() should return list of named tuples

2014-08-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: It seems like this patch had been overlooked. I refreshed it for 3.5, added a couple tests, and pushed it. Thank you, Daniel! -- assignee: meador.inge - nosy: +pitrou resolution: - fixed stage: commit review - resolved status: open - closed

[issue16808] inspect.stack() should return list of named tuples

2014-08-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset d03730abd2f6 by Antoine Pitrou in branch 'default': Issue #16808: inspect.stack() now returns a named tuple instead of a tuple. http://hg.python.org/cpython/rev/d03730abd2f6 -- nosy: +python-dev ___

[issue22194] access to cdecimal / libmpdec API

2014-08-24 Thread Stefan Krah
Stefan Krah added the comment: Ah yes, the array of function pointers is directly accessible. I did not look close enough -- reading the word spam 100x in the docs always makes me skim the text. ;) -- ___ Python tracker rep...@bugs.python.org

[issue22194] access to cdecimal / libmpdec API

2014-08-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: MvL, in #4555 (msg176486). Ok, I'm cc'ing Martin then :-) Note RTLD_LOCAL seems to be the default with dlopen(). Now I don't know how that behaves when you have a chained library loading, e.g.: Apache -- dlopen(Python dll) -- dlopen(_decimal dll) _decimal

[issue22194] access to cdecimal / libmpdec API

2014-08-24 Thread Stefan Krah
Stefan Krah added the comment: Antoine Pitrou rep...@bugs.python.org wrote: (which means that, perhaps, the answer is to make the mpd_ prefix configurable with a #define?) I don't know 100% what you have in mind, but Debian and Arch already ship --with-system-libmpdec, so only the mpd_*

[issue22194] access to cdecimal / libmpdec API

2014-08-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le 24/08/2014 11:11, Stefan Krah a écrit : Antoine Pitrou rep...@bugs.python.org wrote: (which means that, perhaps, the answer is to make the mpd_ prefix configurable with a #define?) I don't know 100% what you have in mind, but Debian and Arch already

[issue22264] Add wsgiref.util.fix_decoding

2014-08-24 Thread Nick Coghlan
Nick Coghlan added the comment: Current cryptic incantation that requires deep knowledge of the encoding system to follow: data = data.encode(latin-1).decode(utf-8, surrogateescape) Replacement that is not only more self-documenting, but also gives you something specific to look up in

[issue22259] fdopen of directory causes segmentation fault

2014-08-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6e67a0394957 by Benjamin Peterson in branch '2.7': don't segfault when trying to fdopen() a fd for a dir (closes #22259) http://hg.python.org/cpython/rev/6e67a0394957 -- nosy: +python-dev resolution: - fixed stage: patch review - resolved

[issue22240] argparse support for python -m module in help

2014-08-24 Thread Miki Tebeka
Miki Tebeka added the comment: New patch with handling of zip files. -- Added file: http://bugs.python.org/file36453/prog2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22240 ___

[issue22234] urllib.parse.urlparse accepts any falsy value as an url

2014-08-24 Thread Antti Haapala
Antti Haapala added the comment: On Python 2.7 urlparse.urlparse, parsing None, () or 0 will throw AttributeError because these classes do not have any 'find' method. [] has the find method, but will fail with TypeError, because the built-in caching requires that the input be hashable.

[issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly

2014-08-24 Thread Dan O'Reilly
Dan O'Reilly added the comment: So, concurrent.futures is fixed now. Unless someone wants to patch multiprocessing.Pool, I am closing this issue. I realize I'm 3 years late on this, but I've put together a patch for multiprocessing.Pool. Should a process in a Pool unexpectedly exit

[issue22240] argparse support for python -m module in help

2014-08-24 Thread paul j3
paul j3 added the comment: The patch tests assume the test is being run in a particular way: python -m unittest ... But I often use python3 -m unittest ... or python3 test_argparse.py both of which fail these tests. Testing this change might be more difficult than implementing

[issue22265] fix reliance on refcounting in test_itertools

2014-08-24 Thread Brian Kearns
New submission from Brian Kearns: The test fails on Python implementations with non-refcounted GCs without this line. -- files: test_itertools.patch keywords: patch messages: 225835 nosy: bdkearns priority: normal severity: normal status: open title: fix reliance on refcounting in

[issue22266] fix reliance on refcounting in tarfile.gzopen

2014-08-24 Thread Brian Kearns
New submission from Brian Kearns: tarfile.gzopen relies on refcounting to close the fileobj when the fileobj is created during the call to gzopen (when it is not passed in). Since the fileobj is created outside of GzipFile, GzipFile does not take responsibility for closing the fileobj (so no

[issue22265] fix reliance on refcounting in test_itertools

2014-08-24 Thread Brian Kearns
Brian Kearns added the comment: Should go on py3k branches too... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22265 ___ ___ Python-bugs-list

[issue22265] fix reliance on refcounting in test_itertools

2014-08-24 Thread Alex Gaynor
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22265 ___ ___ Python-bugs-list mailing

[issue22266] fix reliance on refcounting in tarfile.gzopen

2014-08-24 Thread Alex Gaynor
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22266 ___ ___ Python-bugs-list mailing

[issue22265] fix reliance on refcounting in test_itertools

2014-08-24 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22265 ___ ___

[issue22240] argparse support for python -m module in help

2014-08-24 Thread paul j3
paul j3 added the comment: What if the package is run without `-m`? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22240 ___ ___

[issue22267] fix reliance on refcounting in test_weakref

2014-08-24 Thread Brian Kearns
New submission from Brian Kearns: The test fails on Python implementations with non-refcounted GCs without these lines. Should go on py3k branches also. -- files: test_weakref.patch keywords: patch messages: 225839 nosy: bdkearns priority: normal severity: normal status: open title:

[issue22267] fix reliance on refcounting in test_weakref

2014-08-24 Thread Alex Gaynor
Alex Gaynor added the comment: Perhaps these should use the gc_collect function in test_support? -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22267 ___

[issue22267] fix reliance on refcounting in test_weakref

2014-08-24 Thread Brian Kearns
Brian Kearns added the comment: Possibly. But if so then one would argue there are plenty of other instances where gc_collect should be used, both within test_weakref and the rest of the test suite. Chose gc.collect here as it was used all over test_weakref.py, gc_collect never being used,

[issue22268] mrohasattr and mrogetattr

2014-08-24 Thread Gregory Salvan
New submission from Gregory Salvan: It's a small refactoring. Lurking at collections.abc I found a lot of: any(attr in B.__dict__ for B in C.__mro__) also repeated in typing.py of mypy: https://github.com/JukkaL/mypy/blob/master/lib-typing/3.2/typing.py#L117 It seems to be a common

[issue22269] Resolve distutils option conflicts with priorities

2014-08-24 Thread Min RK
New submission from Min RK: Background: Some Python distros (OS X, Debian, Homebrew, others) want the default installation prefix for packages to differ from sys.prefix. OS X and Debian accomplish this by patching distutils itself, with special cases like `if sys.prefix ==

[issue21480] A build now requires...

2014-08-24 Thread paul j3
paul j3 added the comment: I ran into a (possibly) related compiling problem (for 'default', 3.5 branch) in `asdl.py`: class Module(AST): def __init__(self, name, dfns): ... self.types = {type.name: type.value for type in dfns} The dictionary comprehension

[issue22267] fix reliance on refcounting in test_weakref

2014-08-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset b63b8c5628da by Benjamin Peterson in branch '2.7': fix some test_weakref tests to not rely on ref-counting (closes #22267) http://hg.python.org/cpython/rev/b63b8c5628da New changeset b1c82ef96862 by Benjamin Peterson in branch '3.4': fix some

[issue22265] fix reliance on refcounting in test_itertools

2014-08-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset a91f8766f755 by Benjamin Peterson in branch '2.7': allow test to work on implementations not using ref-counting (closes #22265) http://hg.python.org/cpython/rev/a91f8766f755 New changeset e6bb59b6b85c by Benjamin Peterson in branch '3.4': allow

[issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly

2014-08-24 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +sbt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9205 ___ ___ Python-bugs-list mailing list

[issue22270] cache version selection for documentation

2014-08-24 Thread Jonas Jelten
New submission from Jonas Jelten: The Python version selection for the documentation should be cached. It's very annoying having to select the preferred version each time one follows a link, e.g. search result, irc post, etc. I'd like to see caching the preferred version in a cookie and

[issue22266] fix reliance on refcounting in tarfile.gzopen

2014-08-24 Thread Benjamin Peterson
Benjamin Peterson added the comment: I think technically this changes semantics, since the construction of the GzipFile is no longer in the main try-except. You should probably backport the full 3.x behavior. -- nosy: +benjamin.peterson ___ Python

[issue22270] cache version selection for documentation

2014-08-24 Thread Benjamin Peterson
Benjamin Peterson added the comment: I don't think that makes much sense. People often link to a particular version of the documentation and making the version sticky to a particular user could be confusing. -- nosy: +benjamin.peterson ___ Python

[issue22270] cache version selection for documentation

2014-08-24 Thread Jonas Jelten
Jonas Jelten added the comment: it should rather be a opt-in feature. and when the redirection triggered, one should be able do click (you know it from wikipedia) back to page where one was redireced from. -- ___ Python tracker

[issue22270] cache version selection for documentation

2014-08-24 Thread Benjamin Peterson
Benjamin Peterson added the comment: On Sun, Aug 24, 2014, at 16:39, Jonas Jelten wrote: Jonas Jelten added the comment: it should rather be a opt-in feature. and when the redirection triggered, one should be able do click (you know it from wikipedia) back to page where one was redireced

[issue22264] Add wsgiref.util.fix_decoding

2014-08-24 Thread Graham Dumpleton
Graham Dumpleton added the comment: Is actually WSGI 1.0.1 and not 1.1. :-) -- nosy: +grahamd ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22264 ___

[issue22264] Add wsgiref.util.fix_decoding

2014-08-24 Thread STINNER Victor
STINNER Victor added the comment: I don't like fix in the name fix_encoding. It is negative. Why not decode or decode_wsgi? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22264 ___

[issue22264] Add wsgiref.util.fix_decoding

2014-08-24 Thread Graham Dumpleton
Graham Dumpleton added the comment: From memory, the term sometimes used on the WEB-SIG when discussed was transcode. I find the idea that it needs 'fixing' or is 'incorrect', as in 'fix the original incorrect decoding to latin-1' is a bit misleading as well. It was the only practical way of

[issue22258] set_inheritable(): ioctl(FIOCLEX) is available but fails with ENOTTY on Illumos

2014-08-24 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- title: Use FD_CLOEXEC in Python/fileutils.c - set_inheritable(): ioctl(FIOCLEX) is available but fails with ENOTTY on Illumos ___ Python tracker rep...@bugs.python.org

[issue22258] set_inheritable(): ioctl(FIOCLEX) is available but fails with ENOTTY on Illumos

2014-08-24 Thread STINNER Victor
STINNER Victor added the comment: @Igor: Here is a patch. Can you please apply it and run ./python -m test -v test_os on your OS? I tried it manually on Linux by forcing the errno to ENOTTY. -- Added file: http://bugs.python.org/file36460/ioctl_works.patch

[issue22264] Add wsgiref.util.fix_decoding

2014-08-24 Thread STINNER Victor
STINNER Victor added the comment: I don't think that applications are prepared to handle surrogate characters, so I'm not sure that the default encoding should be surrogateescape. In my experience, text is later encoded to UTF-8 (or latin1 or ascii) and you then you an error from the encoder.

[issue22264] Add wsgiref.util.fix_decoding

2014-08-24 Thread STINNER Victor
STINNER Victor added the comment: Oh, I forgot to mention that I'm not convinced that we should add such function to the Python stdlib. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22264

[issue18814] Add tools for cleaning surrogate escaped strings

2014-08-24 Thread STINNER Victor
STINNER Victor added the comment: Your clean() function looses information. If a filename contains almost only undecodable characters, it will looks like .txt. It's not very useful. I would prefer to escape the byte. Mac OS X (HFS+ filesystem) uses for example %HH format: \udc80 would be

[issue22207] Test for integer overflow on Py_ssize_t: explicitly cast to size_t

2014-08-24 Thread STINNER Victor
STINNER Victor added the comment: I think there are too many changes. Here is simpler patch which get rid of all warnings in Objects/unicodeobject.c on my computer (gcc 4.6.3, 32-bit Linux). The purpose of my patch is not to make the compiler quiet, but to ensure that negative lengths are

[issue22271] Deprecate PyUnicode_AsUnicode(): emit a DeprecationWarning

2014-08-24 Thread STINNER Victor
New submission from STINNER Victor: With the PEP 393 implemented in Python 3.3, PyUnicode_AsUnicode() and all similar functions have to convert the compact string to a heavy wchar_t* string (UCS-4 on Linux: 4 bytes per character, UTF-16 on Windows: 2 or 4 bytes per character) which is stored

[issue22117] Rewrite pytime.h to work on nanoseconds

2014-08-24 Thread STINNER Victor
STINNER Victor added the comment: Instead of a complex structure, we can use a 64-bit signed integer to store a number of nanoseconds. For a UNIX epoch, nanoseconds since January 1st 1970, the min/max are: 1677-09-21 00:12:43.145224 2262-04-11 23:47:16.854776 The Linux kernel is going to use

[issue22240] argparse support for python -m module in help

2014-08-24 Thread Miki Tebeka
Miki Tebeka added the comment: How can you run a package without -m? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22240 ___ ___

[issue22240] argparse support for python -m module in help

2014-08-24 Thread Miki Tebeka
Miki Tebeka added the comment: Made the test more robust by using sys.executable in the comparison. -- Added file: http://bugs.python.org/file36461/prog3.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22240

[issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly

2014-08-24 Thread Brian Curtin
Changes by Brian Curtin br...@python.org: -- nosy: -brian.curtin ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9205 ___ ___ Python-bugs-list

[issue22266] fix reliance on refcounting in tarfile.gzopen

2014-08-24 Thread Brian Kearns
Changes by Brian Kearns bdkea...@gmail.com: Removed file: http://bugs.python.org/file36456/tarfile.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22266 ___

[issue22266] fix reliance on refcounting in tarfile.gzopen

2014-08-24 Thread Brian Kearns
Brian Kearns added the comment: Yes, I guess that makes sense (though this behavior is undocumented and untested...) -- Added file: http://bugs.python.org/file36462/tarfile.patch ___ Python tracker rep...@bugs.python.org

[issue22240] argparse support for python -m module in help

2014-08-24 Thread paul j3
paul j3 added the comment: Package might be the wrong term. How about a directory with a `__main__.py` file, and no local imports (relative or not)? In my tests it runs with and without the -m. -- ___ Python tracker rep...@bugs.python.org

[issue22260] Rearrange tkinter tests, use test discovery

2014-08-24 Thread Zachary Ware
Zachary Ware added the comment: Here's a new version of the patch, post-#22236. Serhiy, since you want this in 2.7 and 3.4, this version doesn't move any files around (except Lib/test/test_tcl.py), which should make backporting easier. I like this patch much better than the original, it's a