[issue15061] hmac.secure_compare() leaks information about length of strings

2012-06-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > > > We could handle all bytes-compatible objects, using the buffer API. > > It is timing unsafe. > How so? I checked myself, and I see that most likely I was wrong. At least for bytes and bytearrays it is timing safe. > I don't think that's the right answe

[issue10053] Don’t close fd when FileIO.__init__ fails

2012-06-21 Thread Hynek Schlawack
Hynek Schlawack added the comment: Hmmm, I thought Lib/_pyio.py actually uses Lib/_io/_fileio.c? At least I can't find the logic inside. There's no error handling at all. It just uses the FileIO object in Lib/_pyio.py:189 which it seems to get from Lib/_pyio.py:585 which I presumed was from L

[issue15125] argparse: positional arguments containing - in name not handled well

2012-06-21 Thread R. David Murray
R. David Murray added the comment: It does. -- keywords: +easy nosy: +bethard, r.david.murray stage: -> needs patch versions: +Python 2.7, Python 3.2, Python 3.3 -Python 2.6 ___ Python tracker ___

[issue7584] datetime.rfcformat() for Date and Time on the Internet

2012-06-21 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue14653] Improve mktime_tz to use calendar.timegm instead of time.mktime

2012-06-21 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker ___ __

[issue14653] Improve mktime_tz to use calendar.timegm instead of time.mktime

2012-06-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset a283563c8cc4 by Alexander Belopolsky in branch '2.7': Issue #14653: email.utils.mktime_tz() no longer relies on system http://hg.python.org/cpython/rev/a283563c8cc4 -- ___ Python tracker

[issue14653] Improve mktime_tz to use calendar.timegm instead of time.mktime

2012-06-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset ffc048f43a70 by Alexander Belopolsky in branch '3.2': Issue #14653: email.utils.mktime_tz() no longer relies on system http://hg.python.org/cpython/rev/ffc048f43a70 New changeset 9f88c38318ac by Alexander Belopolsky in branch 'default': Issue #1465

[issue14684] zlib set dictionary support inflateSetDictionary

2012-06-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1cfa44cb5af0 by Nadeem Vawda in branch 'default': Document the rest of zlib.compressobj()'s arguments. http://hg.python.org/cpython/rev/1cfa44cb5af0 -- ___ Python tracker

[issue3982] support .format for bytes

2012-06-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: If you want to discuss this issue further, I think you post to python-ideas list with concrete examples. -- ___ Python tracker ___

[issue15061] hmac.secure_compare() leaks information about length of strings

2012-06-21 Thread Christian Heimes
Christian Heimes added the comment: The patch has another flaw. The compiler may choose to fold and optimize code in _tscmp(). I'm going to declare the length of the right side and both char* as volatile. That should stop any compiler. I could also add some pragmas: MSVC: #pragma optimize(""

[issue15061] hmac.secure_compare() leaks information about length of strings

2012-06-21 Thread Christian Heimes
Christian Heimes added the comment: I'm a bit rusty and I hope I got it right. The ASCII unicode case is a good idea and IMO timing safe. The buffer path is also timing safe once I have both views. The function leaks some timing information when an error occurs. Since the timing just reveal

[issue444582] Finding programs in PATH, adding shutil.which

2012-06-21 Thread Brian Curtin
Brian Curtin added the comment: Here's a patch that also works on linux. A pathext specific test is now skipped since that only matters on Windows, and I forgot a chmod that was making two tests fail on linux. -- Added file: http://bugs.python.org/file26078/issue444582_v3.diff __

[issue10053] Don’t close fd when FileIO.__init__ fails

2012-06-21 Thread Éric Araujo
Éric Araujo added the comment: Shouldn’t the fix be ported to _pyio? -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-lis

[issue15131] Document py/pyw launchers

2012-06-21 Thread Brian Curtin
Changes by Brian Curtin : -- assignee: docs@python -> brian.curtin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue15131] Document py/pyw launchers

