[issue46739] dataclasses __eq__ isn't logical

2022-02-14 Thread Craig Coleman
Craig Coleman added the comment: >From https://docs.python.org/3/reference/datamodel.html#object.__hash__ User-defined classes have __eq__() and __hash__() methods by default; with them, all objects compare unequal (except with themselves) and x.__hash__() returns an appropriate value s

[issue46739] dataclasses __eq__ isn't logical

2022-02-14 Thread Craig Coleman
Craig Coleman added the comment: Seems I learned a python lesson today. I've put myself back in python school and done some reading on a) the code behind dataclasses, b) PEP 557 and c) the doc'n for __eq__. After all the reading I've realised this I'd been making some as

[issue46739] dataclasses __eq__ isn't logical

2022-02-13 Thread Craig Coleman
New submission from Craig Coleman : In a test, dataclasses generate an __eq__ function appears to be wrong. @dataclass class C: pass class K: pass a = C() b = C() c = K() d = K() (a is b) # False (a == b) # True # Incorrect, Why? (c is d) # False (c == d) # False # Correct

[issue43302] shutil. copy file throws incorrect SameFileError on Google Drive File Stream

2021-02-22 Thread Coleman
New submission from Coleman : When using shuttle. copy file on the Google Drive File Stream file way, an incorrect SameFileError can happen. MWE (assuming foo.txt exists in your google drive G:\\): >>> f1 = 'G:\\My Drive\\foo.txt' >>> f2 = 'G:\\My D

[issue43298] Windows build issue

2021-02-22 Thread Coleman
Coleman added the comment: You can visit the link below and download the games without any problems. https://apkwill.com -- ___ Python tracker <https://bugs.python.org/issue43

[issue43298] Windows build issue

2021-02-22 Thread Coleman
Coleman added the comment: HI Msg -- nosy: +White1 ___ Python tracker <https://bugs.python.org/issue43298> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29683] _PyCode_SetExtra behaviour wrong on allocation failure and after realloc

2017-03-02 Thread Brian Coleman
Brian Coleman added the comment: I have created a pull request to backport the fix onto 3.6 here: https://github.com/python/cpython/pull/402 -- ___ Python tracker <http://bugs.python.org/issue29

[issue29683] _PyCode_SetExtra behaviour wrong on allocation failure and after realloc

2017-03-02 Thread Brian Coleman
Changes by Brian Coleman : -- pull_requests: +333 ___ Python tracker <http://bugs.python.org/issue29683> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29683] _PyCode_SetExtra behaviour wrong on allocation failure and after realloc

2017-03-01 Thread Brian Coleman
Brian Coleman added the comment: I have now added a Github pull request here: https://github.com/python/cpython/pull/376 -- ___ Python tracker <http://bugs.python.org/issue29

[issue29683] _PyCode_SetExtra behaviour wrong on allocation failure and after realloc

2017-03-01 Thread Brian Coleman
Changes by Brian Coleman : -- pull_requests: +312 ___ Python tracker <http://bugs.python.org/issue29683> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29683] _PyCode_SetExtra behaviour wrong on allocation failure and after realloc

2017-03-01 Thread Brian Coleman
New submission from Brian Coleman: On PyMem_Malloc failure, _PyCode_SetExtra should set co_extra->ce_size = 0. On PyMem_Realloc failure, _PyCode_SetExtra should set co_extra->ce_size = 0. On PyMem_Realloc success, _PyCode_SetExtra should set all unused slots in co_extra->ce_extras to

[issue9400] multiprocessing.pool.AsyncResult.get() messes up exceptions

2016-09-01 Thread Doug Coleman
Doug Coleman added the comment: Six years later and I'm still running into this exact bug with ``subprocess.CalledProcessError`` on python 2.7.12 when doing a ``multiprocessing.Pool.map`` and trying to catch errors from ``subprocess.check_output``. What's the reason it was never

[issue2073] asynchat push always sends 512 bytes (ignoring ac_out_buffer_size)

2009-03-31 Thread Mike Coleman
Mike Coleman added the comment: Just to confirm, the real problem here was that tiny packets were being sent out by default, and the obvious fix (altering ac_out_buffer_size) didn't work. Looking at the code, it appears that the change by Josiah Carlson (#64062) causes ac_out_buffer

[issue3392] subprocess fails in select when descriptors are large

2009-03-31 Thread Mike Coleman
Mike Coleman added the comment: My original report didn't mention it specifically, but I believe I was hitting the FD_SETSIZE limit that Frank mentioned. (Thanks for working on this!) -- ___ Python tracker <http://bugs.python.org/i

[issue3392] subprocess fails in select when descriptors are large

2009-03-11 Thread Mike Coleman
Mike Coleman added the comment: I also ran into this bug. In my case I'm able to work around this by "reserving" some fds at the start of my program (open 20 reserved fds, open 2000 real fds, close 20 reserved fds), but this is both a kludge and not a general solution. Pro

[issue5320] I/O error during one-liner gives bad diagnostic (and fails to return OS error status)

2009-02-19 Thread Mike Coleman
Mike Coleman added the comment: Also, as with the other python versions, notice that the error status is EXIT_SUCCESS (which it should not be). ___ Python tracker <http://bugs.python.org/issue5

[issue5321] I/O error during one-liner gives no (!) diagnostic (and fails to return OS error status)

