[issue1392] py3k-pep3137: str(bytes()) and str(buffer()) should raise TypeError patch

2007-11-05 Thread Guido van Rossum
Guido van Rossum added the comment: A compromise I could live with: add a command line option that makes it a warning. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/

[issue1392] py3k-pep3137: str(bytes()) and str(buffer()) should raise TypeError patch

2007-11-05 Thread Guido van Rossum
Guido van Rossum added the comment: The error message is fine, though you could drop the word "Calling" without loss of information. ;-) Also, most warnings don't seem to use a trailing period. Perhaps you could expand this to also add a trap in the comparison function when Py{S

[issue1392] py3k-pep3137: str(bytes()) and str(buffer()) should raise TypeError patch

2007-11-05 Thread Guido van Rossum
Guido van Rossum added the comment: > It's sounds like a reasonable idea. But first I'm going to hit the down > with my gf and meet some friends. Cu later! No! You're not allowed to have a life! :-) (And no hacking drunk, either. :-) > PS: In my humble opinion Amaury F

[issue1384] Windows fix for inspect tests

2007-11-05 Thread Guido van Rossum
Guido van Rossum added the comment: Shouldn't this use os.path.normcase() instead of testing for nt and using lower()? -- nosy: +gvanrossum __ Tracker <[EMAIL PROTECTED]> <http://bugs.python

[issue1385] hmac module violates RFC for some hash functions, e.g. sha512

2007-11-05 Thread Guido van Rossum
Changes by Guido van Rossum: -- assignee: -> gregory.p.smith nosy: +gregory.p.smith __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1385> __ ___ P

[issue1389] py3k-pep3137: struct module is leaking references

2007-11-05 Thread Guido van Rossum
Guido van Rossum added the comment: Committed revision 58871. Finding this took me half a day. It was not a real leak; it was just filling the character cache in stringobject.c slowly with random data. -- nosy: +gvanrossum resolution: -> fixed status: open ->

[issue1395] py3k: duplicated line endings when using read(1)

2007-11-05 Thread Guido van Rossum
Guido van Rossum added the comment: Wow, thanks! This is not just a bug on Windows -- it is a bug in the TextIOWrapper code that is just more likely on Windows. It is easily reproduced on Linux too: >>> f = open("@", "wb")>>> f.write(b"a\r\n") 6 &

[issue1392] py3k-pep3137: str(bytes()) and str(buffer()) should raise TypeError patch

2007-11-05 Thread Guido van Rossum
Guido van Rossum added the comment: > Updates: > * Added class BytesWarning(Warning) > * Added -b/-bb command line args and Py_BytesWarningFlag > * issue PyErr_WarnEx(PyExc_BytesWarning) when Py_BytesWarningFlag is set. > * Added warning filter for BytesWarning that raises

[issue1395] py3k: duplicated line endings when using read(1)

2007-11-06 Thread Guido van Rossum
Guido van Rossum added the comment: IMO you shouldn't read another chunk when the last character you've seen is \r; instead, you should set a flag so that on the next read, you'll ignore an initial \n. The flag should be made of the tell/seek state as well. (The problem with

[issue1397] py3k-pep3137: failing unit test test_bsddb

2007-11-06 Thread Guido van Rossum
Guido van Rossum added the comment: I've seen this too occasionally. Greg, can you look at this? -- assignee: -> gregory.p.smith nosy: +gregory.p.smith __ Tracker <[EMAIL PROTECTED]> <http://bugs.pyt

[issue1396] py3k-pep3137: patch for mailbox

2007-11-06 Thread Guido van Rossum
Guido van Rossum added the comment: If Yhgls is twouters, I think he's on vacation. Possibly Thomas appears on the blame list because he did some big integrations. Is he on the blame list for the trunk as well? Anyway I want this over with so I'll look into it. -- nosy: +

[issue1394] simple patch, improving unreachable bytecode removing