2012-06-21 Thread Brian Curtin
New submission from Brian Curtin : As of http://hg.python.org/cpython/rev/a7ecbb2ad967, the PEP 397 launchers are included. Their functionality should be documented. -- assignee: docs@python components: Documentation, Windows messages: 163374 nosy: brian.curtin, docs@python priority: cr

[issue15129] file.readline() cannot read weird ascii character in file

2012-06-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Your problem is similar to this discussion: http://stackoverflow.com/questions/405058/line-reading-chokes-on-0x1a On Python2, files are based on the fopen() C function, and on Windows files opened in text mode stop reading on the first character 26 (^Z, o

[issue15126] Theading isAlive() missing version note

2012-06-21 Thread Georg Brandl
Georg Brandl added the comment: Since the news aliases are all over the module, the version change notice is at the top of the page: """ Note Starting with Python 2.6, this module provides PEP 8 compliant aliases and properties to replace the camelCase names that were inspired by Java’s thr

[issue15061] hmac.secure_compare() leaks information about length of strings

2012-06-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > > - I only handle exact byte or unicode types (no subclasses) since a > > > user may have overwritten __eq__ and I don't want to special case it. > > We could handle all bytes-compatible objects, using the buffer API. > > It is timing unsafe. How so? > >

[issue15128] inspect raises exception when frames are misleading about source line numbers

2012-06-21 Thread Kevin M. Turner
Kevin M. Turner added the comment: patch attached (against python 2.7 tip) -- keywords: +patch Added file: http://bugs.python.org/file26077/15128-inspect-source-linenum.diff ___ Python tracker

[issue3982] support .format for bytes

2012-06-21 Thread Uoti Urpala
Uoti Urpala added the comment: I've hit this limitation a couple more times, and none of the proposed workarounds are adequate. Working with protocols and file formats that use human-readable markup is significantly clumsier than it was with Python 2 (using either the % operator, which also l

[issue15061] hmac.secure_compare() leaks information about length of strings

2012-06-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > You mean .encode()? Yes, of cause. timingsafe_eq(a.encode('ascii'), b.encode('ascii')). > > About code. Instead (PyBytes_CheckExact(a) && PyBytes_CheckExact(b)) you > > should use ((PyBytes_CheckExact(a) != 0) & (PyBytes_CheckExact(b) != > > 0)). > > What

[issue10053] Don’t close fd when FileIO.__init__ fails

2012-06-21 Thread Hynek Schlawack
Hynek Schlawack added the comment: Should be fixed now. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___

[issue15061] hmac.secure_compare() leaks information about length of strings

2012-06-21 Thread Martin v . Löwis
Martin v. Löwis added the comment: > The user can just do timingsafe_eq(a.decode('ascii'), > b.decode('ascii')). You mean .encode()? > I do not see a necessity in support of unicode > strings. Support ASCII strings will create the false impression that all > strings are supported. I agree.

[issue15061] hmac.secure_compare() leaks information about length of strings

2012-06-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > > - I only handle exact byte or unicode types (no subclasses) since a > > user may have overwritten __eq__ and I don't want to special case it. > We could handle all bytes-compatible objects, using the buffer API. It is timing unsafe. > > - The unicode pat

[issue15130] remove redundant paragraph in socket howto

2012-06-21 Thread Tshepang Lekhonkhobe
New submission from Tshepang Lekhonkhobe : same text used on Abstract is used in the beginning of the main text -- assignee: docs@python components: Documentation files: redundancy.diff keywords: patch messages: 163364 nosy: docs@python, tshepang priority: normal severity: normal status:

[issue15129] file.readline() cannot read weird ascii character in file

2012-06-21 Thread Tony Malykh
New submission from Tony Malykh : readline() or readlines() method can read the file up to the line where weird character ascii code 26 appears. I would like to read the entire file though. A simple example attached. -- components: IO files: testpy.zip messages: 163363 nosy: Tony.Malyk

[issue12567] curses implementation of Unicode is wrong in Python 3

2012-06-21 Thread Ned Deily
Ned Deily added the comment: See also Issue15037 which documents a broken curses.unget_wch and, hence, test_curses when Python is built with ncurses 5.7 or earlier. -- ___ Python tracker _

[issue15037] curses.unget_wch and test_curses fail when linked with ncurses 5.7 and earlier

2012-06-21 Thread Ned Deily
Ned Deily added the comment: Thanks for the testing. Georg, haypo: I think a call should be made on what, if anything, to do about this prior to 3.3.0-final. It seems that there are still OS distributions out there with older versions of ncurses. Is documenting this bug sufficient? If so,

[issue10053] Don’t close fd when FileIO.__init__ fails

2012-06-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 981ad5254d07 by Hynek Schlawack in branch '2.7': #10053: Don't close FDs when FileIO.__init__ fails http://hg.python.org/cpython/rev/981ad5254d07 New changeset d042bd8625f3 by Hynek Schlawack in branch '3.2': #10053: Don't close FDs when FileIO.__i

[issue13698] Mailbox module should support other mbox formats in addition to mboxo

2012-06-21 Thread Petri Lehtinen
Petri Lehtinen added the comment: I'm a little concerned about backwards compatibility. Someone might get upset if extra >'s start appearing in the messages when they read the mailbox contents with an application that uses the mboxo format. A little analysis on the possible corruptions that h

[issue15122] Add an option to always rewrite single-file mailboxes in-place.

2012-06-21 Thread Petri Lehtinen
Petri Lehtinen added the comment: I looked at the source code of mutt to see how it rewrites mbox files. It does roughly this: 1. Block some signals. 2. Lock the mbox file (with dotlock, fcntl and flock). 3. Create a temporary file in /tmp. 4. Write messages to the temporary file, from the

[issue14776] Add SystemTap static markers

2012-06-21 Thread Dave Malcolm
Dave Malcolm added the comment: I'm attaching an updated version of the patch; I hope there's still time before Saturday to get it into 3.3 I found a bug in the configure script in the old patch: /usr/bin/dtrace was required, even without requesting systemtap. I've fixed it by adding a new

[issue14769] Add test to automatically detect missing format units in skipitem()

2012-06-21 Thread Benjamin Peterson
Benjamin Peterson added the comment: Okay -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue15128] inspect raises exception when frames are misleading about source line numbers

2012-06-21 Thread Kevin M. Turner
New submission from Kevin M. Turner : The attached example shows how inspect.findsource fails when given a stack frame that points to a non-existent source line, and how inspect.getframeinfo and getinnerframes do not handle that failure. On the one hand, yes, this code was asking for it by bui

[issue15119] ctypes mixed-types bitfield layout nonsensical; doesn't match compiler.

2012-06-21 Thread Meador Inge
Meador Inge added the comment: Thanks for digging into this Mark. I will have a look too later in the day. -- ___ Python tracker ___ ___

[issue15119] ctypes mixed-types bitfield layout nonsensical; doesn't match compiler.

2012-06-21 Thread Mark Dickinson
Mark Dickinson added the comment: There are two separate issues here. The first is that the layout that ctypes chooses for a struct of bitfields fails basic sanity checks, like having each bitfield actually fit in the corresponding type. As a result, the C-level bitshifting code used to get

[issue15008] PEP 362 "Signature Objects" reference implementation

2012-06-21 Thread Yury Selivanov
Yury Selivanov added the comment: New patch - pep362.7.patch Summary: 1. Signature & Parameter objects are now immutable 2. Signature.replace() and Parameter.replace() 3. Signature has a new default constructor, which accepts parameters list and a return_annotation; and a new 'from_function'

[issue13483] Use VirtualAlloc to allocate memory arenas

2012-06-21 Thread Martin v . Löwis
Martin v. Löwis added the comment: Here is an updated patch. -- Added file: http://bugs.python.org/file26070/va.diff ___ Python tracker ___ _

[issue13483] Use VirtualAlloc to allocate memory arenas

2012-06-21 Thread Martin v . Löwis
Martin v. Löwis added the comment: Here is a benchmark. Based on my assumption that this patch may reduce allocation overheads due to minimizing padding+fragmentation, it allocates a lot of memory, and then waits 20s so you can check in the process explorer what the "Commit Size" of the proce

[issue15127] Supressing warnings with -w "whether gcc supports ParseTuple"

2012-06-21 Thread Samuel John
New submission from Samuel John : In configrue.in, Python checks if the compiler supports __attribute__((format(PyArg_ParseTuple, 2, 3))) and sets the CFLAGS to "CFLAGS -Werror" to decide this test. When you build Python with "CFLAGS=-w" (homebrew's default), configure reports whether gc

[issue15124] _thread.LockType: Optimize lock deletion, acquisition of uncontested lock and release of lock.

2012-06-21 Thread Richard Oudkerk
Richard Oudkerk added the comment: On 32 bit linux in a VM I get BEFORE allocation 0.125 acquire/release 0.434 AFTER allocation 0.109 (-13%) acquire/release 0.346 (-20%) -- nosy: +sbt ___ Python tracker

[issue15061] hmac.secure_compare() leaks information about length of strings

2012-06-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: > The file is targeted for Objects/stringlib/timingsafe.h. stringlib is for type-generic functions, so I don't think it should be put there. > - I only handle exact byte or unicode types (no subclasses) since a > user may have overwritten __eq__ and I don't wa

[issue15120] Different behavior of html.parser.HTMLParser

2012-06-21 Thread Ezio Melotti
Changes by Ezio Melotti : -- resolution: -> invalid stage: -> committed/rejected ___ Python tracker ___ ___ Python-bugs-list mailing

[issue15126] Theading isAlive() missing version note

2012-06-21 Thread Damian
Damian added the comment: I'm gonna hazard the guess that other methods like currentThread() and current_thread() are the same... http://docs.python.org/library/threading.html#threading.current_thread -- ___ Python tracker

[issue15120] Different behavior of html.parser.HTMLParser

2012-06-21 Thread hansokumake
hansokumake added the comment: I'm sorry. It's my fault. I still use Python 3.2.2. -- status: open -> closed ___ Python tracker ___ _

[issue15126] Theading isAlive() missing version note

2012-06-21 Thread Damian
New submission from Damian : The threading module's isAlive() method had an is_alive() alias first created in python 2.6. The documentation page doesn't mention this... http://docs.python.org/library/threading.html#threading.Thread.is_alive However, this is noted for other methods like the Even

[issue15061] hmac.secure_compare() leaks information about length of strings

2012-06-21 Thread Christian Heimes
Christian Heimes added the comment: I've attached a header for that implements a single C function timingsafe_eq(a, b). The file is targeted for Objects/stringlib/timingsafe.h. Please review the file. Comments - I only handle exact byte or unicode types (no subclasses) since a user

[issue15122] Add an option to always rewrite single-file mailboxes in-place.

2012-06-21 Thread R. David Murray
R. David Murray added the comment: Any chance you'd be willing to look in the source code and see if they do any locking mailbox doesn't? The evidence you've already gathered is probably enough to justify adding the option, though. -- ___ Python t

[issue14684] zlib set dictionary support inflateSetDictionary

2012-06-21 Thread Nadeem Vawda
Nadeem Vawda added the comment: > Just saw this on the checkins list; where are the other options documented? They aren't, AFAIK. I've been planning on adding them when I've got time (based on the zlib manual at http://zlib.net/manual.html), but with the upcoming feature freeze for 3.3, this i

[issue15125] argparse: positional arguments containing - in name not handled well

2012-06-21 Thread Nicu Stiurca
New submission from Nicu Stiurca : To reproduce, try the following code: from argparse import ArgumentParser a = ArgumentParser() a.add_argument("foo-bar") args = a.parse_args(["biz"]) print args, args.foo_bar Expected output: Namespace(foo_bar='biz') biz Actual output: Namespace(foo-bar='biz')

[issue14684] zlib set dictionary support inflateSetDictionary

2012-06-21 Thread Jim Jewett
Jim Jewett added the comment: Just saw this on the checkins list; where are the other options documented? """ PyDoc_STRVAR(compressobj__doc__, -"compressobj([level]) -- Return a compressor object.\n" +"compressobj([level[, method[, wbits[, memlevel[, strategy[, zdict]])\n" +" -- Return a

[issue4489] shutil.rmtree is vulnerable to a symlink attack

2012-06-21 Thread Hynek Schlawack
Hynek Schlawack added the comment: I'll try to get it in before beta1 then. -- ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue15114] Deprecate strict mode of HTMLParser

2012-06-21 Thread Ezio Melotti
Ezio Melotti added the comment: The attached patch include these changes: * strict=False default * strict arg deprecated in the doc * strict=True deprecated (raises a warning) * HTMLParseError deprecated in the doc * some calls to HTMLParser.error converted to asserts [0] Regarding * HTMLParser

[issue15037] test_curses fails with OverflowError

2012-06-21 Thread John Bollinger
John Bollinger added the comment: Ok, I confirm that the test passes after the system's ncurses library is upgraded to ncurses 5.8, and fails again when ncurses is downgraded back to version 5.7. -- ___ Python tracker

[issue15124] _thread.LockType: Optimize lock deletion, acquisition of uncontested lock and release of lock.

2012-06-21 Thread Kristján Valur Jónsson
Changes by Kristján Valur Jónsson : -- components: +Interpreter Core type: -> performance versions: +Python 3.3 ___ Python tracker ___ __

[issue15124] _thread.LockType: Optimize lock deletion, acquisition of uncontested lock and release of lock.

2012-06-21 Thread Kristján Valur Jónsson
New submission from Kristján Valur Jónsson : _thread.LockType contains code for sanity checking when the lock is released, and for unlocking it when it is deleted. Both operations involve actually try-lock operations that are costly. Use a flag on the log to keep track of its locking state i

[issue15037] test_curses fails with OverflowError

2012-06-21 Thread John Bollinger
John Bollinger added the comment: Clarification: "so that's not a good solution for most users" ... of RedHat-family distros, version 6.2 and earlier. In fact, it looks like RedHat is sticking with its current version of ncurses for RHEL 6.3, too, so no help is coming from that direction any

[issue15061] hmac.secure_compare() leaks information about length of strings

2012-06-21 Thread Maciej Fijalkowski
Maciej Fijalkowski added the comment: Hi. This is what we did with Armin: http://bpaste.net/show/32123/ It seems there is still *some* information leaking via side-channels, although it's a bit unclear what. Feel free to play with it (try swapping, having different object etc.) --

[issue15121] devguide doesn't document all bug tracker components

2012-06-21 Thread Ezio Melotti
Ezio Melotti added the comment: I wonder why "None" exists, given that there's already "no selection" (maybe to distinguish issues that have been triaged already from the ones who haven't?). "email" refers to issue related to the email package, and I'm not sure what exactly classify as cross-b

