[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 va

[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 assumptions about how

[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

Twisted 21.2.0 Release Announcement

2021-02-28 Thread Craig Rodrigues
On behalf of Twisted Matrix Laboratories, I am honored to announce the release of Twisted 21.2.0! There are two major announcements for this release: - Python 2.7 support has been dropped. Twisted 21.2.0 supports Python 3.5.3 and higher only - This will be the last Twisted release to support

This is a test

2021-01-07 Thread Craig Hatch
I have added you to the EMAIL list, so when I have questions. Just learn for fun. Craig Hatch -- https://mail.python.org/mailman/listinfo/python-list

[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 <craigh...@gmail.com> 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 ret

[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 <craigh...@gmail.com>: >>> import os, pathlib, shutil >>> os.mkdir('test1') >>> os.mkdir('test2') >>> path = pathlib.Path('test1') >>> shutil.move(path, 'test2') Traceback (most recent call last): File &

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

2017-10-01 Thread Craig Holmquist
New submission from Craig Holmquist <craigh...@gmail.com>: >>> 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/p

[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 try

[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't use

[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 <pyt...@craig.mcqueen.id.au>: -- nosy: +cmcqueen1975 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue23407] os.walk always follows Windows junctions

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

[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 <rep...@bugs.python.org> <http://bugs.python.org/i

[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/file46293

[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 <rep...@bugs.python.org> <http://bugs.python.org/i

[issue29248] os.readlink fails on Windows

2017-01-14 Thread Craig Holmquist
Changes by Craig Holmquist <craigh...@gmail.com>: -- keywords: +patch Added file: http://bugs.python.org/file46290/issue29248.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[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 junctions

[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 <

[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 <rep...@bugs.python.org> <http://bugs.python.org/i

[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 adding

Re: Need assistance

2015-07-19 Thread craig . sirna
On Thursday, July 16, 2015 at 9:16:01 PM UTC-5, craig...@gmail.com wrote: I need help writing a homework program. I'll write it, but I can't figure out how to incorporate what I have read in the book to work in code. The assignment wants us to take a users first, middle and last name

Need assistance

2015-07-16 Thread craig . sirna
the full name rearranged in Last, First Middle order. I tried to use the search function in Python to locate any spaces in the input. It spot back the index 5 (I used Craig Daniel Sirna) That is correct for the first space, but I can't figure out how to get it to continue to the next space

Re: Need assistance

2015-07-16 Thread craig . sirna
I am in bed, on my phone, gotta be up in 4 hours for work. I will get back with you guys tomorrow after I take care of my Math class stuff. I need to step away from this for a day lol. Worst part...this is the C assignment and it's driving me crazy. I do recall the list fuction. But isn't

[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

[issue24579] Additional tests for urllib module

2015-07-06 Thread Craig Northway
Changes by Craig Northway craig.north...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file39877/urllib.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24579

[issue24579] Additional tests for urllib module

2015-07-06 Thread Craig Northway
Changes by Craig Northway craig.north...@gmail.com: -- versions: +Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24579 ___ ___ Python

[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 bit. I'll

[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 lineno = st

[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 byte

[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 rep...@bugs.python.org http://bugs.python.org/issue23779

[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_SSL('imap.gmail.com

[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

[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
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

[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\Test\AppData\Local C:\Users\Test\AppData\Local\Apple

[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 tracker rep

Re: inheriting a large python code base

2014-02-21 Thread craig
Look at the algorithms and see if there are faster ways. Great advice with the comments of writing test cases, getting into version control, taking passes through the code with tools, understanding what is slow and why it is considered slow. Then you should invest the time to understand the

[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 could

[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 sqlite

Re: How to install pip for python3 on OS X?

2013-11-20 Thread Craig Yoshioka
Mavericks? Homebrew all the way. Google Homebrew and install it brew install python3 pip3 install pyserial Craig reporting from the road 10550 N Torrey Pines Rd La Jolla CA 92037 work: 858 784 9208 cell: 619 623 2233 On Nov 19, 2013, at 10:55 PM, Travis Griggs travisgri...@gmail.com wrote

[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

[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 rep...@bugs.python.org http://bugs.python.org/issue9816

[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 rep

[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

[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

[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 module run_setup(True) File setup.py, line 99

[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 rep...@bugs.python.org http://bugs.python.org/issue18051

[issue13477] tarfile module should have a command line

2013-03-19 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: Larry Hastings rep...@bugs.python.org 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 to introspect

[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

[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 ___ Python tracker rep

[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 rep...@bugs.python.org http://bugs.python.org/issue17370

[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 confused by the current

Re: Beowulf clusters

2013-01-13 Thread Craig Yoshioka
When you write HPC code the GIL isn't an issue, but you'll have plenty of others. Craig reporting from the road 10550 N Torrey Pines Rd La Jolla CA 92037 work: 858 784 9208 cell: 619 623 2233 On Jan 13, 2013, at 6:22 PM, Mark Janssen dreamingforw...@gmail.com wrote: On Sun, Jan 13, 2013 at 8

Re: RIse and fall of languages in 2012

2013-01-10 Thread Craig Yoshioka
At one point or another I'm pretty sure I've googled _ sucks for every language I've ever used- even the ones I like. ie: Python easily more than once. Craig reporting from the road 10550 N Torrey Pines Rd La Jolla CA 92037 work: 858 784 9208 cell: 619 623 2233 On Jan 10, 2013, at 3:32 PM

[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 rep

[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 pyt...@craig.mcqueen.id.au 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

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

2012-07-10 Thread Craig McQueen
Craig McQueen pyt...@craig.mcqueen.id.au 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

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

2012-07-10 Thread Craig McQueen
Craig McQueen pyt...@craig.mcqueen.id.au 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 library for msvcr100

[issue12641] Remove -mno-cygwin from distutils

2012-07-10 Thread Craig McQueen
Craig McQueen pyt...@craig.mcqueen.id.au 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

[issue12641] Remove -mno-cygwin from distutils

2012-07-10 Thread Craig McQueen
Craig McQueen pyt...@craig.mcqueen.id.au 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

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

2012-07-10 Thread Craig McQueen
Craig McQueen pyt...@craig.mcqueen.id.au 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

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

2012-07-09 Thread Craig McQueen
New submission from Craig McQueen pyt...@craig.mcqueen.id.au: 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 cr...@wildknowledge.co.uk: 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

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

2012-04-11 Thread Craig Sawyer
New submission from Craig Sawyer csaw...@yumaed.org: 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

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

2012-04-11 Thread Craig Sawyer
Craig Sawyer csaw...@yumaed.org 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

alternative to with statement?

2012-02-28 Thread Craig Yoshioka
I see that there was previously a PEP to allow the with statement to skip the enclosing block... this was shot down, and I'm trying to think of the most elegant alternative. The best I've found is to abuse the for notation: for _ in cachingcontext(x): # create cached resources here # return

Re: alternative to with statement?

2012-02-28 Thread Craig Yoshioka
their activity, by waiting for each other to finish, and reusing the cached results, etc. On Feb 28, 2012, at 1:04 PM, Craig Yoshioka wrote: I see that there was previously a PEP to allow the with statement to skip the enclosing block... this was shot down, and I'm trying to think

[issue4028] Problem compiling the multiprocessing module on sunos5

2011-12-13 Thread Craig Foster
Craig Foster foster.cr...@gmail.com 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 rep...@bugs.python.org http

[issue13477] tarfile module should have a command line

2011-11-24 Thread Brandon Craig Rhodes
New submission from Brandon Craig Rhodes bran...@rhodesmill.org: 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

[issue7689] Pickling of classes with a metaclass and copy_reg

2011-10-04 Thread Craig Citro
Craig Citro craigci...@gmail.com 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__

[issue7689] Pickling of classes with a metaclass and copy_reg

2011-10-04 Thread Craig Citro
Craig Citro craigci...@gmail.com 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

[issue1947] Exception exceptions.AttributeError '_shutdown' in module 'threading'

2011-09-13 Thread Brandon Craig Rhodes
Brandon Craig Rhodes bran...@rhodesmill.org 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

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

2011-09-06 Thread Brandon Craig Rhodes
Brandon Craig Rhodes bran...@rhodesmill.org 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

[issue1205239] Let shift operators take any integer value

2011-08-07 Thread Craig McQueen
Craig McQueen pyt...@craig.mcqueen.id.au 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 bran...@rhodesmill.org 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

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

2011-08-01 Thread Brandon Craig Rhodes
Brandon Craig Rhodes bran...@rhodesmill.org 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

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

2011-08-01 Thread Brandon Craig Rhodes
Brandon Craig Rhodes bran...@rhodesmill.org 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

AUTO: Craig Churchill is out of the office (returning 27/07/2011)

2011-07-18 Thread craig . churchill
I am out of the office until 27/07/2011. I will respond to your message when I return. If you require assitance in relation to the SPEAR Integration project please contact Terry Mandalios. Note: This is an automated response to your message Re: Tabs -vs- Spaces: Tabs should have won. sent on

Looking for beta testers for Rapid Application Development tool for Python

2011-06-10 Thread Craig
We're looking for beta testers for our new product. Testers who send feedback and bug reports will be given a free copy of the released version of the software after testing is completed. What's our product? Gumption is a powerful and versatile toolkit for building computer applications using the

[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 bran...@rhodesmill.org 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

[issue11629] Reference implementation for PEP 397

2011-03-22 Thread Craig McQueen
Changes by Craig McQueen pyt...@craig.mcqueen.id.au: -- nosy: +cmcqueen1975 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11629 ___ ___ Python

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

2011-03-21 Thread Brandon Craig Rhodes
Brandon Craig Rhodes bran...@rhodesmill.org added the comment: Nick Coghlan rep...@bugs.python.org 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

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

2011-03-19 Thread Brandon Craig Rhodes
Brandon Craig Rhodes bran...@rhodesmill.org added the comment: Nick Coghlan rep...@bugs.python.org writes: Nick Coghlan ncogh...@gmail.com added the comment: Regarding __reduce__, other readers will have the same question Éric did, so that point should definitely go in a comment after

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

2011-03-18 Thread Brandon Craig Rhodes
Brandon Craig Rhodes bran...@rhodesmill.org 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 never exists

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

2011-03-17 Thread Brandon Craig Rhodes
Brandon Craig Rhodes bran...@rhodesmill.org 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

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

2011-03-17 Thread Brandon Craig Rhodes
Brandon Craig Rhodes bran...@rhodesmill.org 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

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

2011-03-16 Thread Brandon Craig Rhodes
New submission from Brandon Craig Rhodes bran...@rhodesmill.org: 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

[issue502085] pickle problems (with Boost.Python)

2011-03-16 Thread Brandon Craig Rhodes
Brandon Craig Rhodes bran...@rhodesmill.org 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

[issue502085] pickle problems (with Boost.Python)

2011-03-16 Thread Brandon Craig Rhodes
Changes by Brandon Craig Rhodes bran...@rhodesmill.org: Removed file: http://bugs.python.org/file21245/test_copy2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue502085

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

2011-03-16 Thread Brandon Craig Rhodes
Brandon Craig Rhodes bran...@rhodesmill.org 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

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

2011-03-15 Thread Brandon Craig Rhodes
New submission from Brandon Craig Rhodes bran...@rhodesmill.org: 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

  1   2   3   4   5   6   7   8   9   10   >