[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

[issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters

2021-12-14 Thread Craig Holmquist
Change by Craig Holmquist : -- nosy: +craigh ___ Python tracker <https://bugs.python.org/issue46006> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45641] Error In opening a file through Idle

2021-10-28 Thread Craig Dowkes
Craig Dowkes added the comment: Same issue for me on Mac OS 12.0.1 hoping for a quick solution to this -- nosy: +craig.dowkes ___ Python tracker <https://bugs.python.org/issue45

[issue45642] Unable to save

2021-10-28 Thread Craig Dowkes
New submission from Craig Dowkes : I recently updated to Mac OS Montery 12.0.1 and am now unable to open or save any idle files. Running on a 2021 M1 iMac. I get the save dialogue box but then also an error box as shown in the attached picture. Failed to connect to the open and save panel

[issue32689] shutil.move raises AttributeError if first argument is a pathlib.Path object and destination is a directory

2018-01-28 Thread Craig Holmquist
Craig Holmquist added the comment: In my test, the second call to path.absolute() is just returning the same result as the first call, which is what I would expect (as you say, the path object doesn't update automatically). However, your output shows it returning '/Users/e/Devel

[issue32689] shutil.move raises AttributeError if first argument is a pathlib.Path object and destination is a directory

2018-01-27 Thread Craig Holmquist
New submission from Craig Holmquist : >>> import os, pathlib, shutil >>> os.mkdir('test1') >>> os.mkdir('test2') >>> path = pathlib.Path('test1') >>> shutil.move(path, 'test2') Traceback (most recent call l

[issue31658] xml.sax.parse won't accept path objects

2017-10-01 Thread Craig Holmquist
New submission from Craig Holmquist : >>> import xml.sax >>> import pathlib [...] >>> xml.sax.parse(pathlib.Path('path/to/file'), handler) Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.6/xml/sax/__init__.py

[issue6090] zipfile: Bad error message when zipping a file with timestamp before 1980

2017-08-15 Thread Craig McQueen
Craig McQueen added the comment: One ongoing weakness I see with this situation is that it's difficult to code a suitable work-around if a user wants to zip files that have a date < 1980 (e.g. to zip it with a datestamp of 1-Jan-1980). https://stackoverflow.com/q/45703747/60075 I am t

[issue24502] OS X installer provides flat sub-packages with no version numbers

2017-08-03 Thread Shea Craig
Shea Craig added the comment: For what it's worth, I manage a lot of Macs and know a lot of people in similar roles at major enterprises. We greatly prefer installer packages for automated installation, and end up having to repackage installer apps routinely for products that don'

[issue31049] macOS Python package receipts do not have version numbers

2017-07-26 Thread Shea Craig
New submission from Shea Craig: The Python installer package for macOS is versioned, however, the included sub packages have no version information. This results in the receipts having no version. Many enterprise software management tools rely on the receipt information to determine whether

[issue11129] logging: allow multiple entries in qualname config

2017-07-24 Thread Craig McQueen
Changes by Craig McQueen : -- nosy: +cmcqueen1975 ___ Python tracker <http://bugs.python.org/issue11129> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23407] os.walk always follows Windows junctions

2017-03-10 Thread Craig Holmquist
Changes by Craig Holmquist : Added file: http://bugs.python.org/file46718/issue23407-5.patch ___ Python tracker <http://bugs.python.org/issue23407> ___ ___ Python-bug

[issue15290] setAttribute() can fail

2017-03-05 Thread Craig Rodrigues
Craig Rodrigues added the comment: Same issue was brought up in http://bugs.python.org/issue4851 -- nosy: +Craig Rodrigues ___ Python tracker <http://bugs.python.org/issue15

[issue4851] xml.dom.minidom.Element.cloneNode fails with AttributeError

2017-03-05 Thread Craig Rodrigues
Craig Rodrigues added the comment: This looks like a duplicate of https://bugs.python.org/issue15290 . 15290 was closed as invalid, and the submitter was told that the code should be changed to not rely on creating elements outside of the document interface. I encountered the same problem when

[issue29248] os.readlink fails on Windows

2017-01-14 Thread Craig Holmquist
Craig Holmquist added the comment: New patch with test. I'm not sure if C:\Users\All Users and C:\ProgramData exist with those names on non-English installations of Windows. I set the test to skip if they aren't found. -- nosy: +craigh Added file: http://bugs.python.org

[issue23407] os.walk always follows Windows junctions

2017-01-14 Thread Craig Holmquist
Craig Holmquist added the comment: New patch with spaces instead of tabs -- Added file: http://bugs.python.org/file46291/issue23407-4.patch ___ Python tracker <http://bugs.python.org/issue23

[issue29248] os.readlink fails on Windows

2017-01-14 Thread Craig Holmquist
Changes by Craig Holmquist : -- keywords: +patch Added file: http://bugs.python.org/file46290/issue29248.patch ___ Python tracker <http://bugs.python.org/issue29

[issue23407] os.walk always follows Windows junctions

2017-01-14 Thread Craig Holmquist
Craig Holmquist added the comment: Here's a new patch: now, _Py_attribute_data_to_stat and Py_DeleteFileW will just use the IsReparseTagNameSurrogate macro to determine if the file is a link, so os.walk etc. will know not to follow them. os.readlink, however, will only work with junc

[issue23407] os.walk always follows Windows junctions

2017-01-13 Thread Craig Holmquist
Craig Holmquist added the comment: FWIW, the only name-surrogate tags in the user-mode SDK headers (specifically winnt.h) are IO_REPARSE_TAG_MOUNT_POINT and IO_REPARSE_TAG_SYMLINK, as of at least the Windows 8.1 SDK. -- ___ Python tracker <h

[issue23407] os.walk always follows Windows junctions

2017-01-12 Thread Craig Holmquist
Craig Holmquist added the comment: Can you point me toward any documentation on the additional tags you want to support? Searching for IO_REPARSE_TAG_IIS_CACHE mostly seems to yield header files that define it (and nothing at all on MSDN), and the non-Microsoft tags just yield a few results

[issue23407] os.walk always follows Windows junctions

2016-09-25 Thread Craig Holmquist
Craig Holmquist added the comment: Updated patch with changes to Win32JunctionTests. -- Added file: http://bugs.python.org/file44824/issue23407-2.patch ___ Python tracker <http://bugs.python.org/issue23

[issue23407] os.walk always follows Windows junctions

2016-09-25 Thread Craig Holmquist
Craig Holmquist added the comment: Actually, it looks like there is already a way to create junctions and a test for them in test_os. However, it includes this line: # Junctions are not recognized as links. self.assertFalse(os.path.islink(self.junction)) That suggests the old

[issue23407] os.walk always follows Windows junctions

2016-09-25 Thread Craig Holmquist
Craig Holmquist added the comment: The attached patch changes _Py_attribute_data_to_stat to set S_IFLNK for both symlinks and junctions, and changes win_readlink to return the target path for junctions (IO_REPARSE_TAG_MOUNT_POINT) as well as symlinks. I'm not sure what to do as far as a

[issue24579] Additional tests for urllib module

2015-07-06 Thread Craig Northway
Craig Northway added the comment: Whoops, looks like there is definitely some redundancy. I didn't notice those tests at the time I wrote these (PyCon AU last year) and while I have been grappling with getting permission to make the contributions it looks like it's been worked on a

[issue24579] Additional tests for urllib module

2015-07-06 Thread Craig Northway
Changes by Craig Northway : -- versions: +Python 3.6 ___ Python tracker <http://bugs.python.org/issue24579> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24579] Additional tests for urllib module

2015-07-06 Thread Craig Northway
Changes by Craig Northway : -- keywords: +patch Added file: http://bugs.python.org/file39877/urllib.patch ___ Python tracker <http://bugs.python.org/issue24

[issue24579] Additional tests for urllib module

2015-07-06 Thread Craig Northway
New submission from Craig Northway: Patch containing additional tests for urllib module to increase code coverage for url parsing. Current coverage: Lib/urllib/parse 51320261% Updated coverage: Lib/urllib/parse 51313973% -- components

[issue24049] Remove unused code in symtable.c and fix docs for import * checking

2015-04-24 Thread Nick Craig-Wood
New submission from Nick Craig-Wood: Here is a patch to remove some unused code in `symtable.c` In Python3 `from x import *` was banned from use in functions completely. This is detected by `symtable_visit_alias` if (st->st_cur->ste_type != ModuleBlock) { int linen

[issue23779] imaplib authenticate raises TypeError if authenticator tries to abort

2015-03-31 Thread Craig Holmquist
Craig Holmquist added the comment: Okay, I attached another patch. The new version of the test returns success if the client's response is anything other than the abort line (*\r\n). It fails with the current version of imaplib, fails if I change _Authenticator.process to output a

[issue23779] imaplib authenticate raises TypeError if authenticator tries to abort

2015-03-30 Thread Craig Holmquist
Craig Holmquist added the comment: New patch is attached. -- Added file: http://bugs.python.org/file38749/imap_auth2.patch ___ Python tracker <http://bugs.python.org/issue23

[issue23779] imaplib authenticate raises TypeError if authenticator tries to abort

2015-03-25 Thread Craig Holmquist
New submission from Craig Holmquist: If the authenticator object passed to the IMAP authenticate method tries to abort the handshake by returning None, TypeError is raised instead of sending the * line to the server. >>> import imaplib >>> imap = imaplib.IMAP4_S

[issue23486] Enum comparisons are 20x slower than comparing equivalent ints

2015-02-19 Thread Craig Holmquist
Craig Holmquist added the comment: It seems like performance is drastically improved by doing this: class Category(Enum): tiny = 1 medium = 2 large = 3 tiny = Category.tiny medium = Category.medium In other words, resolving Category.tiny and Category.medium is what's slow.

[issue23486] Enum comparisons are 20x slower than comparing equivalent ints

2015-02-19 Thread Craig Holmquist
Craig Holmquist added the comment: I may not have been clear before. What I mean is, code like this: for obj in get_objects(): if obj.category == Cat.cat1: #do something elif obj.category == Cat.cat2: #do something else elif obj.category == Cat.cat3 or obj.category

[issue23486] Enum comparisons are 20x slower than comparing equivalent ints

2015-02-19 Thread Craig Holmquist
New submission from Craig Holmquist: Running the attached test script: $ time python test.py enum real0m6.546s user0m6.530s sys 0m0.007s $ time python test.py int real0m0.384s user0m0.377s sys 0m0.000s I encountered this with a script that yielded a sequence of

[issue23407] os.walk always follows Windows junctions

2015-02-07 Thread Craig Holmquist
New submission from Craig Holmquist: os.walk follows Windows junctions even if followlinks is False: >>> import os >>> appdata = os.environ['LOCALAPPDATA'] >>> for root, dirs, files in os.walk(appdata, followlinks=False): ... print(root) C:\Users\Tes

[issue1038591] Python 2.3+ socket._fileobject handles EAGAIN with data loss

2014-11-17 Thread Craig
Craig added the comment: Surely if there is data loss this *has* to be fixed in 2.x? I'm seeing this a *lot* using Twisted which, I believe isn't fully 3.x ported yet, so we have to support 2.x for now. -- nosy: +craigemery ___ Python trac

[issue20353] Hanging bug with multiprocessing + sqlite3 + tkinter (OS X 10.9 only)

2014-01-22 Thread Craig Silverstein
Craig Silverstein added the comment: Thanks -- we managed to work around it by removing the tkinter dependency, so this isn't time-critical for us. It is curious, though. One thing I forgot to mention before is that playing around with the hung process in gdb, it seems like sqlit

[issue20353] Hanging bug with multiprocessing + sqlite3 + tkinter (OS X 10.9 only)

2014-01-22 Thread Craig Silverstein
New submission from Craig Silverstein: Don't ask me how, but our code managed to combine multiprocessing, sqlite, and tkinter all in one app, and got a hanging behavior, though only on a particular OS. Removing any of these removes the hang. I filed this under tkinter, but the fault

[issue9816] random.jumpahead and PRNG sequence independence

2013-11-13 Thread Craig McQueen
Craig McQueen added the comment: StackOverflow question about Mersenne Twister jumpahead: http://stackoverflow.com/q/4184478/60075 which refers to this: http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/JUMP/index.html -- ___ Python tracker <h

[issue9816] random.jumpahead and PRNG sequence independence

2013-11-13 Thread Craig McQueen
Craig McQueen added the comment: C++11 Mersenne Twister discard() member function: http://www.cplusplus.com/reference/random/mersenne_twister_engine/discard/ -- ___ Python tracker <http://bugs.python.org/issue9

[issue9816] random.jumpahead and PRNG sequence independence

2013-11-13 Thread Craig McQueen
Craig McQueen added the comment: I notice that the C++11 library has a discard() member function for its random generators, which is effectively a jumpahead operation. It seems that the C++11 library has implemented discard() for the Mersene Twister generator. If jumpahead() is technically

[issue16487] Allow ssl certificates to be specified from memory rather than files.

2013-06-24 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: Kristján, you are certainly correct that a single-argument that can be either a filename or a cert is inappropriate; we should not be peeking inside of strings to guess what they contain. And I think you also have a good point about Pythonic-ness when

[issue16487] Allow ssl certificates to be specified from memory rather than files.

2013-06-11 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: Kristján, your patch is a wonderful idea—I am about to commit production code that will have to create tens of thousands of temporary files during operation, one file each time SSL is started up on a socket, which could be avoided if something like this

[issue17855] Implement introspection of logger hierarchy

2013-06-01 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: Adding an entirely separate API for introspection strikes me as counter-productive — instead of merely having to maintain the logging API that you already maintain, you will additionally now have an entirely separate and second API that also has to be

[issue18051] get_python_version undefined in bdist_rpm.py

2013-05-24 Thread Craig McDaniel
Craig McDaniel added the comment: Closing; duplicate of 18045 -- resolution: -> duplicate status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue18051] get_python_version undefined in bdist_rpm.py

2013-05-24 Thread Craig McDaniel
New submission from Craig McDaniel: Running "setup.py bdist_rpm" throws an exception on some libraries (e.g. - simplejson) since 2.7.4 due to introduction of get_python_version(): Traceback (most recent call last): File "setup.py", line 103, in run_setup(True) File

[issue13477] tarfile module should have a command line

2013-03-19 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: Larry Hastings writes: > Huh. tar *can* infer it from the data itself. On the other hand, it > chooses explicitly not to. I guess "tar" knows explicit is better > than implicit too ;-) I am told that the refusal of "tar&qu

[issue17370] PEP should note if it has been superseded

2013-03-06 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: The original inspiration: https://twitter.com/theomn/status/309468740611891200 -- ___ Python tracker <http://bugs.python.org/issue17

[issue17370] PEP should note if it has been superseded

2013-03-06 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: (Corrected "not" to "note" in the title and went with "enhancement") -- title: PEP should not if it has been superseded -> PEP should note if it has been superseded type: -> enhancement __

[issue17370] PEP should not if it has been superseded

2013-03-06 Thread Brandon Craig Rhodes
New submission from Brandon Craig Rhodes: A friend (@theomn on Twitter) was just working off of PEP-333 when I mentioned to him that PEP-, and he had never heard of it, and he expressed the wish that PEPs would have a banner or something at the top if there is a more recent version of

[issue12758] time.time() returns local time instead of UTC

2013-01-16 Thread Craig McQueen
Craig McQueen added the comment: Alexander Belopolsky wrote: > No. Seconds since the epoch is neither local nor UTC. It is just > an elapsed number of seconds since an agreed upon time called the > "epoch". This statement just seems wrong. And I have just been conf

[issue16338] pysnmp/asyncore - timeout ineffective?

2012-10-29 Thread Trenton Craig
Trenton Craig added the comment: So, in testing, we reset retries to 1 instead of 0, and on our ubuntu environment this allows it to function. So issue is not with timeout, but with the retries variable. -- ___ Python tracker <h

[issue16338] pysnmp/asyncore - timeout ineffective?

2012-10-27 Thread Trenton Craig
New submission from Trenton Craig: I have an application that is set to use pysnmp to obtain sysDescription and system names from devices on our network. Currently, we are using python 2.6.2, due to the limitations of the box (solaris), and it works fine. However, our new environment uses

[issue15315] Can't build Python extension with mingw32 on Windows

2012-07-10 Thread Craig McQueen
Craig McQueen added the comment: I've succeeded in building an extension for Python 3.3 (at least, on Windows XP, 32-bit; haven't tried any 64-bit), by the hack of copying libmsvcr100.a from a recent MinGW release (20120426) into an older MinGW release (20101030). I haven't

[issue12641] Remove -mno-cygwin from distutils

2012-07-10 Thread Craig McQueen
Craig McQueen added the comment: It would be great if this could be sorted out in time for Python 3.3. Otherwise I don't think we'll be able to use MinGW to build extensions in Windows. Unless there is a version of MinGW which supports the -mno-cygwin option, as well as l

[issue12641] Remove -mno-cygwin from distutils

2012-07-10 Thread Craig McQueen
Craig McQueen added the comment: I've come across this issue when trying to build extensions for Python 3.3 on Windows, needing a recent enough MinGW to provide a library for msvcr100. See issue #15315. -- nosy: +cmcqueen1975 ___ Python tr

[issue15315] Can't build Python extension with mingw32 on Windows

2012-07-10 Thread Craig McQueen
Craig McQueen added the comment: It sounds as though the option '-mno-cygwin' is related to issue #12641. Does that mean I need to find a version of MinGW that is old enough to support the option '-mno-cygwin', but new enough to include a

[issue15315] Can't build Python extension with mingw32 on Windows

2012-07-10 Thread Craig McQueen
Craig McQueen added the comment: I downloaded the latest MinGW, and now it tells me: ... c:\mingw\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\Python33\include -IC:\Python33\PC -c python3/src/_cobs_ext.c -o bui ld\temp.win32-3.3\Release\python3\src\_cobs_ext.o cc1.exe: error: unrecognized

[issue15315] Can't build Python extension with mingw32 on Windows

2012-07-10 Thread Craig McQueen
Craig McQueen added the comment: That's definitely an improvement. It gets further, but on my PC, the compile fails: ... c:/mingw/bin/../lib/gcc/mingw32/4.5.0/../../../../mingw32/bin/ld.exe: cannot find -lmsvcr100 collect2: ld returned 1 exit status error: command 'gcc' f

[issue15315] Can't build Python extension with mingw32 on Windows

2012-07-09 Thread Craig McQueen
New submission from Craig McQueen : I'm trying this with my 'cobs' Python package: c:\Python33\python.exe setup.py build --compiler=mingw32 bdist_msi With Python 3.3 beta, it fails with an exception: ValueError: Unknown MS Compiler version 1600 It works

[issue15025] httplib and http.client are missing response messages for defined WEBDAV responses, e.g., UNPROCESSABLE_ENTITY (422)

2012-06-07 Thread Craig Loftus
New submission from Craig Loftus : Calling httplib.responses[httplib.UNPROCESSABLE_ENTITY] in 2.7, or http.client.responses[http.client.UNPROCESSABLE_ENTITY] raises "KeyError: 422". The expected behaviour would be to return "Unprocessable Entity". This is the specific i

[issue14550] os.path.abspath() returns physical path, not logical path.

2012-04-11 Thread Craig Sawyer
Craig Sawyer added the comment: Antoine, I see your point about getcwd() not having symlinks, doesn't mean any path outside of getcwd() might have symlinks, and I agree this is true. I apologize. As for which one to choose, it should choose based on PWD (i.e. the current wo

[issue14550] os.path.abspath() returns physical path, not logical path.

2012-04-11 Thread Craig Sawyer
New submission from Craig Sawyer : we have os.path.abspath() and os.path.realpath(). the difference according to the documentation is realpath() returns the physical path (i.e. no symlinks in the path). while abspath() uses getcwd() but because of POSIX.1-2008 (IEEE Std 1003.1-2008) says

[issue4028] Problem compiling the multiprocessing module on sunos5

2011-12-13 Thread Craig Foster
Craig Foster added the comment: I can confirm that the compile completes with a multiprocessing module where it hasn't before--at least in SunOS 5.9. -- nosy: +fosterremy ___ Python tracker <http://bugs.python.org/i

[issue13477] tarfile module should have a command line

2011-11-24 Thread Brandon Craig Rhodes
New submission from Brandon Craig Rhodes : The tarfile module should have a simple command line that allows it to be executed with "-m" — even if its only ability was to take a filename and extract it to the current directory, it could be a lifesaver on Windows machines where Pytho

[issue7689] Pickling of classes with a metaclass and copy_reg

2011-10-04 Thread Craig Citro
Craig Citro added the comment: Antoine -- ah, that makes sense. Is that the only blocker? I've let this patch rot on the vine a long time; if so, I'll happily switch `__eq__` back to `__cmp__` and re-post if it'll get submitted. -- ___

[issue7689] Pickling of classes with a metaclass and copy_reg

2011-10-04 Thread Craig Citro
Craig Citro added the comment: Antoine -- why do you want to switch "if r" for "if not r"? If we did, the test would just confirm that the unpicked object was of the same type as the original; if we were going to do that, we might as well just replace the whole `__cmp__

[issue1947] Exception exceptions.AttributeError '_shutdown' in

2011-09-13 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: In case Google brings anyone else to this bug: this error typically indicates that a `threading.py` which is not actually the Standard Library's `threading` module has somehow wound up on an earlier path in `sys.path` and is therefore shadowin

[issue11561] "coverage" of Python regrtest cannot see initial import of libs

2011-09-06 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: Brett, yes, you are welcome to close this issue — Ned quite handily convinced me that coverage code belongs in the "coverage" distribution, not languishing about in the CPython source tree. That solution also quite beautifully solves the

[issue1205239] Let shift operators take any integer value

2011-08-07 Thread Craig McQueen
Craig McQueen added the comment: So this has been rejected I see. Too bad, since I stub my metaphorical toe on this issue from time to time. Just for the record, here is an example: http://stackoverflow.com/questions/4130936/perfect-hash-function/6976723#6976723

[issue11572] bring Lib/copy.py to 100% coverage

2011-08-04 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: Ezio and Sandro, thank you very much for your attention to this issue, and for helping me split it into manageable chunks! To answer the question about why "coverage" does not show as high a total as it ought: it's because coverage nor

[issue11561] "coverage" of Python regrtest cannot see initial import of libs

2011-08-01 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: Éric, I think your suggestions are all good ones, and I have incorporated them into the file. (But do note that the departures we are now making from Ned's own copy of the tracer code ­— removing the commented-out debugging statement, and the

[issue11572] bring Lib/copy.py to 100% coverage

2011-08-01 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: Éric, I think your points are good ones. (And, as I return to this patch after three months, I should thank the PSF for sponsoring the CPython sprint here at PyOhio, and creating this opportunity for me to continue trying to land this patch!) I am

[issue12056] "…" (HORIZONTAL ELLIPSIS) should be an alternative syntax for "..." (FULL STOP FULL STOP FULL STOP)

2011-05-11 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: But if we allow for ellipsis, then would we not also have to start allowing characters like ≥ and ≤ in Python? And the problem with any of these (admittedly very attractive) substitutions is that they seem to abandon the principle of there being One

[issue11629] Reference implementation for PEP 397

2011-03-22 Thread Craig McQueen
Changes by Craig McQueen : -- nosy: +cmcqueen1975 ___ Python tracker <http://bugs.python.org/issue11629> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11572] bring Lib/copy.py to 100% coverage

2011-03-21 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: Nick Coghlan writes: > Regarding "__reduce__", other readers will have the same question Éric > did, so that point should definitely go in a comment after the > "__reduce_ex__" check. I just sat down to review this issu

[issue11572] bring Lib/copy.py to 100% coverage

2011-03-19 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: Nick Coghlan writes: > Nick Coghlan added the comment: > > Regarding "__reduce__", other readers will have the same question Éric > did, so that point should definitely go in a comment after the > "__reduce_ex__" che

[issue11572] bring Lib/copy.py to 100% coverage

2011-03-18 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: Éric, after checking line 112 of the two patches and then of the new file, I figured out that you meant line 112 of the old file — and, yes, that test can go away too since in python3 "complex" always exists and "unicode" neve

[issue11572] bring Lib/copy.py to 100% coverage

2011-03-17 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: Antoine, neither this issue, nor either version of my patch, was intended to assert that 100% test coverage indicates that a test of tests are complete. If you will point out where in the text this is implied, I will correct it. Thanks

[issue11572] bring Lib/copy.py to 100% coverage

2011-03-17 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: Éric, the Makefile in Python trunk seems to include Objects/complexobject.o in the build unilaterally without any way to turn it off. What is leading you to believe that Python 3 can conditionally turn the "complex" type off during a build?

[issue11572] bring Lib/copy.py to 100% coverage

2011-03-16 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: Benjamin, thanks for the pointers! The attached patch now uses assertIs() and assertIsNot(), and calls self.fail() instead of using the exception from "support". In the future I would like some way to determine when test coverage is fully ac

[issue502085] pickle problems (with Boost.Python)

2011-03-16 Thread Brandon Craig Rhodes
Changes by Brandon Craig Rhodes : Removed file: http://bugs.python.org/file21245/test_copy2.patch ___ Python tracker <http://bugs.python.org/issue502085> ___ ___ Pytho

[issue502085] pickle problems (with Boost.Python)

2011-03-16 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: Benjamin, I would like some way to know when our tests achieve 100% coverage because otherwise I will keep coming back to this module to add more tests and have to re-discover code that is not CPython relevant. But for now I have removed the pragmas

[issue11572] bring Lib/copy.py to 100% coverage

2011-03-16 Thread Brandon Craig Rhodes
New submission from Brandon Craig Rhodes : The attached patch will bring Lib/copy.py to 100% test coverage. A bug in "coverage" results in its only reporting 99% at the moment; see coverage issue #122 on bitbucket: https://bitbucket.org/ned/coveragepy/issue/122/for-else-always-repor

[issue11561] "coverage" of Python regrtest cannot see initial import of libs

2011-03-15 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: Here is a module that solves this problem if the tests are run with the "fullcoverage" directory at the front of the PYTHONPATH, like this: PYTHONPATH=Tools/fullcoverage ./python -m coverage run --pylib Lib/test/regrtest.py

[issue11561] "coverage" of Python regrtest cannot see initial import of libs

2011-03-15 Thread Brandon Craig Rhodes
New submission from Brandon Craig Rhodes : When running the Python regression tests in "coverage", the initial outer level of interpreted code in several standard library modules shows as not having been covered by the tests, because they were imported during the Python boot proces

[issue10592] pprint module doesn't work well with OrderedDicts

2011-03-03 Thread Craig McQueen
Changes by Craig McQueen : -- nosy: +cmcqueen1975 ___ Python tracker <http://bugs.python.org/issue10592> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10979] setUpClass exception causes explosion with "-b"

2011-01-21 Thread Brandon Craig Rhodes
New submission from Brandon Craig Rhodes : Normally, unittest cleanly reports an exception in a setUpClass method. But if I place the attached test in a directory by itself and then run "python -m unittest discover -b" from inside of the same directory, then instead of being

[issue10901] Python 3 MIME generator dies if not given boundary

2011-01-13 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: Here is a patch that fixes the problem. The problem probably only occurs if the MIMEMultipart is actually given several MIME parts to use in its interior. -- keywords: +patch Added file: http://bugs.python.org/file20391/email-boundary.diff

[issue10901] Python 3 MIME generator dies if not given boundary

2011-01-13 Thread Brandon Craig Rhodes
New submission from Brandon Craig Rhodes : If you try doing "msg.as_string()" to a MIMEMultipart message that has not been given a boundary, then it dies with this exception: Traceback (most recent call last): File "mime_gen_alt.py", line 40, in print(msg.as_str

[issue9196] Improve docs for string interpolation "%s" re Unicode strings

2011-01-09 Thread Craig McQueen
Craig McQueen added the comment: I'm attaching a file that I used (in Python 2.x). It's a little rough--I manually commented and uncommented various lines to see what would change under various circumstances. But at least you should be able to see what I was doing. --

[issue9196] Improve docs for string interpolation "%s" re Unicode strings

2010-12-26 Thread Craig McQueen
Craig McQueen added the comment: I should be able to attach my test code. But it is at my work, and I'm on holidays for 2 more weeks. Sorry 'bout that! I do assume that Python 3 greatly simplifies this. -- ___ Python trac

[issue5131] pprint doesn't know how to print a defaultdict

2010-10-01 Thread Nick Craig-Wood
Nick Craig-Wood added the comment: Terry J. Reedy (terry.reedy) wrote: > > IMHO pprint should be able to make a decent job of all the built in types > > Agreed, already true as far as I know, and irrelevant. This issue is not > about built-in types in the builtins module, as

[issue5131] pprint doesn't know how to print a defaultdict

2010-09-29 Thread Nick Craig-Wood
Nick Craig-Wood added the comment: Raymond Hettinger (rhettinger) wrote: > Ben, I don't think there is any value is opening more issues like > pprint-doesn't-handle-object-x (named tuples, defautdicts, deques, > generators, etc). > > As it is currently designed, pp

[issue9720] zipfile writes incorrect local file header for large files in zip64

2010-09-05 Thread Craig de Stigter
Craig de Stigter added the comment: Hi, sorry no I haven't had time to add a real test for this -- ___ Python tracker <http://bugs.python.org/issue9720> ___ ___

[issue9720] zipfile writes incorrect local file header for large files in zip64

2010-09-03 Thread Craig de Stigter
Craig de Stigter added the comment: Yes, the bug still exists in Python 3.1.2. However, struct.pack() no longer silently ignores overflow, so I get this error instead: >>> z.write('foo.txt') Traceback (most recent call last): File "", line 1, in File &

[issue9723] pipes.quote() needs to be documented

2010-08-31 Thread Brandon Craig Rhodes
New submission from Brandon Craig Rhodes : The only way to safely build shell command lines from inside of Python — which is necessary when sending commands across SSH, since that behaves like os.system() rather than like subprocess.call() — is to use the wonderful pipes.call() method to turn

[issue9720] zipfile writes incorrect local file header for large files in zip64

2010-08-30 Thread Craig de Stigter
New submission from Craig de Stigter : Steps to reproduce: # create a large (>4gb) file f = open('foo.txt', 'wb') text = 'a' * 1024**2 for i in xrange(5 * 1024): f.write(text) f.close() # now zip the file import zipfile z = zipfile.ZipFile('foo.zi

  1   2   >