[issue15120] Different behavior of html.parser.HTMLParser

2012-06-21 Thread Ezio Melotti
Ezio Melotti added the comment: What exact version of python have you used? The example works here with 3.2.3+. -- assignee: docs@python -> ezio.melotti ___ Python tracker ___ _

[issue15037] test_curses fails with OverflowError

2012-06-21 Thread John Bollinger
John Bollinger added the comment: The system on which I encountered the test failure uses ncurses 5.7, so that's consistent with the theory that the test is tickling an ncurses bug. I'll have a look at testing with ncurses 5.8, but it is not available from RedHat or CentOS (and it never will

[issue15061] hmac.secure_compare() leaks information about length of strings

2012-06-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Shall explore option 2b) "optionally create a C implementation as it's much > easier to check C code for timing issues" Definitely. I'm not sure whether that can go in 3.3 post-beta, though. -- ___ Python tracker

[issue15122] Add an option to always rewrite single-file mailboxes in-place.

2012-06-21 Thread Petri Lehtinen
Petri Lehtinen added the comment: Alpine (the successor of pine) also seems to overwrite in-place, just like mutt. -- ___ Python tracker ___

[issue15122] Add an option to always rewrite single-file mailboxes in-place.

2012-06-21 Thread Petri Lehtinen
Petri Lehtinen added the comment: Now I also tested rmail (the Emacs email client). It seems to write-and-rename, at least the inode number changes. It seems to even use the mboxo format nowadays (used to use Babyl). -- ___ Python tracker

