[issue12736] Request for python casemapping functions to use full not simple casemaps per Unicode's recommendation

2011-08-27 Thread Tom Christiansen
Tom Christiansen added the comment: Guido van Rossum wrote on Fri, 26 Aug 2011 21:11:24 -: > Would this also affect .islower() and friends? SHORT VERSION: (7 lines) I don't believe so, but the relationship between lower() and islower() is not as clear to me as I wo

[issue12736] Request for python casemapping functions to use full not simple casemaps per Unicode's recommendation

2011-08-27 Thread Tom Christiansen
Tom Christiansen added the comment: Guido van Rossum wrote on Sat, 27 Aug 2011 16:15:33 -: > Although personally I don't have much of an intuition for what > titlecase means (and why it's important), perhaps because I'm not > familiar with any language where t

[issue12736] Request for python casemapping functions to use full not simple casemaps per Unicode's recommendation

2011-08-28 Thread Tom Christiansen
Tom Christiansen added the comment: Antoine Pitrou wrote on Sat, 27 Aug 2011 20:04:56 -: >> Neither am I. Even in "old-style" English with ae and oe, one wrote >> ÆGYPT and ÆSIR all caps but Ægypt and Æsir in titlecase, not *Aegypt or >> *Aesir. Simi

[issue12736] Request for python casemapping functions to use full not simple casemaps per Unicode's recommendation

2011-08-29 Thread Tom Christiansen
Tom Christiansen added the comment: Antoine Pitrou wrote on Mon, 29 Aug 2011 13:21:06 -: > It's not only "typographically speaking", it's really a spelling error, > even in hand-written text :-) Sure, and so too is omitting an accent mark or diaeresi

[issue12729] Python lib re cannot handle Unicode properly due to narrow/wide bug

2011-09-07 Thread Tom Christiansen
Tom Christiansen added the comment: Ezio Melotti wrote on Sat, 03 Sep 2011 00:28:03 -: > Ezio Melotti added the comment: > Or they are still called UTF-8 but used in combination with different error > handlers, like surrogateescape and surrogatepass. The "plain

[issue9652] Tidy argparse default output

2010-08-20 Thread Tom Browder
New submission from Tom Browder : I would like to be able to change argparse default strings so the first word is capitalized. In lieu of that, I propose the attached patch to 2.7 which changes them in the source code. -- components: Library (Lib) files: python-v2.7-argparser

[issue9653] New default argparse output to be added

2010-08-20 Thread Tom Browder
New submission from Tom Browder : When I use the argparse module, and I enter my program name with NO arguments or options, I would like the argparser to output something like: Usage: [options] Use option '-h' for help. I haven't yet found how to do that in the argparse mod

[issue9653] New default argparse output to be added

2010-08-22 Thread Tom Browder
Tom Browder added the comment: On Sun, Aug 22, 2010 at 16:01, Steven Bethard wrote: > > Steven Bethard added the comment: > > A simpler approach might be to do this before your call to parse_args: > > if len(sys.argv[0]) == 1: >    parser.print_help() > > Does t

[issue9653] New default argparse output to be added

2010-08-23 Thread Tom Browder
Tom Browder added the comment: On Sun, Aug 22, 2010 at 17:06, Steven Bethard wrote: ... > import argparse > import sys > > parser = argparse.ArgumentParser() > parser.add_argument('--foo') > > if len(sys.argv) == 1: >    parser.print_help() > else: >

[issue9653] New default argparse output to be added

2010-08-24 Thread Tom Browder
Tom Browder added the comment: ... > I see. When there are no arguments you basically want to replace the standard > argparse help entirely with your own > message, with your own capitalization, > etc. > What you're doing now looks like a pretty good approach for this, so

[issue9652] Tidy argparse default output

2010-08-27 Thread Tom Browder
Tom Browder added the comment: ... > Should this be closed in favor of #9694? (Or vice versa?). Perhaps one of the > issues should be renamed something like "Improve argparse message > customization". That sounds like a winner to me -Tom -- title: Enhance a

[issue9879] Tracker Won't Accept New Bugs

2010-09-16 Thread Tom Browder
New submission from Tom Browder : When I attempt to enter a new bug I get: An error has occurred A problem was encountered processing your request. The tracker maintainers have been notified of the problem. -- components: Demos and Tools messages: 116620 nosy: Tom.Browder priority