2007-11-06 Thread Guido van Rossum
Changes by Guido van Rossum: -- nosy: +gvanrossum __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1394> __ ___ Python-bugs-list mailing list Unsubs

[issue1393] function comparing lacks NotImplemented error

2007-11-06 Thread Guido van Rossum
Guido van Rossum added the comment: Odd. I'll look into it. -- assignee: -> gvanrossum nosy: +gvanrossum priority: -> normal __ Tracker <[EMAIL PROTECTED]> <http://bugs.

[issue1293] Trailing slash in sys.path cause import failure

2007-11-06 Thread Guido van Rossum
Guido van Rossum added the comment: I see several problems with this, but there's light at the end of the tunnel. (1) Don't use s#; it will allow null bytes in the string, which we don't want. (2) Put the entire trailing slash removal inside #ifdef MS_WINDOWS. (3) Careful! It

[issue1293] Trailing slash in sys.path cause import failure

2007-11-06 Thread Guido van Rossum
Changes by Guido van Rossum: -- resolution: accepted -> __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1293> __ ___ Python-bugs-list mailing li

[issue1396] py3k-pep3137: patch for mailbox

2007-11-06 Thread Guido van Rossum
Guido van Rossum added the comment: I fixed the remaining two errors in r58882. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1396> __ ___ Python-bugs-list

[issue1395] py3k: duplicated line endings when using read(1)

2007-11-06 Thread Guido van Rossum
Guido van Rossum added the comment: > In my opinion the check for \r should only happen when os.linesep or > newline starts with \r. On Unix with standard newline the \r should be > treated as every other char. No: it is not dependent on os.linesep but on the newline parameter passe

[issue1293] Trailing slash in sys.path cause import failure

2007-11-06 Thread Guido van Rossum
Guido van Rossum added the comment: > How do you like > #ifdef MS_WINDOWS > /* Remove trailing / and \ - Windows' stat doesn't like them > - but > * keep the trailing slash of C:/ > */ > > Py

[issue1372] zlibmodule.c: int overflow in PyZlib_decompress

2007-11-06 Thread Guido van Rossum
Changes by Guido van Rossum: -- keywords: +64bit resolution: accepted -> __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1372> __ ___ Python-bugs-li

[issue1293] Trailing slash in sys.path cause import failure

2007-11-06 Thread Guido van Rossum
Guido van Rossum added the comment: > Another patch that uses os.path.normpath. Sorry, I really don't like to be importing os.path in order to be able to process the path used for an import. __ Tracker <[EMAIL PROTECTED]> <http://bugs.pyt

[issue1395] py3k: duplicated line endings when using read(1)

2007-11-07 Thread Guido van Rossum
Guido van Rossum added the comment: On 11/7/07, Christian Heimes <[EMAIL PROTECTED]> wrote: > > Christian Heimes added the comment: > > By the way what happened to the SoC project related to Python's new IO > subsystem? IIRC somebody was working on a C

[issue1399] XML codec

2007-11-07 Thread Guido van Rossum
Guido van Rossum added the comment: I think it's good to add this; I don't have time to review though. -- nosy: +gvanrossum __ Tracker <[EMAIL PROTECTED]> <http://bugs.p

[issue1395] py3k: duplicated line endings when using read(1)

2007-11-07 Thread Guido van Rossum
Guido van Rossum added the comment: Somebody needs to reverse-engineer the invariants applying to the various instance variables and add comments explaining them, and showing how they are maintained by each call. __ Tracker <[EMAIL PROTECTED]>

[issue1395] py3k: duplicated line endings when using read(1)

2007-11-07 Thread Guido van Rossum
Guido van Rossum added the comment: This looks promising, but my head hurts when I try to understand the code that's already there and think about whether your patch will always do the right thing... I'll look more later. Regarding "universal newlines without translation:"