[issue15122] Add an option to always rewrite single-file mailboxes in-place.

2012-06-21 Thread Petri Lehtinen
Petri Lehtinen added the comment: I actually already researched mutt 1.5.21 (on Ubuntu), and it seems to overwrite the file in-place. At least the inode number doesn't change when I append and/or delete files from an mbox file and save it. -- ___ P

[issue15123] float().__format__() disregards given field width

2012-06-21 Thread Luís Gomes
Changes by Luís Gomes : -- resolution: -> invalid status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue15123] float().__format__() disregards given field width

2012-06-21 Thread Luís Gomes
New submission from Luís Gomes : Python 3.2.3 (default, May 3 2012, 15:51:42) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> 1.2.__format__('2.2') '1.2' I expected: ' 1.2' -- ___ Python tracker

[issue15123] float().__format__() disregards given field width

2012-06-21 Thread Luís Gomes
Changes by Luís Gomes : -- nosy: luismsgomes priority: normal severity: normal status: open title: float().__format__() disregards given field width versions: Python 3.2 ___ Python tracker _

[issue15122] Add an option to always rewrite single-file mailboxes in-place.

2012-06-21 Thread R. David Murray
R. David Murray added the comment: It would be nice to do some research on what MUAs that support mbox format do here. (eg: mutt, pine if it still exists, etc). -- ___ Python tracker

