[issue7228] %lld for PyErr_Format (Modules/_io/bufferedio.c)

2009-11-24 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Thanks for testing! Fixed (again) in r76502 (trunk), r76503 (py3k). I don't think it's worth backporting the fix to the release branches, given that that would require also implementing %lld support in those branches. --

[issue7228] %lld for PyErr_Format (Modules/_io/bufferedio.c)

2009-11-23 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: I think your patch is correct. (I couldn't check the behavior on error condition itself, because I wasn't sure how, but I checked test_io run on windows) -- ___ Python tracker

[issue7228] %lld for PyErr_Format (Modules/_io/bufferedio.c)

2009-11-16 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Merged to py3k in r76328. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7228 ___ ___

[issue7228] %lld for PyErr_Format (Modules/_io/bufferedio.c)

2009-11-16 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: ocean-city, now that lld and llu support has been added, could you retest this patch (offt_formats.patch) for me? -- Added file: http://bugs.python.org/file15346/offt_formats.patch ___ Python

[issue7228] %lld for PyErr_Format (Modules/_io/bufferedio.c)

2009-11-15 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- priority: - normal ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7228 ___ ___ Python-bugs-list

[issue7228] %lld for PyErr_Format (Modules/_io/bufferedio.c)

2009-11-15 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Added extra #ifdef HAVE_LONG_LONG as suggested. Committed to trunk in r76308. I'm working on the merge to py3k, which isn't entirely straightforward. -- ___ Python tracker rep...@bugs.python.org

[issue7228] %lld for PyErr_Format (Modules/_io/bufferedio.c)

2009-11-15 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Just so I don't lose it, here's the current version of the forward merge of r76308 to py3k. In testing this, I found some other possible bugs in the py3k implementation of PyUnicode_FromFormat; I need to investigate and possibly fix those

[issue7228] %lld for PyErr_Format (Modules/_io/bufferedio.c)

2009-10-31 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Patch to add %lld support to PyString_FromFormat(V). (Against the trunk.) -- keywords: +patch stage: - patch review type: - feature request Added file: http://bugs.python.org/file15240/add_lld_format.patch

[issue7228] %lld for PyErr_Format (Modules/_io/bufferedio.c)

2009-10-31 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: I tried your patch on windows, your patch worked great. One little thing: I think line 346 of patch can be wrapped with #ifdef HAVE_LONG_LONG. -- ___ Python tracker

[issue7228] %lld for PyErr_Format (Modules/_io/bufferedio.c)

2009-10-30 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: No, I don't have it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7228 ___ ___

[issue7228] %lld for PyErr_Format (Modules/_io/bufferedio.c)

2009-10-29 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: I've rolled back all the changes I made trying to fix these format arguments; the rollback is in r75939 (trunk), r75941 (py3k) and r75942 (release31-maint). Next time I'll think a bit harder, get a code review, and make sure that the code

[issue7228] %lld for PyErr_Format (Modules/_io/bufferedio.c)

2009-10-28 Thread Hirokazu Yamamoto
New submission from Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp: Hello. There is following sentence in Modules/_io/bufferedio.c, PyErr_Format(PyExc_IOError, Raw stream returned invalid position % PY_PRIdOFF, (PY_OFF_T_COMPAT)n); and PY_PRIdOFF == lld

[issue7228] %lld for PyErr_Format (Modules/_io/bufferedio.c)

2009-10-28 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: I believe r75728 and r75879 are related. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7228 ___

[issue7228] %lld for PyErr_Format (Modules/_io/bufferedio.c)

2009-10-28 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Thanks for reporting this. Do you know what the right conversion specifier is for print(f)ing something of long long type in MSVC? -- ___ Python tracker rep...@bugs.python.org

[issue7228] %lld for PyErr_Format (Modules/_io/bufferedio.c)

2009-10-28 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: The 'long long' define should have been PY_LONG_LONG. I don't know what the appropriate substitute for %lld is, though. -- ___ Python tracker rep...@bugs.python.org

[issue7228] %lld for PyErr_Format (Modules/_io/bufferedio.c)

2009-10-28 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: MSVC6 uses __int64 as 64bit integer, and printf uses I64 as its specifier. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7228

[issue7228] %lld for PyErr_Format (Modules/_io/bufferedio.c)

2009-10-28 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: So PY_PRIdOFF should be I64d? Or just I64? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7228 ___

[issue7228] %lld for PyErr_Format (Modules/_io/bufferedio.c)

2009-10-28 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Oh, I was late. I agree with msg94605. printf(%I64d\n, 1I64 40); /* 1099511627776 */ So if PyErr_Format (actually, PyString_FromFormatV) will support PY_LONG_LONG, I think we can use same technique as PY_FORMAT_SIZE_T like

[issue7228] %lld for PyErr_Format (Modules/_io/bufferedio.c)

2009-10-28 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: I was late again...? Hmm, I thought Python tracker told me that somebody else modified this issue. Anyway, printf can use both %I64 and %I64d for signed 64bit integer, but should use %I64u for unsigned 64bit integer AFAIK. But

[issue7228] %lld for PyErr_Format (Modules/_io/bufferedio.c)

2009-10-28 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Thanks. I'm just going to fix Modules/io/_iomodule.h for now. But I agree that it might make sense to have a PY_FORMAT_OFF_T or PY_FORMAT_LONG_LONG in pyport.h, especially if uses of off_t become more widespread in the codebase. I also

[issue7228] %lld for PyErr_Format (Modules/_io/bufferedio.c)

2009-10-28 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Aargh. You're right, of course. PyString_FromFormatV needs to be updated, or avoided in this case. I'll look at this later today. -- assignee: - mark.dickinson ___ Python tracker

[issue7228] %lld for PyErr_Format (Modules/_io/bufferedio.c)

2009-10-28 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Sorry for confusion. I shouldn't have said last 3 lines in msg94601. :-( -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7228