[issue1291] test_resource fails on recent linux systems (

2007-11-07 Thread Guido van Rossum
Guido van Rossum added the comment: It's fine to fix this in 2.5.2, as it is just a test. (IMO you can just copy the 2.6 test_resource.py into 2.5.2, assuming that works.) __ Tracker <[EMAIL PROTECTED]> <http://bugs.python

[issue1293] Trailing slash in sys.path cause import failure

2007-11-07 Thread Guido van Rossum
Changes by Guido van Rossum: -- resolution: -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1293> __ ___ Python

[issue1293] Trailing slash in sys.path cause import failure

2007-11-07 Thread Guido van Rossum
Guido van Rossum added the comment: Works for me! On Nov 7, 2007 6:08 AM, Christian Heimes <[EMAIL PROTECTED]> wrote: > > Christian Heimes added the comment: > > Brett Cannon wrote: > > Modules/getpath.c:joinpath() I think does what you want in C. > > I don&#x

[issue1704621] interpreter crash when multiplying large lists

2007-11-07 Thread Guido van Rossum
Guido van Rossum added the comment: Shouldn't this be fixed before 2.5.2 goes out? -- assignee: -> nnorwitz nosy: +gvanrossum priority: normal -> high _ Tracker <[EMAIL PROTECTED]> <http://bugs.pyt

[issue1399] XML codec

2007-11-07 Thread Guido van Rossum
Changes by Guido van Rossum: -- nosy: -gvanrossum __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1399> __ ___ Python-bugs-list mailing list Unsubs

[issue1395] py3k: duplicated line endings when using read(1)

2007-11-07 Thread Guido van Rossum
Guido van Rossum added the comment: Cool. How hard do you think it would be to extend your work on StringIO into a translation of TextIOWrapper into C? On Nov 7, 2007 3:55 PM, Alexandre Vassalotti <[EMAIL PROTECTED]> wrote: > On 11/7/07, Guido van Rossum <[EMAIL PROTECTED]> wro

[issue1144] parsermodule validation out of sync with Grammar

2007-11-08 Thread Guido van Rossum
Guido van Rossum added the comment: No, I didn't write the parser module (which isn't the parser, just a wrapper to make it accessible from Python). -- assignee: gvanrossum -> fdrake nosy: +fdrake __ Tracker <[EMAIL PROTECTED]> <

[issue1393] function comparing lacks NotImplemented error

2007-11-08 Thread Guido van Rossum
Guido van Rossum added the comment: It's still odd though. Why does object() == Anything() pass control to the right hand side, while (lambda: None) == Anything() doesn't? There's no definition of equality in PyFunction_Type, so it would seem to fall back on the definition in Py

[issue1720390] Remove backslash escapes from tokenize.c.

2007-11-08 Thread Guido van Rossum
Guido van Rossum added the comment: FWIW, I'm +1 on the part of this patch that disables \u in raw strings. I just had a problem with a doctest that couldn't be run in verbose mode because \u was being interpreted in raw mode... But I'm still solidly -1 on al

[issue1377] test_import breaks on Linux

2007-11-08 Thread Guido van Rossum
Guido van Rossum added the comment: I wouldn't close this until it's fixed. -- status: closed -> open __ Tracker <[EMAIL PROTECTED]> <http://bug

[issue1402] Interpreter cleanup: order of _PyGILState_Fini and PyInterpreterState_Clear

2007-11-08 Thread Guido van Rossum
Guido van Rossum added the comment: Do you have a patch? Then we could consider fixing this in 2.5.2. -- nosy: +gvanrossum __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/

[issue1395] py3k: duplicated line endings when using read(1)

2007-11-08 Thread Guido van Rossum
Guido van Rossum added the comment: > Considering that test_csv is failing on windows even without any changes > related to this issue, I looked at it and came up with this patch: > > - > Index: Lib/t

[issue1400] Py3k's print() flushing problem