[issue13698] Mailbox module should support other mbox formats in addition to mboxo

2012-06-21 Thread Petri Lehtinen
Changes by Petri Lehtinen : -- nosy: +petri.lehtinen versions: +Python 3.4 -Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mai

[issue14225] _cursesmodule compile error in OS X 32-bit-only installer build

2012-06-21 Thread Ned Deily
Ned Deily added the comment: P.S. All is not perfect. I initially missed re-running test_curses with the system ncurses library on OS X where ncurses is at 5.4 or with the 32-bit-installer which builds ncurses 5.5. When I did, test_curses failed as described in Issue15037. test_curses pass

[issue15122] Add an option to always rewrite single-file mailboxes in-place.

2012-06-21 Thread Petri Lehtinen
Changes by Petri Lehtinen : -- components: +email nosy: +barry, r.david.murray ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue15122] Add an option to always rewrite single-file mailboxes in-place.

2012-06-21 Thread Petri Lehtinen
New submission from Petri Lehtinen : This seems like a common feature request. Many people suffer from the fact that upon flush, the contents of single-file mailboxes are written into a new file which is then renamed over the old file. For example: #1599254, #5346, #7359, #7360, #9559, The o

[issue15121] devguide doesn't document all bug tracker components

2012-06-21 Thread Petri Lehtinen
New submission from Petri Lehtinen : http://docs.python.org/devguide/triaging.html#components The undocumented components are: - None - Cross-Build - email -- components: Devguide messages: 163321 nosy: ezio.melotti, petri.lehtinen priority: normal severity: normal status: open title: d