[issue9879] Tracker Won't Accept New Bugs

2010-09-16 Thread Tom Browder
Tom Browder added the comment: Since this worked, I tried again to enter the bug with a new process. I have tried changing several selections but I still get the error--very strange! -- ___ Python tracker <http://bugs.python.org/issue9

[issue9880] Python 2.7 Won't Build: SystemError: unknown opcode

2010-09-16 Thread Tom Browder
New submission from Tom Browder : I am trying to rebuild the 2.7 maintenance branch and get this error on Ubuntu 10.04.1 LTS: XXX lineno: 743, opcode: 0 Traceback (most recent call last): File "/usr/local/src/python-2.7-maint-svn/Lib/site.py", line 62, in import os File "

[issue9880] Python 2.7 Won't Build: SystemError: unknown opcode

2010-09-16 Thread Tom Browder
Changes by Tom Browder : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue9880> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue9879] Tracker Won't Accept New Bugs

2010-09-16 Thread Tom Browder
Tom Browder added the comment: It looks like the problem was because I was trying to add a complete e-mail address to the "nosy" list. -- ___ Python tracker <http://bugs.python.

[issue9880] Python 2.7 Won't Build: SystemError: unknown opcode

2010-09-16 Thread Tom Browder
Tom Browder added the comment: File attached as requested. -- Added file: http://bugs.python.org/file18905/os.pyc ___ Python tracker <http://bugs.python.org/issue9

[issue9880] Python 2.7 Won't Build: SystemError: unknown opcode

2010-09-17 Thread Tom Browder
Tom Browder added the comment: I'm using gcc-4.5.1. I'll try an older version: gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3. -- ___ Python tracker <http://bugs.python.

[issue9880] Python 2.7 Won't Build: SystemError: unknown opcode

2010-09-17 Thread Tom Browder
Tom Browder added the comment: The build succeeded with the older version of gcc. I either have a mis-compiled gcc-4.5.1 (but the same version on another host worked okay) or gcc has a very subtle bug. I think this issue can be considered closed; however, it may be worth a note in a FAQ or

[issue9880] Python 2.7 Won't Build: SystemError: unknown opcode

2010-09-17 Thread Tom Browder
Tom Browder added the comment: Correction on the bad gcc compiler: the actual version was a non-released version off the gcc-4.6 branch: gcc version 4.6.0 20100908 (experimental) (GCC). I'm filing a bug with gcc. Sorry for the wasted

[issue9880] Python 2.7 Won't Build: SystemError: unknown opcode

2010-09-17 Thread Tom Browder
Tom Browder added the comment: Here is a link to the thread I started on the gcc-help mailing list concerning the issue: http://gcc.gnu.org/ml/gcc-help/2010-09/msg00170.html If I don't get a successful build with the current gcc trunk, I imagine this thread will transfer to the gcc

[issue1708652] Exact matching

2010-09-17 Thread Tom Lynn
Tom Lynn added the comment: I don't know whether it should stand, I'm somewhere around 0 on it myself. So I guess that means it shouldn't, since it's easier to add features than remove them. The problem is that once you're aware of the need for it you need it less.

[issue1708652] Exact matching

2010-09-18 Thread Tom Lynn
Tom Lynn added the comment: I'm still unsure. I think this confusion does cause bugs in real-world code. Perhaps more prominence for \A and \Z in the docs? There's already a section comparing regexps starting '^' with match under "Matching vs Searching".

[issue1708652] Exact matching

2010-09-18 Thread Tom Lynn
Tom Lynn added the comment: Actually, looking at the second part of the docs for $ (on "foo.$") makes me think the main motivating case here may be a bug in re.match:: >>> re.match('foo$', 'foo\n\n') >>> re.match('foo$', 

[issue1708652] Exact matching

2010-09-18 Thread Tom Lynn
Tom Lynn added the comment: Oh dear, I'm wrong on two fronts (I wish Roundup had post editing). a) foo$ doesn't match the 'foo' part of 'foo\nbar' as I stated above, but does match the 'foo' part of 'foo\n'. b) Obviously shortening an inpu

[issue1708652] Exact matching

2010-09-18 Thread Tom Lynn
Tom Lynn added the comment: (Sorry to comment on a closed issue, it was closed as I was writing this.) It's not that I'm not convinced of the need, just not of the solution. I still think that there are problems here: a) forgetting any \Z or $ terminator to .match() is easy, b) $