2009-02-19 Thread Mike Coleman
New submission from Mike Coleman : $ python3.0 -c 'print((1, 2, 3))' > /dev/full || echo error status $ This command gives no indication whatsoever that anything has gone wrong. Following this with strace demonstrates that the interpreter is in fact ignoring these errors: 2589

[issue5320] I/O error during one-liner gives bad diagnostic (and fails to return OS error status)

2009-02-19 Thread Mike Coleman
New submission from Mike Coleman : $ python2.6 -c 'print 1, 2, 3' > /dev/full || echo error status close failed in file object destructor: Error in sys.excepthook: Original exception was: $ It seems like something other than blank lines should be printed here.

[issue5319] I/O error during one-liner fails to return OS error status

2009-02-19 Thread Mike Coleman
Mike Coleman added the comment: Oops, I should have used the old python print syntax. Nonetheless, the behavior is the same: $ python2.5 -c 'print 1, 2, 3' > /dev/full || echo error status close failed: [Errno 28] No space left on device $ -- components: +Int

[issue5319] I/O error during one-liner fails to return OS error status

2009-02-19 Thread Mike Coleman
New submission from Mike Coleman : $ python2.5 -c 'print((1, 2, 3))' > /dev/full || echo error status close failed: [Errno 28] No space left on device $ The above sequence should also output 'error status' before the next prompt. That is, python should not be returni

[issue727732] getpath.c-generated prefix wrong for Tru64 scripts

2009-02-11 Thread Mike Coleman
Mike Coleman added the comment: I'll go down to the cemetery and see if I can dig one up. :-) All of our Tru64 machines have been powered-down for over three years now, so as far as I'm concerned you can mark this one as no longer relevant.

[issue4731] suggest change to "Failed to find the necessary bits to build these modules" message

2008-12-23 Thread Mike Coleman
New submission from Mike Coleman : I was thrown by the "Failed to find the necessary bits to build these modules" message at the end of newer Python builds, and thought that this indicated that the Python executable itself was not built. That's arguably stupidity on my part,

[issue3262] re.split doesn't split with zero-width regex

2008-08-05 Thread Mike Coleman
Mike Coleman <[EMAIL PROTECTED]> added the comment: Okay. For what it's worth, note that my original 2004 patch for this (#988761) is completely backward compatible (a flag must be set in the call to get the new behavior). ___ Python trac

[issue3262] re.split doesn't split with zero-width regex

2008-07-16 Thread Mike Coleman
Mike Coleman <[EMAIL PROTECTED]> added the comment: I think it's probably both. The original design was incorrect, though this probably wasn't apparent to the designer. But as a significant user of 're', it really stands out as a problem.

[issue3262] re.split doesn't split with zero-width regex

2008-07-07 Thread Mike Coleman
Mike Coleman <[EMAIL PROTECTED]> added the comment: I don't want to discourage you, but #852532, which is essentially the same bug report, was closed--without explanation--as 'wont fix' in April, after four-plus years. I wish you good luck--this is an important and irritati

[issue3262] re.split doesn't split with zero-width regex

2008-07-07 Thread Mike Coleman
Changes by Mike Coleman <[EMAIL PROTECTED]>: -- nosy: +mkc ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3262> ___ ___ Python-bugs

[issue852532] ^$ won't split on empty line

2008-04-14 Thread Mike Coleman
Mike Coleman <[EMAIL PROTECTED]> added the comment: I'd feel better about this bug being 'wont fix'ed if I had a sense that several people considered the patch and thought that it sucked. At the moment, it seems more like it just fell off of the end without ever being s

[issue2073] asynchat push always sends 512 bytes (ignoring ac_out_buffer_size)

2008-03-18 Thread Mike Coleman
Mike Coleman <[EMAIL PROTECTED]> added the comment: [Tracker bounced this the first time...] > I haven't run it, but just browsing the trunk source, it appears to > still be present. In fact, asynchat.py and asyncore.py have > apparently not been changed in two years. A

[issue2073] asynchat push always sends 512 bytes (ignoring ac_out_buffer_size)

2008-02-13 Thread Mike Coleman
Mike Coleman added the comment: The other place I see the constant is in asyncore.py: class dispatcher_with_send(dispatcher): def __init__(self, sock=None, map=None): dispatcher.__init__(self, sock, map) self.out_buffer = '' def initiate_send(self):

[issue2073] asynchat push always sends 512 bytes (ignoring ac_out_buffer_size)

2008-02-13 Thread Mike Coleman
Mike Coleman added the comment: The value is used there, but this is not effective in causing larger packets to be sent, which I noticed by watching with strace. I think the reason for this is that 'refill_buffer' will only make at most one call to simple_producer.more, and that

[issue2073] asynchat push always sends 512 bytes (ignoring ac_out_buffer_size)

2008-02-11 Thread Mike Coleman
New submission from Mike Coleman: In asynchat, 'push' doesn't specify 'buffer_size', so the default of 512 is used. This is bogus and causes poor performance--it should use the value of 'ac_out_buffer_size' instead. -- components: Library (Lib)

[issue852532] ^$ won't split on empty line

2007-09-03 Thread Mike Coleman
Mike Coleman added the comment: Well, I think we can conclude that it's expected by *them*. :-) I still find it surprising, and it somewhat lessens the utility of re.split for my use cases. (I think re.finditer may also suffer from the same problem, but I don't recall.) If you l