[issue15037] test_curses fails with OverflowError

2012-06-21 Thread Ned Deily
Ned Deily added the comment: I just ran into this problem on another platform. I believe the problem is due to a sign-extension bug in the ncurses library unget_wch function (see link below). It was apparently fixed in nurses 5.8; I've tested with the current ncurses 5.9 and test_ncurses no

[issue15120] Different behavior of html.parser.HTMLParser

2012-06-21 Thread Fred L. Drake, Jr.
Changes by Fred L. Drake, Jr. : -- nosy: +fdrake ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue15120] Different behavior of html.parser.HTMLParser

2012-06-21 Thread R. David Murray
Changes by R. David Murray : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue15119] Bug in ctypes bitfield layout?

2012-06-21 Thread Mark Dickinson
Mark Dickinson added the comment: > At a guess, BITS.M should therefore look like ofs=0:17, bits=1> instead. Refined guess: it should be . Tests for this issue should also cover cases like: _fields_ = [("A", c_int, 13), ("M", c_short, 5)] where M should end up being described as . ---

[issue15120] Different behavior of html.parser.HTMLParser

2012-06-21 Thread hansokumake
New submission from hansokumake : I tried this example from the documentation: from html.parser import HTMLParser class MyHTMLParser(HTMLParser): def handle_starttag(self, tag, attrs): print("Encountered a start tag:", tag) def handle_endtag(self, tag): print("Encountere

[issue15118] uname and other os functions should return a struct sequence instead of a tuple

2012-06-21 Thread Larry Hastings
Larry Hastings added the comment: Patch implementing struct sequences for os.uname() and os.times(). Those two are a slam dunk, so let's try and get 'em into 3.3. Patch includes docs! Maybe it's ready! Who knows! -- keywords: +patch Added file: http://bugs.python.org/file26065/lar

[issue9530] integer undefined behaviors

2012-06-21 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks, Amaury. I see a whole bunch of related issues, but none of them quite seems to capture this exact issue. So I've opened a new bug report: see issue 15119. -- ___ Python tracker

[issue15119] Bug in ctypes bitfield layout?

2012-06-21 Thread Mark Dickinson
New submission from Mark Dickinson : It looks as though there's a bug in the ctypes bitfield layout algorithm. After: >>> from ctypes import Structure, c_int, c_short >>> class BITS(Structure): ... _fields_ = [("A", c_int, 17), ("M", c_short, 1)] ... I get: >>> BITS.M which doesn't ma

[issue14769] Add test to automatically detect missing format units in skipitem()

2012-06-21 Thread Larry Hastings
Larry Hastings added the comment: Incorporates Benjamin's self-admitted pedantic changes ;-) Will it survive? Will it get checked in? Tune in... soon, I hope! -- Added file: http://bugs.python.org/file26064/larry.test_skipitem_parity.4.diff ___ Py

[issue14225] _cursesmodule compile error in OS X 32-bit-only installer build

2012-06-21 Thread STINNER Victor
STINNER Victor added the comment: Cool, thanks for the fix! -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue14626] os module: use keyword-only arguments for dir_fd and nofollow to reduce function count