2007-11-08 Thread Guido van Rossum
Guido van Rossum added the comment: I don't think anything was accepted yet. -- nosy: +gvanrossum resolution: accepted -> __ Tracker <[EMAIL PROTECTED]> <http://bugs.pyt

[issue1351] Add getsize() to io instances

2007-11-08 Thread Guido van Rossum
Guido van Rossum added the comment: Sorry, I still don't like it. You'll have to come up with a darned good use case to justify this. __ Tracker <[EMAIL PROTECTED]> <http://bugs.p

[issue1409] new keyword-only function parameters interact badly with nested functions

2007-11-08 Thread Guido van Rossum
Guido van Rossum added the comment: I think I agree this is a bug. Who is setting all bugs to 'accepted'? -- nosy: +gvanrossum resolution: accepted -> __ Tracker <[EMAIL PROTECTED]> <http://bug

[issue1414] Fix for refleak tests

2007-11-09 Thread Guido van Rossum
Guido van Rossum added the comment: Hm, I was hoping more for patches to the C code that would make these initializations reentrant (e.g. by testing a flag in C that says "I'm already initialized"). __ Tracker <[EMAIL PROTECTED]> <http://b

[issue1403] py_compile and compileall need unit tests

2007-11-09 Thread Guido van Rossum
Guido van Rossum added the comment: Why is it still open? -- nosy: +gvanrossum __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1403> __ ___ Python-bugs-

[issue1405] Garbage collection not working correctly in Python 2.3

2007-11-09 Thread Guido van Rossum
Guido van Rossum added the comment: How do you know the memory isn't given back? It may be available for reallocation within Python, just not given back to the operating system. That's not necessarily a leak or a bug; that could just be heap fragmentation. There's nothing you

[issue1410] BaseHTTPServer cannot accept Unicode data

2007-11-09 Thread Guido van Rossum
Changes by Guido van Rossum: -- resolution: -> invalid status: open -> closed __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1410> __ ___ Python

[issue1407] [performance] Too many closed() checkings

2007-11-09 Thread Guido van Rossum
Guido van Rossum added the comment: To find out what really happens, use pdb to step through the example. This gives much better insight than adding a printf() call to PyObject_Call(). I've notice myself when stepping through I/O that there are a lot of checks for closed -- this may have

[issue1416] @prop.setter decorators

2007-11-09 Thread Guido van Rossum
New submission from Guido van Rossum: Here's an implementation of the idea I floated recently on python-dev (Subject: Declaring setters with getters). This implements the kind of syntax that I believe won over most folks in the end: @property def foo(self): ... @foo.setter de

[issue1405] Garbage collection not working correctly in Python 2.3

2007-11-10 Thread Guido van Rossum
Changes by Guido van Rossum: -- resolution: -> invalid status: open -> closed __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1405> __ ___ Python

[issue1416] @prop.setter decorators

2007-11-10 Thread Guido van Rossum
Guido van Rossum added the comment: propset2.diff is a new version that improves upon the heuristic for making the deleter match the setter: when changing setters, if the old deleter is the same as the old setter, it will replace both the deleter and setter. This diff is relative to the 2.6

[issue1416] @prop.setter decorators

2007-11-10 Thread Guido van Rossum
Guido van Rossum added the comment: propset3.diff removes the hack that makes the deleter equal to the setter when no separate deleter has been specified. If you want a single method to be used as setter and deleter, write this: @foo.setter @foo.deleter def foo(self, value=None): ... Added

[issue1416] @prop.setter decorators

2007-11-10 Thread Guido van Rossum
Guido van Rossum added the comment: Checked into trunk as revision 58929. -- resolution: -> accepted status: open -> closed __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue1415] py3k: pythonw.exe fails because std streams a missing

2007-11-11 Thread Guido van Rossum
Guido van Rossum added the comment: Hmm... In internal_close() there's still a test for self->fd >= 0. I'm not sure if this is an oversight or intentional. Also, I don't understand under what circumstances fds < 0 can occur. I presume this is only on Windows. Can you p