[issue9880] Python 2.7 Won't Build: SystemError: unknown opcode

2010-09-19 Thread Tom Browder
Tom Browder added the comment: I'm getting no interest from the gcc group at the moment. I would like to help track down the bug and will nose around the Python source to zero in on where the problem is for detailed debugging. Can anyone point me to the key files that concern the

[issue10016] shutil.copyfile -- allow sparse copying

2010-10-02 Thread Tom Potts
New submission from Tom Potts : Copying a sparse file under Linux using shutil.copyfile will not result in a sparse file at the end of the process. I'm submitting a patch that will remedy this. Note that I am only concerned with Linux at the moment -- as far as I know this patch wil

[issue10016] shutil.copyfile -- allow sparse copying

2010-10-02 Thread Tom Potts
Tom Potts added the comment: (see opening message) -- Added file: http://bugs.python.org/file19108/shutil-2.7.patch ___ Python tracker <http://bugs.python.org/issue10

[issue10016] shutil.copyfile -- allow sparse copying

2010-10-02 Thread Tom Potts
Changes by Tom Potts : Added file: http://bugs.python.org/file19109/shutil-3.2.1.patch ___ Python tracker <http://bugs.python.org/issue10016> ___ ___ Python-bugs-list m

[issue10016] shutil.copyfile -- allow sparse copying