2012-06-21 Thread Larry Hastings
Larry Hastings added the comment: New patch! What's new: * The big change: I removed the "fd=" parameters. Now, functions that accept either a path or a file descriptor simply take either as their "path" argument. I ran it by Guido and he thought it sounded fine, so I tried it--and I t

[issue9530] integer undefined behaviors

2012-06-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Issue3547 looks similar. -- nosy: +amaury.forgeotdarc ___ Python tracker ___ ___ Python-bugs-l

[issue9530] integer undefined behaviors

2012-06-21 Thread Mark Dickinson
Mark Dickinson added the comment: Meador: I see that you've been working on some ctypes issues; does the ctypes bitfield problem above fall under any of the existing issues, or should I open a new one? -- nosy: +meador.inge ___ Python tracker

[issue9530] integer undefined behaviors

2012-06-21 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks. It looks like that <<= report has uncovered a bug in the way that ctypes lays out bitfields: in the following, BITS.M should (I believe) look like: . Instead, ctypes is trying to store a bitfield starting at bit position 17 of a short, which doesn'

[issue12567] curses implementation of Unicode is wrong in Python 3

2012-06-21 Thread Ned Deily
Ned Deily added the comment: It turns out that the Unicode support introduced by this issue didn't build correctly on OS X, either silently failing to build (explaining the problem seen by Nicholas) or causing a compile error (as seen in Issue14225). This should be working OK (as of 3.3.0b1)

[issue14225] _cursesmodule compile error in OS X 32-bit-only installer build

2012-06-21 Thread Ned Deily
Ned Deily added the comment: It turns out that the Unicode support for curses did not build correctly on OS X at all. There were two issues: 1. On OS X, unlike many systems, does not supply separate libncurses and libncursesw in /usr/lib; same for libpanel/libpanelw. So the tests in setup.py