[issue1428] Update to property.__doc__

2007-11-11 Thread Guido van Rossum
Guido van Rossum added the comment: I would use _x instead of __x. Otherwise looks good. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1428> __ ___ Python-bugs-

[issue1421] python.org: outdated and false information

2007-11-12 Thread Guido van Rossum
Guido van Rossum added the comment: BTW, what's the best way of reporting bugs in python.org? -- nosy: +gvanrossum __ Tracker <[EMAIL PROTECTED]> <http://bugs.python

[issue1422] Writing to an invalid fd doesn't raise an exception

2007-11-12 Thread Guido van Rossum
Guido van Rossum added the comment: I don't think this is worth fixing; you'll get an I/O error as soon as I/O is attempted, which is upon the first read() for input, or upon the firsh (implicit or explicit) flush() on output. You can't tell whether a fd is valid or not without

[issue1420] Unicode literals in tokenize.py and tests.

2007-11-12 Thread Guido van Rossum
Guido van Rossum added the comment: I'm with Martin. Adam, why do you think tokenize should use bytes instead of text strings? -- nosy: +gvanrossum __ Tracker <[EMAIL PROTECTED]> <http://bugs.python

[issue1423] wave sunau aifc 16bit errors

2007-11-12 Thread Guido van Rossum
Guido van Rossum added the comment: What software do you use to play the sample? Is it perhaps ignoring the nchannels value from the header? -- nosy: +gvanrossum __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/

[issue1424] py3k: readline and rlcompleter doesn't list choices

2007-11-12 Thread Guido van Rossum
Guido van Rossum added the comment: Can't reproduce this (Ubuntu dapper). I get the expected output. -- nosy: +gvanrossum __ Tracker <[EMAIL PROTECTED]> <http://bugs.python

[issue1426] readline module needs a review

2007-11-12 Thread Guido van Rossum
Guido van Rossum added the comment: Go for it! -- nosy: +gvanrossum priority: high -> normal __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1426> __

[issue1419] ssl module version 1.10 causes TypeError when accepting connection

2007-11-12 Thread Guido van Rossum
Guido van Rossum added the comment: BTW Bill, how's the 3.0 port of SSL going? -- nosy: +gvanrossum __ Tracker <[EMAIL PROTECTED]> <http://bugs.python

[issue1420] Unicode literals in tokenize.py and tests.

2007-11-12 Thread Guido van Rossum
Guido van Rossum added the comment: Got it. Checked in as revision 58951. -- resolution: -> accepted status: open -> closed __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue1414] Fix for refleak tests