2010-10-04 Thread Tom Potts
Tom Potts added the comment: @pitrou Hmm... the online docs and the contents of the doc directory on the trunk branch say differently: """ Resize the stream to the given *size* in bytes (or the current position if *size* is not specified). The current stream position isn&

[issue10025] random.seed not initialized as advertised

2010-10-04 Thread Tom Goddard
New submission from Tom Goddard : In Python 2.7, random.seed() with a string argument is documented as being equivalent to random.seed() with argument equal to the hash of the string argument. This is not the actual behavior. Reading the _random C code reveals it in fact casts the signed

[issue9163] test_gdb fails

2010-10-06 Thread Tom Morris
Tom Morris added the comment: Did this fix actually make the 2.7 release? I just installed 2.7 on 64-bit Ubuntu and ran into the same problem. python -c "import sysconfig; print sysconfig.get_config_vars()['PY_CFLAGS']" -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrap

[issue9163] test_gdb fails

2010-10-07 Thread Tom Morris
Tom Morris added the comment: Sorry, I misread the 'version' field as the version the fix was committed for, not the version the bug was reported against. The fix was reportedly fixed in r82648 and v2.7 is r82500. If there's ever a 2.7.1, I guess the fix will appear, but sin

[issue10052] Python/dtoa.c:158: #error "Failed to find an exact-width 32-bit integer type" (FreeBSD 4.11 + gcc 2.95.4)

2010-10-14 Thread Tom O'Connor
Tom O'Connor added the comment: Same problem on SGI IRIX 6.5.28 GCC 3.3. Adding the following to pyport.h got me through as well. #define UINT32_MAX 0x #define INT32_MAX 0x7fff -- nosy: +Tom.OConnor ___ Python tracker

[issue10175] vs version for win32 compilation of extension modules is undocumented.

2010-10-22 Thread Tom Fogal
New submission from Tom Fogal : I have recently attempted to install a couple third party packages (zope.interface and dulwech, FWIW) and encountered great difficulties. In particular, the setup complained that it could not find "vcvarsall.bat". Even running these setup scripts

[issue2927] expose html.parser.unescape

2010-11-02 Thread Tom Pinckney
Tom Pinckney added the comment: I don't think Django includes an HTML unescape. I'm not familiar with other frameworks. So I'd still find this useful to include in the stdlib. -- ___ Python tracker <http://bugs.py

[issue2927] expose html.parser.unescape

2010-11-08 Thread Tom Pinckney
Tom Pinckney added the comment: New patch attached, tested against Python 3.2. This is my first Python patch so apologies if I've done something wrong here. Feedback appreciated! Changes: * fit everything to 80 cols * just made changes to the HTMLParser.unescape function instead of prov

[issue10907] OS X installer: warn users of buggy Tcl/Tk in OS X 10.6

2011-03-08 Thread Tom Loredo
Tom Loredo added the comment: Ned- Thanks a lot for the clarifications. Both the tracker and modified web page have cleared things up for me. > "* No recommended or alternate Tcl/Tk is indicated for 32/64 on 10.6. But > the 2.7.2 patched README indicates > ActiveTcl-8.5.9 wi

[issue11442] list_directory() in SimpleHTTPServer.py should add charset=... to Content-type header

2011-03-16 Thread Tom N
Tom N added the comment: I have backported the code from python 3, to apply to the current 2.7 branch. All tests pass, and my machine reports "Content-type: text/html; charset=UTF-8", which appears to be correct. -- keywords: +patch nosy: +Tom.N Added file: http://bugs.

[issue11620] winsound.PlaySound() with SND_MEMORY should accept bytes instead of strings

2011-03-20 Thread Tom Felker
New submission from Tom Felker : PlaySound supposedly lets you play a .WAV file whose contents are stored in a string, by passing the string and flags including winsound.SND_MEMORY. I'm trying to use BytesIO object and the wave module to make a file in-memory, and pass this to win

[issue11643] Use |version| instead of X.Y in the doc

2011-05-18 Thread Tom McDermott
Tom McDermott added the comment: Things are slightly worse than this issue suggests: the Sphinx formatting string |version| has leaked into the html docs in a few places (library/site.html for example). The difficulty is that Sphinx isn't expanding the |version| variable inside

[issue1859] textwrap doesn't linebreak on "\n"

2010-11-23 Thread Tom Lynn
Tom Lynn added the comment: I've also been attempting to look into this and came up with an almost identical patch, which is promising: https://bitbucket.org/tlynn/issue1859/diff/textwrap.py?diff2=041c9deb90a2&diff1=f2c093077fbf I missed the wordsep_simple_re though. Testing it is

[issue10564] maths float error

2010-11-28 Thread Tom Quaile
New submission from Tom Quaile : Using IDLE 3.2a4 Apologies in advance for probably wasting your time. If I'm wrong, just ignore me. I'm very new to Python. Is this a bug, my processor or me? I'm sending this in as I see it's an alpha release. If the user supplies 100 as

[issue11217] python-32 not linked in /usr/local/bin in framework builds

2011-02-14 Thread Tom Loredo
New submission from Tom Loredo : When building a universal framework Python-2.7.1 with homebrew on 10.6.6, python-32 (and its target, python2.7-32) are built and installed in the framework executable path, but they are not linked in /usr/local/bin. msg101156 in Issue 8089 recognized this as

[issue11217] python-32 not linked in /usr/local/bin in framework builds

2011-02-15 Thread Tom Loredo
Tom Loredo added the comment: I believe the main Makefile makes the Mac/Makefile.in installunixtools target automatically, and I don't see that it should do "the right thing" regarding linking a python-32. I did the brew install again, logging the output, and adding an

[issue10907] OS X installer: warn users of buggy Tcl/Tk in OS X 10.6

2011-02-15 Thread Tom Loredo
Tom Loredo added the comment: I see this is marked as fixed but pending; perhaps the following comment will be useful. I encountered the IDLE/Tk instability issue when working on the Homebrew formula for Python-2.6.5 a year ago (March 2010). Building a universal framework Python on Intel

[issue11217] python-32 not linked in /usr/local/bin in framework builds

2011-02-18 Thread Tom Loredo
Tom Loredo added the comment: I believe this is a bug. The -32 part of Mac/Makefile.in builds and links the -32 versions here: ifneq ($(LIPO_32BIT_FLAGS),) lipo $(LIPO_32BIT_FLAGS) -output $(DESTDIR)$(prefix)/bin/python$(VERSION)-32 pythonw lipo $(LIPO_32BIT_FLAGS) -output

[issue11217] python-32 not linked in /usr/local/bin in framework builds

2011-02-18 Thread Tom Loredo
Tom Loredo added the comment: The attached patch does the trick. -- Added file: http://bugs.python.org/file20792/Python-2.7.1-patch.txt ___ Python tracker <http://bugs.python.org/issue11

[issue2927] expose html.parser.unescape

2008-05-19 Thread Tom Pinckney
New submission from Tom Pinckney <[EMAIL PROTECTED]>: There is currently a private method inside of html.parser.HTMLParser to unescape HTML &...; style escapes. This would be useful to expose for other users who want to unescape a piece of HTML. Additionally, many websites don&#x

[issue3300] urllib.quote and unquote - Unicode issues

2008-07-09 Thread Tom Pinckney
Tom Pinckney <[EMAIL PROTECTED]> added the comment: I mentioned this is in a brief python-dev discussion earlier this spring, but many popular websites such as Wikipedia and Facebook do use UTF-8 as their character encoding scheme for the path and argument portion of URLs. I know ther

[issue1708652] Exact matching

2008-10-13 Thread Tom Lynn
Tom Lynn <[EMAIL PROTECTED]> added the comment: Yes, that's right. The binary aspect of it was something of a red herring, I'm afraid, although I still think that (or parsing in general) is an important use case. The prime motivation it that it's easy to either forg

[issue7851] WatchedFileHandler needs to be references as handlers.WatchedFileHandler in conf files

2010-02-03 Thread Tom Aratyn
New submission from Tom Aratyn : The documentation on using logging configuration files (http://docs.python.org/library/logging.html#configuring-logging) doesn't mention that the WatchedFileHandler needs to be referenced as "handlers.WatchedFileHandler". This behavior is diff

[issue7998] MacPython 2.7a3 posix_spawn error for build using --with-framework-name

2010-02-22 Thread Tom Loredo
New submission from Tom Loredo : Build Py-2.7a3 on Snow Leopard OS 10.6.2 with a non-default framework name: ./configure --prefix=/usr/local/tmp --enable-framework --with-framework-name=PythonAlpha --enable-universalsdk=/ --with-universal-archs=intel "make" succeeds, "m

[issue7998] MacPython 2.7a3 posix_spawn error for build using --with-framework-name

2010-03-07 Thread Tom Loredo
Tom Loredo added the comment: > Ronald Oussoren added the comment: > > Fix in r78755 (2.7) and r78756 (3.2) Thanks for your attention to this, Ronald---and all the hard work on the OS X support. -Tom - This mail sent through

[issue8089] 2.6/3.1 32-bit/64-bit universal builds always run in 64-bit on 10.6

2010-03-14 Thread Tom Loredo
Tom Loredo added the comment: Attempted to build 2.6.5rc2 on Mac Pro (2006), OS 10.6.2, following instructions in Mac/README: ./configure --prefix=/usr/local/tmp --enable-framework --with-universal-archs=intel --enable-universalsdk=/ Results of "make test" are as expected

[issue8089] 2.6/3.1 32-bit/64-bit universal builds always run in 64-bit on 10.6

2010-03-15 Thread Tom Loredo
Tom Loredo added the comment: Ned- I *did* run "make install"; everything I reported was about the situation *after* running "make install". In particular, I don't know any way to get access to IDLE without "make install"; what I described came from using

[issue8089] 2.6/3.1 32-bit/64-bit universal builds always run in 64-bit on 10.6

2010-03-16 Thread Tom Loredo
Tom Loredo added the comment: > the python-32 executable has never been linked into /usr/local/bin. What I meant by "the version pointed to" is: The "python" command in 2.6.4 produced by an "intel" universal build (whether in the framework or the install pre

[issue8089] 2.6/3.1 32-bit/64-bit universal builds always run in 64-bit on 10.6

2010-03-16 Thread Tom Loredo
Tom Loredo added the comment: > Unless you vehemently disagree, I am not making this a release blocker for > 2.6.5. I'm not sure who you are asking (I doubt it was me!), but I don't consider this a release blocker. The only possible substantive issue is whether "pytho

[issue7936] sys.argv contains only scriptname

2010-03-23 Thread Tom Zych
Tom Zych added the comment: I'm getting something like this on Windows 7: C:\>assoc .py .py=Python.File C:\>ftype Python.File Python.File="C:\Python31\py31.exe" "%1" %* C:\>args.py 1 2 3 Python version: sys.version_info(major=3, minor=1, micro=1, releaselev

[issue7936] sys.argv contains only scriptname

2010-03-23 Thread Tom Zych
Tom Zych added the comment: No joy :( I tried putting double-quotes around %%*, that didn't work either. Tried single-quotes too, just in case it works like a Bourne-type shell. BTW I forgot to set 3.1 on my earlier message. That business about having to double the % rings a faint bell

[issue1313119] urlparse "caches" parses regardless of encoding

2007-12-10 Thread Tom Parker
Tom Parker added the comment: Also effects Python 2.5.1 (tested on Debian python2.5 package version 2.5.1-5) -- nosy: +palfrey versions: +Python 2.5 _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/iss

[issue1859] textwrap doesn't linebreak on "\n"

2008-01-17 Thread Tom Parker
Tom Parker added the comment: Attaching a patch that corrects the issue (against python 2.4) Added file: http://bugs.python.org/file9192/textwrap-fix.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/

[issue1859] textwrap doesn't linebreak on "\n"

2008-01-17 Thread Tom Parker
New submission from Tom Parker: If a piece of text given to textwrap contains one or more "\n", textwrap does not break at that point. I would have expected "\n" characters to cause forced breaks. -- components: Library (Lib) messages: 60026 nosy: palfrey severity

[issue1859] textwrap doesn't linebreak on "\n"

2008-01-17 Thread Tom Parker
Tom Parker added the comment: If replace_whitespace in textwrap is set to False (True is default) then there are newlines. Yes, if you haven't set this then the patch does nothing (but that sounds sane to me) The exact text was "RadioTest TOSSIM stress tester by Tom Parker <[EM

[issue1859] textwrap doesn't linebreak on "\n"

2008-01-17 Thread Tom Parker
Tom Parker added the comment: @Guido: Thanks for the suggestion, it fixes my immediate problem! @Mark: Yup, that was exactly my issue. It took a while to figure out why the heck it was ignoring my linebreaks, and then once I'd found replace_whitespace it appeared to be doing the "wrong

[issue1859] textwrap doesn't linebreak on "\n"

2008-01-17 Thread Tom Parker
Tom Parker added the comment: Is there any other way to do what I was trying to do then (both dynamic wrapping for long segments + some static breaks)? Right now, the only option I can think of is writing a textwrap.TextWrapper subclass that implements my patch, and copying 70-ish lines of code

[issue1631394] sre module has misleading docs

2008-01-25 Thread Tom Lynn
Tom Lynn added the comment: Thanks for fixing this. I now also note that (?<=...), (?http://bugs.python.org/file9284/undoc-patch.txt _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/

[issue1631394] sre module has misleading docs

2008-01-26 Thread Tom Lynn
Tom Lynn added the comment: Nice changes to the wording. (For the record: it's r60316 in fact.) _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1631394> _ _

[issue1731717] race condition in subprocess module

2008-03-24 Thread Tom Culliton
Tom Culliton <[EMAIL PROTECTED]> added the comment: I'm not sure what the POSIX standards say on this (and MS-Windows may go it's own contrary way), but for most real systems the PID is a running count (generally 32 bit or larger today) which would have to cycle all the way

[issue1731717] race condition in subprocess module

2008-03-24 Thread Tom Culliton
Tom Culliton <[EMAIL PROTECTED]> added the comment: AIX, HP-UX, Solaris, 64 bit Linux, ... Even in the Linux x86 header files there's a mix of int and short. The last time I had to do the math on how long it would take the PID to cycle was probably on an AIX box and it was a ver

[issue2670] urllib2 build_opener() fails if two handlers use the same default base class

2008-04-22 Thread Tom Lynn
New submission from Tom Lynn <[EMAIL PROTECTED]>: urllib2.py:424 (Py 2.4) or urllib2.py:443 (Py 2.5) in build_opener():: skip = [] for klass in default_classes: for check in handlers: if inspect.isclass(check): if issubclass

[issue2637] urllib.quote() escapes characters unnecessarily and contrary to docs

2008-05-06 Thread Tom Pinckney
Tom Pinckney <[EMAIL PROTECTED]> added the comment: It also looks like urllib.quote (and quote_plus) do not properly handle unicode strings. urllib.urlencode() properly converts unicode strings to utf-8 encoded ascii strings before then calling urllib.quote() on them. -

[issue4615] de-duping function in itertools

2008-12-09 Thread Tom Pinckney
New submission from Tom Pinckney <[EMAIL PROTECTED]>: Any interest in an itertools de-duping function? I find I have to write this over and over for different projects: def deduped(iter,key=None): keys = set() for x in iter: if key: k = key(x)

[issue4615] de-duping function in itertools

2008-12-09 Thread Tom Pinckney
Tom Pinckney <[EMAIL PROTECTED]> added the comment: My latest need for something like this was something like this: src1 = db_query(query_1) src2 = db_query(query_2) results = deduped(src1 + src2, key=lambda x: x.field2) Basically, I wanted data from src1 if it existed and otherwise fro

[issue5021] doctest.testfile should set __name__, can't use namedtuple

2009-01-21 Thread Tom Lynn
New submission from Tom Lynn : This file fails when run with doctest.testfile:: >>> print __name__ __builtin__ >>> print globals()['__name__'] # fails with KeyError: __name__ __builtin__ "__builtin__" is probably not a good value, but more impor

[issue5022] doctest should allow running tests with "python -m doctest"

2009-01-21 Thread Tom Lynn
New submission from Tom Lynn : It would be good to be able to do something like:: $ python -m doctest foo.py $ python -m doctest --text foo.txt bar.txt (or preferably some command line options design which could handle both .py and .txt files). -- components: Library (Lib

[issue5079] time.ctime docs refer to "time tuple" for default

2009-01-27 Thread Tom Lynn
New submission from Tom Lynn : The docs for time.ctime() (quoted below) seem to have been copied from time.asctime(). They refer to a time tuple and localtime(), where they should refer to seconds and time(). Current docs:: ctime(seconds) -> string Convert a time in seco

[issue5079] time.ctime docs refer to "time tuple" for default

2009-01-27 Thread Tom Lynn
Changes by Tom Lynn : -- components: +Library (Lib) type: -> feature request versions: +Python 2.5, Python 3.0 ___ Python tracker <http://bugs.python.org/iss

[issue1079] decode_header does not follow RFC 2047

2009-02-03 Thread Tom Lynn
Tom Lynn added the comment: The only difference between the two regexps is that the email/header.py version looks for:: (?=[ \t]|$) # whitespace or the end of the string at the end (with re.MULTILINE, so $ also matches '\n'). To expand on "There is nothing about th

[issue4958] email/header.py ecre regular expression issue

2009-02-03 Thread Tom Lynn
Tom Lynn added the comment: Duplicates issue1047. -- nosy: +tlynn ___ Python tracker <http://bugs.python.org/issue4958> ___ ___ Python-bugs-list mailin

[issue4958] email/header.py ecre regular expression issue

2009-02-03 Thread Tom Lynn
Tom Lynn added the comment: Oops, duplicates issue 1079 even. ___ Python tracker <http://bugs.python.org/issue4958> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue4491] email.Header.decode_header() doesn't work if encoded-word was separeted by CRLF

2009-02-03 Thread Tom Lynn
Tom Lynn added the comment: Duplicates issue1079. -- nosy: +tlynn ___ Python tracker <http://bugs.python.org/issue4491> ___ ___ Python-bugs-list mailin

[issue37915] Segfault in comparison between datetime.timezone.utc and putz.utc

2019-08-22 Thread Tom Augspurger
New submission from Tom Augspurger : The following crashes with Python 3.8b3 ``` import sys import pytz import datetime print(sys.version_info) print(pytz.__version__) print(datetime.timezone.utc == pytz.utc) ``` When run with `-X faulthandler`, I see ``` sys.version_info(major=3, minor=8

[issue37915] Segfault in comparison between datetime.timezone.utc and pytz.utc

2019-08-22 Thread Tom Augspurger
Tom Augspurger added the comment: Thanks for debugging this Karthikeyan and for the quick fix Pablo! -- ___ Python tracker <https://bugs.python.org/issue37

[issue38646] Invalid check on the result of pthread_self() leads to libpython startup failure

2019-10-30 Thread Tom Lane
New submission from Tom Lane : Assorted code in the Python core supposes that the result of pthread_self() cannot be equal to PYTHREAD_INVALID_THREAD_ID, ie (void *) -1. If it is, you get a crash at interpreter startup. Unfortunately, this supposition is directly contrary to the POSIX

[issue43661] api-ms-win-core-path-l1-1.0.dll, redux of 40740 (which has since been closed)

2021-03-29 Thread Tom Kacvinsky
New submission from Tom Kacvinsky : Even though bpo#40740 has been closed, I wanted to re-raise the issue as this affects me. There are only two functions that come from this missing DLL: PathCchCombineEx PathCchCanonicalizeEx Would there be a way of rewriting join/canonicalize in

[issue29672] `catch_warnings` context manager causes all warnings to be printed every time, even after exiting

2021-04-02 Thread Tom Aldcroft
Tom Aldcroft added the comment: I encountered this issue today and want to +1 getting some attention on this. The disconnected nature of this issue makes it especially difficult to understand -- any package in the stack can change this hidden global variable `_filters_version` in the

[issue43750] Undefined constant PACKET_MULTIHOST referred to in package socket

2021-04-06 Thread Tom Cook
New submission from Tom Cook : The documentation for the `AF_PACKET` address family refers to `PACKET_MULTIHOST`. I believe this should read `PACKET_MULTICAST`, which is defined on Linux systems (`PACKET_MULTIHOST` is not). -- assignee: docs@python components: Documentation messages

[issue44075] Add a PEP578 audit hook for Asyncio loop stalls

2021-05-08 Thread Tom Forbes
New submission from Tom Forbes : Detecting and monitoring loop stalls in a production asyncio application is more difficult than it could be. Firstly you must enable debug mode for the entire loop then you need to look for warnings outputted via the asyncio logger. This makes it hard to send

[issue44075] Add a PEP578 audit hook for Asyncio loop stalls

2021-05-08 Thread Tom Forbes
Tom Forbes added the comment: I don't see why we shouldn't use PEP 578 for this - the events provide rich monitoring information about what a Python process is "doing" with an easy, central way to register callbacks to receive these events and shovel them off to a moni

[issue44075] Add a PEP578 audit hook for Asyncio loop stalls

2021-05-08 Thread Tom Forbes
Change by Tom Forbes : -- keywords: +patch pull_requests: +24642 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25990 ___ Python tracker <https://bugs.python.org/issu

[issue44075] Add a PEP578 audit hook for Asyncio loop stalls

2021-05-08 Thread Tom Forbes
Tom Forbes added the comment: Actually reacting to a stall would require something more and probably should be done at some point. But this is purely about monitoring - in our use case we'd send a metric via statsd that would be used to correlate stalls against other service level me

[issue44342] enum with inherited type won't pickle

2021-06-07 Thread Tom Brown
New submission from Tom Brown : The following script runs without error in 3.8.5 and raises an error in 3.8.6, 3.9.5 and 3.10.0b1. Source: ``` import enum, pickle class MyInt(int): pass # work-around: __reduce_ex__ = int.__reduce_ex__ class MyEnum(MyInt, enum.Enum): A = 1

[issue20779] Add pathlib.chown method

2021-06-28 Thread Tom Cook
Tom Cook added the comment: +1 this. I have a program that opens a UNIX socket as root for other processes to communicate with it. I need to set the permissions to 0o775 and set the owner gid to a specific group so that members of that group can communicate with the process. It&#

[issue45466] Simple curl/wget-like download functionality in urllib (like http offers server)

2021-10-13 Thread Tom Pohl
New submission from Tom Pohl : In the context of building Docker images, it is often required to download stuff. If curl/wget are available, great, but often slim images don't offer that. The urllib could provide a very simple download functionality (like http offers a simple s

[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2021-10-18 Thread Tom Karzes
Tom Karzes added the comment: Is there *still* no fix for this? I keep running into this bug. People sometimes say "oh, it's no problem, just use = to associate the option value with the option name". That is so sad. It's basically saying "it can't be made

[issue45466] Simple curl/wget-like download functionality in urllib (like http offers server)

2021-10-25 Thread Tom Pohl
Tom Pohl added the comment: Thanks, Terry, for the hint. The idea got some support on python-ideas, so I thought it is worthwhile to do a PR. As a first-time contributor, I now have to wait for approval for the pipeline to run... -- ___ Python

[issue45466] Simple curl/wget-like download functionality in urllib (like http offers server)

2021-11-11 Thread Tom Pohl
Change by Tom Pohl : -- nosy: -tom.pohl ___ Python tracker <https://bugs.python.org/issue45466> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28140] Give better errors for OS commands, like 'pip', in REPL, script

2021-11-28 Thread Tom Viner
Tom Viner added the comment: I've updated my pull request from 3 years ago. Fixed merge conflicts and addressed all comments. https://github.com/python/cpython/pull/8536 -- ___ Python tracker <https://bugs.python.org/is

<    1   2   3   4   5   >