[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

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

[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

[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

[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

[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

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

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

[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

[issue4755] Common path prefix

2010-07-25 Thread Craig McQueen
Craig McQueen added the comment: http://code.activestate.com/recipes/577016-path-entire-split-commonprefix/ -- nosy: +cmcqueen1975 ___ Python tracker <http://bugs.python.org/issue4

[issue7639] bdist_msi fails on files with long names

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

[issue7696] Improve Memoryview/Buffer documentation

2010-07-19 Thread Craig McQueen
Craig McQueen added the comment: I've seen the changes Mr Pitrou made, both for the 2.x and 3.x docs. That's a good improvement--thanks very much. -- ___ Python tracker <http://bugs.python.

[issue7696] Improve Memoryview/Buffer documentation

2010-07-11 Thread Craig McQueen
Craig McQueen added the comment: My previous comment was referring to Python 3.x, by the way. Python 2.7 has not implemented the buffer protocol for `array`. -- ___ Python tracker <http://bugs.python.org/issue7

[issue7696] Improve Memoryview/Buffer documentation

2010-07-11 Thread Craig McQueen
Craig McQueen added the comment: The documentation implies that memoryview always accesses bytes: * "len(view) returns the total number of bytes in the memoryview, view." * "Taking a single index will return a single byte." But, the following example shows this is misle

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

2010-07-08 Thread Craig McQueen
Craig McQueen added the comment: Another thing I discovered, for Example 1: 4. If test_object.__str__() returns a Unicode object (for some reason), and test_object.__unicode__() does not exist, then the Unicode value from the __str__() call is used as-is (no conversion to string, no encoding

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

2010-07-08 Thread Craig McQueen
New submission from Craig McQueen : I have just been trying to figure out how string interpolation works for "%s", when Unicode strings are involved. It seems it's a bit complicated, but the Python documentation doesn't really describe it. It just says %s "converts any

[issue9195] Link in docs from "String Formatting Operations" to "Template Strings"

2010-07-07 Thread Craig McQueen
New submission from Craig McQueen : I stumbled across "Template Strings" of PEP 292 by accident recently. I'd never heard of it before. I'm familiar with the "string interpolation" aka "String Formatting Operations", and I know to find that in th

[issue9161] add_option in optparse no longer accepts unicode string

2010-07-05 Thread Craig McQueen
Craig McQueen added the comment: To further explain, I had code e.g.: parser.add_option(u'-s', u'--seqfile', dest='seq_file_name', help=u'Write sequence file output to FILE', metavar=u'FILE') I had to remove the unicode designator for

[issue9161] add_option in optparse no longer accepts unicode string

2010-07-04 Thread Craig McQueen
Craig McQueen added the comment: My program currently uses ASCII options, so I can change the Unicode string parameter to byte string. The optparse module still seems to match the option against the incoming Unicode argv, I guess by implicit string conversion

[issue9161] add_option in optparse no longer accepts unicode string

2010-07-04 Thread Craig McQueen
New submission from Craig McQueen : Working in Japan, I find it very helpful to be able to read full Unicode arguments in Python 2.x under Windows 2000/XP. So I am using the following: http://stackoverflow.com/questions/846850/how-to-read-unicode-characters-from-command-line-arguments-in

[issue1596321] KeyError at exit after 'import threading' in other thread

2010-07-01 Thread Craig McQueen
Craig McQueen added the comment: A follow-on re the cx_Freeze issue: I looked at the source code, and found it doesn't seem to be doing any thread creation. But I found that in the initscripts/Console.py, there are the following lines: if sys.version_info[:2] >= (2, 5):

[issue9066] Standard type codes for array.array, same as struct

2010-06-23 Thread Craig McQueen
New submission from Craig McQueen : The type codes for array.array are platform-dependent. The type codes are similar to those for the struct module. It would be helpful for array.array to adopt the struct module's "=" format specifier prefix, to specify "

[issue1172711] long long support for array module

2010-06-23 Thread Craig McQueen
Craig McQueen added the comment: So it looks as though this isn't going in to Python 2.7. How about 3.x? -- nosy: +cmcqueen1975 ___ Python tracker <http://bugs.python.org/issu

[issue1596321] KeyError at exit after 'import threading' in other thread

2010-06-15 Thread Craig McQueen
Craig McQueen added the comment: Sorry I should have said, I'm running on Windows 2000 SP4. -- ___ Python tracker <http://bugs.python.org/issue1596321> ___ ___

[issue1596321] KeyError at exit after 'import threading' in other thread

2010-06-15 Thread Craig McQueen
Craig McQueen added the comment: >From my limited experience using cx_Freeze 4.1.2 with Python 2.6.5, it seems >that this issue is triggered in a cx_Frozen program simply by having `import >threading` in the program. I'm not sure what cx_Freeze is doing that makes >t

[issue8384] Distutils C extension build with MinGW on Windows fails

2010-04-13 Thread Craig McQueen
Craig McQueen added the comment: I just realised--I didn't have c:\mingw\bin in my path. Once I added that to the path, then the build worked fine. So I guess the issue is only that the error message is somewhat cryptic. -- ___ Python tr

[issue8384] Distutils C extension build with MinGW on Windows fails

2010-04-13 Thread Craig McQueen
Craig McQueen added the comment: \MinGW\bin\ld.exe -v GNU ld (GNU Binutils) 2.20 -- ___ Python tracker <http://bugs.python.org/issue8384> ___ ___ Python-bug

[issue2698] Extension module build fails for MinGW: missing vcvarsall.bat

2010-04-12 Thread Craig McQueen
Craig McQueen added the comment: Sure can--done. Issue #8384. -- ___ Python tracker <http://bugs.python.org/issue2698> ___ ___ Python-bugs-list mailing list Unsub

[issue8384] Distutils C extension build with MinGW on Windows fails

2010-04-12 Thread Craig McQueen
New submission from Craig McQueen : I tried to build a C extension in Python 3.1.2. \Python31\python.exe setup.py build --compiler=mingw32 I got a stack-trace: ... File "C:\Python31\lib\distutils\cygwinccompiler.py", line 280, in __init__ CygwinCCompiler.__init__ (sel

[issue2698] Extension module build fails for MinGW: missing vcvarsall.bat

2010-04-12 Thread Craig McQueen
Craig McQueen added the comment: I tried it in Python 3.1.2. \Python31\python.exe setup.py build --compiler=mingw32 I got a stack-trace: ... File "C:\Python31\lib\distutils\cygwinccompiler.py", line 280, in __init__ CygwinCCompiler.__init__ (self, verbose, dry_run, force)

[issue2698] Extension module build fails for MinGW: missing vcvarsall.bat

2010-03-18 Thread Craig McQueen
Craig McQueen added the comment: And, I should add, doing nearly the same thing, except with Python 2.6.4, works fine. Same machine, same console window, same path: \python26\python.exe setup.py build --compiler=mingw32 --verbose running build running build_py running build_ext building

[issue2698] Extension module build fails for MinGW: missing vcvarsall.bat

2010-03-18 Thread Craig McQueen
Craig McQueen added the comment: I ran it as follows: \python31\python.exe setup.py build --compiler=mingw32 --verbose and got: running build running build_py running build_ext building 'cobs._cobsext' extension error: Unable to find vcvarsall.bat If I run: gcc --vers

[issue2698] Extension module build fails for MinGW: missing vcvarsall.bat

2010-03-18 Thread Craig McQueen
Craig McQueen added the comment: This bug was confirmed to no longer be present for Python 2.6.4, however it is still present for Python 3.1.1. Could someone with "open" privileges re-open this please? -- ___ Python trac

[issue2698] Extension module build fails for MinGW: missing vcvarsall.bat

2010-03-11 Thread Craig McQueen
Craig McQueen added the comment: Not so much of a traceback. But essentially the same final error: running build running build_py running build_ext building 'cobs._cobsext' extension error: Unable to find vcvarsall.bat -- ___ Python trac

[issue2698] Extension module build fails for MinGW: missing vcvarsall.bat

2010-03-10 Thread Craig McQueen
Craig McQueen added the comment: This still seems to be a bug in Python 3.1.1, does it not? Can this be re-opened? -- ___ Python tracker <http://bugs.python.org/issue2

[issue4617] SyntaxError when free variable name is also an exception target

2010-02-11 Thread Craig McQueen
Craig McQueen added the comment: There's also this one which caught me out: def outer(): x = 0 y = (x for i in range(10)) del x # SyntaxError -- nosy: +cmcqueen1975 ___ Python tracker <http://bugs.python.org/i

[issue1205239] Let shift operators take any integer value

2010-01-26 Thread Craig McQueen
Craig McQueen added the comment: To complete that thought... Since crc << 8 could bump the calculation into long territory, for that final mask I guess I'd want to mask and then shift. I.e. rather than crc_mask = ((1 << crc_width) - 1) crc = (...) ^ ((crc <

[issue1205239] Let shift operators take any integer value

2010-01-26 Thread Craig McQueen
Craig McQueen added the comment: Thanks, good points. I'm thinking with a C background and the fixed-width data types. The 0xFF could be needed if the data_byte is actually a larger number and you need to ensure only the lowest 8 bits are set. Or, if there is some sign-extending goi

[issue1205239] Let shift operators take any integer value

2010-01-25 Thread Craig McQueen
Craig McQueen added the comment: Just for the record... here is a relevant use case... I'm working on some code for calculating CRCs, and hope to support any CRC width, including CRC-5. This involves, among the calculations: crc >> (crc_width - 8) The complete expression i

[issue2698] Extension module build fails for MinGW: missing vcvarsall.bat

2010-01-10 Thread Craig McQueen
Craig McQueen added the comment: Eric sent a build_ext.py to me and Daniel26 by e-mail. Attached. The idea was to copy it over the one in C:\Python31\Lib\distutils\command. I tried the file that he sent, but I'm getting the same issue that Daniel26 described. -- Added file:

[issue2698] Extension module build fails for MinGW: missing vcvarsall.bat

2009-12-24 Thread Craig McQueen
Craig McQueen added the comment: Eric (keldonin), please consider attaching the file (solution you mentioned) to this issue for the benefit of the rest of us. I'm interested to see it. -- ___ Python tracker <http://bugs.python.org/i

[issue2698] Extension module build fails for MinGW: missing vcvarsall.bat

2009-12-22 Thread Craig McQueen
Craig McQueen added the comment: This seems to be an bug in Python 3.1.1. Is it fixed in the Python 3 code? Is the issue being tracked in a separate issue? -- ___ Python tracker <http://bugs.python.org/issue2

[issue6377] distutils compiler switch ignored

2009-12-15 Thread Craig McQueen
Changes by Craig McQueen : -- nosy: +cmcqueen1975 ___ Python tracker <http://bugs.python.org/issue6377> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue2698] Extension module build fails for MinGW: missing vcvarsall.bat

2009-12-15 Thread Craig McQueen
Changes by Craig McQueen : -- nosy: +cmcqueen1975 ___ Python tracker <http://bugs.python.org/issue2698> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1606092] csv module broken for unicode

2009-11-24 Thread Craig McQueen
Craig McQueen added the comment: I think I see now--it accepts Unicode input, but converts it back to bytes internally using the ASCII codec. So it works as long as the Unicode input contains on ASCII characters. That's a gotcha. It appears that it's been fixed in Python 3.x, judg

[issue1606092] csv module broken for unicode

2009-11-24 Thread Craig McQueen
Craig McQueen added the comment: Is this still an open bug? I have the following code: lookup = {} csv_reader = csv.reader(codecs.open(lookup_file_name, 'r', 'utf-8')) for row in csv_reader: lookup[row[1]] = row[0] And it "appears to work" (i

[issue1606092] csv module broken for unicode

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

[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails

2009-06-24 Thread Craig McQueen
Craig McQueen added the comment: @gregory.p.smith: > This change is not suitable for back porting as it arguably adds a new feature. Speaking as a Mercurial user who can't use Mercurial at work through a proxy firewall... I beg you to consider that fixing this is not really addin