2007-11-12 Thread Guido van Rossum
Guido van Rossum added the comment: Please check in the frozen-related fixes. Your changes to test_tcl break that test even when run without -R! For test_pkg, I would rather see a fix that undoes all the changes to sys.modules (note that it already restores sys.path and deletes the files it&#

[issue1415] py3k: pythonw.exe fails because std streams a missing

2007-11-12 Thread Guido van Rossum
Guido van Rossum added the comment: IMO you don't need the 'closed' flag and you should continue to test for fd < 0. Whether it's -1 or -2, you still can't write to it... __ Tracker <[EMAIL PROTECTED]>

[issue1414] Fix for refleak tests

2007-11-12 Thread Guido van Rossum
Guido van Rossum added the comment: If that makes the test pass with and without -R::, go for it! On Nov 12, 2007 11:14 AM, Christian Heimes <[EMAIL PROTECTED]> wrote: > > Christian Heimes added the comment: > > How do you like; > > class TestPkg(unittest.TestCase)

[issue1704621] interpreter crash when multiplying large lists

2007-11-12 Thread Guido van Rossum
Guido van Rossum added the comment: Fixed in 2.5 branch (to be released with 2.5.2). Unit test added to 2.6 (trunk). -- resolution: -> accepted status: open -> closed _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.o

[issue1415] py3k: pythonw.exe fails because std streams a missing

2007-11-12 Thread Guido van Rossum
Guido van Rossum added the comment: I don't understand. When does the difference matter? On Nov 12, 2007 10:14 AM, Christian Heimes <[EMAIL PROTECTED]> wrote: > > Christian Heimes added the comment: > > W/o the closed flag it's impossible to distinguish betwee

[issue1415] py3k: pythonw.exe fails because std streams a missing

2007-11-12 Thread Guido van Rossum
Guido van Rossum added the comment: > > I don't understand. When does the difference matter? > > When the check for fd < 0 is removed from fileio_init() there is no way > to tell if fd < 0 means fd closed or invalid fd. I still don't understand. Why do you need

[issue1415] py3k: pythonw.exe fails because std streams a missing

2007-11-12 Thread Guido van Rossum
Guido van Rossum added the comment: > I don't want to treat the fd differently. I want to return a sensible > error message that is different from "file closed" when the fd is invalid. Doesn't sound too important. Anyway, from which call do you want to issue different

[issue1265] pdb bug with "with" statement

2007-11-12 Thread Guido van Rossum
Guido van Rossum added the comment: Good work indeed! Here's another way: >>> class C: ... @property ... def __class__(self): return D ... >>> class D: pass ... >>> C().__class__ >>> __ Tracker <[EMAIL P

[issue1265] pdb bug with "with" statement

2007-11-12 Thread Guido van Rossum
Guido van Rossum added the comment: BTW: if you can show (e.g. with your unittest) that this indeed breaks in 2.6 and 2.5, please do backport it. BTW**2: I've noticed that abc.py's __instancecheck__ gets called a lot at times when I don't expect it. Can you rese

[issue1265] pdb bug with "with" statement

2007-11-12 Thread Guido van Rossum
Guido van Rossum added the comment: PPSS. When backporting, a note in Misc/NEWS is appreciated. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1265> __ ___ Pyth

[issue1438] Calling base class methods is slow due to __instancecheck__ override in abc.py

2007-11-13 Thread Guido van Rossum
New submission from Guido van Rossum: [Guido] > > I've noticed that abc.py's __instancecheck__ gets called a lot > > at times when I don't expect it. Can you research this a bit? [Amaury] > In classobject.c, method_call() calls PyObject_IsInstance() on the

[issue1438] Calling base class methods is slow due to __instancecheck__ override in abc.py

2007-11-13 Thread Guido van Rossum
Changes by Guido van Rossum: -- assignee: -> gvanrossum __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1438> __ ___ Python-bugs-list mailing li

[issue1433] marshal roundtripping for unicode

2007-11-13 Thread Guido van Rossum
Guido van Rossum added the comment: I think this is unavoidable. Depending on whether you happen to be using a narrow or wide unicode build of Python, \U may be turned into a pair of surrogates anyway. It's not just marshal that's not roundtripping; the utf-8 codec has the

[issue1434] SocketServer creates non-blocking files

2007-11-13 Thread Guido van Rossum
Guido van Rossum added the comment: Please provide a self-contained example program that behaves correctly in 2.4.3 and fails in 2.4.4 if you want us to investigate this further. How does it behave with 2.5.1? -- nosy: +gvanrossum __ Tracker <[EM

[issue1435] Support for multiple handlers for the "with" statement

2007-11-13 Thread Guido van Rossum
Guido van Rossum added the comment: I don't think the added syntactic complexity is worth the relatively rare use case, especially since there's already an implementation of nested() in the contextlib library. -- nosy: +gvanrossum resolution: -> wont fix status: o

[issue1436] logging.config.fileConfig, NameError: name 'RotatingFileHandler' is not defined

2007-11-13 Thread Guido van Rossum
Guido van Rossum added the comment: Somebody please propose a patch! -- nosy: +gvanrossum __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1436> __ ___

[issue1342] Crash on Windows if Python runs from a directory with umlauts

2007-11-13 Thread Guido van Rossum
Guido van Rossum added the comment: If this doesn't cause any problems on other platforms, go for it. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1342> __ __

[issue1134] Parsing a simple script eats all of your memory

2007-11-13 Thread Guido van Rossum
Guido van Rossum added the comment: Amaury, can you have a look at this? I think it's a bug in tok_nextc() in tokenizer.c. -- assignee: nnorwitz -> amaury.forgeotdarc nosy: +amaury.forgeotdarc __ Tracker <[EMAIL PROTECTED]> <http:

[issue1134] Parsing a simple script eats all of your memory

2007-11-13 Thread Guido van Rossum
Guido van Rossum added the comment: Is this also broken in the 3.0a1 release? If not, it might be useful to try to find the most recent rev where it's not broken. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python

[issue1440] Checks for PySys_GetObject("std???") == Py_None

2007-11-14 Thread Guido van Rossum
Guido van Rossum added the comment: The patch looks okay, but I just thought of something -- why not make sys.stdout and friends be undefined (i.e. NULL) instead of setting them to None? That way this patch isn't necessary and you only need one small change to builtin_print() -- which you

[issue1439] proposed 3000 patch for socket.py - "socket GC worries"

2007-11-14 Thread Guido van Rossum
Guido van Rossum added the comment: Crys, can you test this on Windows and if it does, assign back to me? -- assignee: gvanrossum -> tiran nosy: +tiran __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.o

[issue1378] fromfd() and dup() for _socket on WIndows

2007-11-14 Thread Guido van Rossum
Guido van Rossum added the comment: Never mind. I must've searched for fromdf. Crys, I think this is good to go into 2.6 and be merged into 3.0. Then in 3.0 we can simplify Bill Janssen's patch further. -- assignee: -> tiran __ Tr

[issue619475] C3 MRO algorithm implementation

2007-11-14 Thread Guido van Rossum
Guido van Rossum added the comment: BTW for reference, see http://www.python.org/download/releases/2.3/mro/ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/is

[issue1378] fromfd() and dup() for _socket on WIndows

2007-11-14 Thread Guido van Rossum
Guido van Rossum added the comment: I'd like to see this applied, HOWEVER I'm confused. I don't see any mention of fromfd in the patch except in a comment. Now, in 3.0, fromfd() is implemented in socket.py using os.dup(); but in 2.6 i don't see it there either. What'

[issue1440] Checks for PySys_GetObject("std???") == Py_None

2007-11-14 Thread Guido van Rossum
Guido van Rossum added the comment: Go for it. On Nov 14, 2007 10:39 AM, Christian Heimes <[EMAIL PROTECTED]> wrote: > > Christian Heimes added the comment: > > Guido van Rossum wrote: > > The patch looks okay, but I just thought of something -- why not make >

[issue1378] fromfd() and dup() for _socket on WIndows

2007-11-14 Thread Guido van Rossum
Guido van Rossum added the comment: I'm disappointed that this doesn't implement socket.fromfd() properly. Perhaps fromfd() needs to be implemented in socketmodule.c? Also, the whole mess with the _base slot can be gotten rid of; accept() can use the dup() meth

[issue1443] Magic class member variable initialization with lists

2007-11-14 Thread Guido van Rossum
Guido van Rossum added the comment: Go ask on c.l.py why this is not a bug. -- nosy: +gvanrossum resolution: -> invalid status: open -> closed __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue1378] fromfd() and dup() for _socket on WIndows

2007-11-14 Thread Guido van Rossum
Guido van Rossum added the comment: > On Windows socket.fromfd() is not possible. Socket handlers and file > descriptors are different types using different API methods. Other > examples for the discrepancy are select.select() and select.poll(). On > Windows they don't work on f

[issue1440] Checks for PySys_GetObject("std???") == Py_None

2007-11-14 Thread Guido van Rossum
Guido van Rossum added the comment: I take it back. You can check this in. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1440> __ ___ Python-bugs-list

[issue1439] proposed 3000 patch for socket.py - "socket GC worries"

2007-11-14 Thread Guido van Rossum
Guido van Rossum added the comment: Committed revision 58970 (with slight changes). Bill, you can now submit your SSL code for review. -- assignee: gvanrossum -> tiran resolution: -> accepted status: open -> closed __ Tracker <[EMAIL PROTE

[issue1378] fromfd() and dup() for _socket on WIndows

2007-11-14 Thread Guido van Rossum
Guido van Rossum added the comment: Crys, did you actually run the tests for the 3.0 port of the patch? I think accept() is broken, as it checks for _can_dup_socket and will attempt to call os.dup(). I'm thinking that we should change the C class to not create new objects on accept() an

[issue1378] fromfd() and dup() for _socket on WIndows

2007-11-14 Thread Guido van Rossum
Guido van Rossum added the comment: Here's a new version along the lines I described. Please test on Windows. It works on Linux and OSX. What this includes: - the dup-on-windows implementation by R Oudkerk, with the GetLastError() suggestion from Thomas Heller. - Replace the C implementa

[issue1378] fromfd() and dup() for _socket on WIndows

2007-11-14 Thread Guido van Rossum
Changes by Guido van Rossum: Removed file: http://bugs.python.org/file8747/socket.diff __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1378> __ ___ Python-bugs-

[issue1378] fromfd() and dup() for _socket on WIndows

2007-11-14 Thread Guido van Rossum
Guido van Rossum added the comment: New version of socket.diff. The only change is better docstrings for accept() and dup(). Added file: http://bugs.python.org/file8748/socket.diff __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/

[issue1378] fromfd() and dup() for _socket on WIndows

2007-11-14 Thread Guido van Rossum
Guido van Rossum added the comment: PS. socket.diff is for 3.0. I'll backport once this is accepted. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1378> __ __

[issue1144] parsermodule validation out of sync with Grammar

2007-11-15 Thread Guido van Rossum
Guido van Rossum added the comment: Can you submit a unittest that catches this? Then I can check in the fix. -- assignee: fdrake -> gvanrossum __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.o

[issue1144] parsermodule validation out of sync with Grammar

2007-11-15 Thread Guido van Rossum
Guido van Rossum added the comment: Committed revision 58987. -- status: open -> closed __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1144> __ ___ P

[issue1378] fromfd() and dup() for _socket on WIndows

2007-11-15 Thread Guido van Rossum
Guido van Rossum added the comment: roudkerk, can you turn that suggestion into a proper patch? __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1378> __ ___ Pyth

[issue1378] fromfd() and dup() for _socket on WIndows

2007-11-15 Thread Guido van Rossum
Guido van Rossum added the comment: Forgot to upload socket3.diff. Added file: http://bugs.python.org/file8759/socket3.diff __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1378> __Index: Include/

[issue1378] fromfd() and dup() for _socket on WIndows

2007-11-15 Thread Guido van Rossum
Guido van Rossum added the comment: socket3.diff builds on socket2.diff: - Rename socket class to Socket; add socket() as a factory function. - Implement roudkerk's suggestion of using a duplicate socket in makefile() to get rid of the manual reference counting. Yay! Note: this dinter

[issue1378] fromfd() and dup() for _socket on WIndows

2007-11-15 Thread Guido van Rossum
Guido van Rossum added the comment: socket2.diff makes dup() a module-level function in _socket (and hence in socket.py) and uses that to implement fromfd() in socket.py. No changes otherwise compared to py3k_another_socket.patch. Added file: http://bugs.python.org/file8758/socket2.diff

<    2   3   4   5   6   7   8   9   10   11   >