[issue5117] os.path.relpath problem with root drive directory on windows

2009-01-31 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto : Removed file: http://bugs.python.org/file12905/fix_relpath_v2.patch ___ Python tracker <http://bugs.python.org/issue5117> ___ ___ Python-bug

[issue5117] os.path.relpath problem with root drive directory on windows

2009-01-31 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto : Added file: http://bugs.python.org/file12906/fix_relpath_v2.patch ___ Python tracker <http://bugs.python.org/issue5117> ___ ___ Python-bug

[issue5117] os.path.relpath problem with root drive directory on windows

2009-01-31 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: It seems that there is still problem. >>> ntpath.relpath("//whiterab-c2znlh/foo/", "//whiterab-c2znlh/bar/") '..\\foo' This should raise ValueError because "//whiterab-c2znlh/foo" is UNC root prefix (like &q

[issue5117] os.path.relpath problem with root drive directory on windows

2009-01-31 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I hope this works. Added file: http://bugs.python.org/file12907/fix_relpath_v3.patch ___ Python tracker <http://bugs.python.org/issue5

[issue5117] os.path.relpath problem with root drive directory on windows

2009-01-31 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto : Removed file: http://bugs.python.org/file12904/fix_relpath.patch ___ Python tracker <http://bugs.python.org/issue5117> ___ ___ Python-bug

[issue5117] os.path.relpath problem with root drive directory on windows

2009-01-31 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto : Removed file: http://bugs.python.org/file12906/fix_relpath_v2.patch ___ Python tracker <http://bugs.python.org/issue5117> ___ ___ Python-bug

[issue5117] os.path.relpath problem with root drive directory on windows

2009-01-31 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto : ___ Python tracker <http://bugs.python.org/issue5117> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/o

[issue5117] os.path.relpath problem with root drive directory on windows

2009-01-31 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto : -- versions: +Python 2.7, Python 3.0, Python 3.1 ___ Python tracker <http://bugs.python.org/issue5117> ___ ___ Python-bugs-list m

[issue5117] os.path.relpath problem with root directory

2009-02-01 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto : -- title: os.path.relpath problem with root drive directory on windows -> os.path.relpath problem with root directory ___ Python tracker <http://bugs.python.org/iss

[issue4804] Python on Windows disables all C runtime library assertions

2009-02-02 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Maybe already conclusion is met, so probably I shouldn't post this patch but... here is the patch implementing msg80934. I believe this is thread safe. (This patch doesn't include codes of fopen.patch, but it doesn't mean they are not necessa

[issue4804] Python on Windows disables all C runtime library assertions

2009-02-02 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Just impression. I feel Martin's "disable globally, and provide API to turn it on" is simple and good. +1/2. Of course, my impression is biased by the fact I have never used _ASSERTE even when debugging python. ___

[issue4804] Python on Windows disables all C runtime library assertions

2009-02-02 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Of course, this won't work someone else altered hook function. ___ Python tracker <http://bugs.python.org/issue4804> ___ ___

[issue4804] Python on Windows disables all C runtime library assertions

2009-02-02 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Sorry for interruption. Maybe is _CrtSetReportHook useful? http://msdn.microsoft.com/en-us/library/0yysf5e6(VS.80).aspx 1. Call _CrtSetReportHook on startup 2. Py_BEGIN_CRT_ERROR_HANDLING sets flag in thread local storage. 3. In hook function, look at above

[issue4804] Python on Windows disables all C runtime library assertions

2009-02-03 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: >Only file descriptors seem to have no way to verify them. How about _get_osfhandle()? (Strictly, there is race condition between _get_osfhandle and fdopen etc though) ___ Python tracker <http://bugs.python.org/iss

[issue4804] Python on Windows disables all C runtime library assertions

2009-02-03 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Hmm, maybe _lock_fhandle can be used to solve such race condition. I'm not sure. ___ Python tracker <http://bugs.python.org/i

[issue4804] Python on Windows disables all C runtime library assertions

2009-02-03 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto : ___ Python tracker <http://bugs.python.org/issue4804> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/o

[issue4804] Python on Windows disables all C runtime library assertions

2009-02-03 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto : ___ Python tracker <http://bugs.python.org/issue4804> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/o

[issue4804] Python on Windows disables all C runtime library assertions

2009-02-03 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: >Only file descriptors seem to have no way to verify them. How about _get_osfhandle()? I cannot see _ASSERTE in that function on VC6, but maybe there on VC9. ___ Python tracker <http://bugs.python.org/iss

[issue4804] Python on Windows disables all C runtime library assertions

2009-02-04 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Here is the patch implementing msg81093. (check_fd.patch) I tested this on VC6. (test_os passed) I hope this also works on VC9 as well. Added file: http://bugs.python.org/file12942/check_fd.patch ___ Python tracker

[issue5160] Intermittant segmentation fault with ctrl-c (threads and queues)

2009-02-06 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Here is stack trace. PyEval_EvalFrameEx(_frame * 0x00a62060, int 83) line 2841 + 6 bytes fast_function(_object * 0x, _object * * * 0x00fbfa98, int 1, int 1, int 9870576) line 3946 call_function(_object * * * 0x00fbfa98, int 0) line 3880 + 16 bytes

[issue5167] distutils/test_customize_compiler fails on windows

2009-02-06 Thread Hirokazu Yamamoto
New submission from Hirokazu Yamamoto : test_customize_compiler fails on windows with following error message. ERROR: test_customize_compiler (distutils.tests.test_sysconfig.SysconfigTestCase ) -- Traceback (most recent call

[issue4804] Python on Windows disables all C runtime library assertions

2009-02-06 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Sorry, I don't have VS2005. By the way, _PyVerify_fd seems to be required to VC6 too. Because fdopen(fd >= _NHANDLE_) crashes on debug build and fdopen(bad fd < _NHANDLE_) won't set errno to EBADF. __

[issue4804] Python on Windows disables all C runtime library assertions

2009-02-06 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I agree. Please focus on _MSC_VER >= 1400. I'll post new issue about VC6 after this issue will be solved. ___ Python tracker <http://bugs.python.or

[issue5160] Intermittant segmentation fault with ctrl-c (threads and queues)

2009-02-08 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: This seems to be duplicate of issue1856. Let me close this entry. -- resolution: -> duplicate status: open -> closed superseder: -> shutdown (exit) can hang or segfault with daemon threads running _

[issue5197] vars() assignment fails silently when assignments made later

2009-02-09 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: According to http://docs.python.org/library/functions.html#vars >The returned dictionary should not be modified: the effects on the >corresponding symbol table are undefined. Same can be said for locals() as well. -- nosy: +ocean-city reso

[issue5199] warns vars() assignment as well as locals()

2009-02-09 Thread Hirokazu Yamamoto
New submission from Hirokazu Yamamoto : This comes from issue5197. Maybe we can emphasize a behavior of assignment to vars() is undefined if decorated with red block of *warning* as well as locals(). This patch is for release26-maint. -- assignee: georg.brandl components: Documentation

[issue5204] test.os/TestInvalidFD/test_fdopen on VC6

2009-02-10 Thread Hirokazu Yamamoto
New submission from Hirokazu Yamamoto : This comes from issue4804. This simple patch is required to pass test_fdopen on VC6. -- components: Windows files: test_fdopen_on_vc6.patch keywords: patch messages: 81551 nosy: ocean-city severity: normal stage: commit review status: open title

[issue4804] Python on Windows disables all C runtime library assertions

2009-02-10 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I opened new issue related to VC6 as issue5204. ___ Python tracker <http://bugs.python.org/issue4804> ___ ___ Python-bugs-list mailin

[issue5204] test.os/TestInvalidFD/test_fdopen on VC6

2009-02-10 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Thanks, committed in r69516. -- resolution: accepted -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/

[issue5204] test.os/TestInvalidFD/test_fdopen on VC6

2009-02-10 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto : -- stage: commit review -> committed/rejected ___ Python tracker <http://bugs.python.org/issue5204> ___ ___ Python-bugs-list mai

[issue5240] time.strptime fails to match data and format with Unicode whitespaces (Py3)

2009-02-13 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: By quick observation, I found this problem goes away if following change is applied. Index: Lib/_strptime.py === --- Lib/_strptime.py(revision 69496) +++ Lib/_strptime.py(working copy

[issue5240] time.strptime fails to match data and format with Unicode whitespaces (Py3)

2009-02-13 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: OK, I'll close this entry as duplicated. -- resolution: -> duplicate status: open -> closed superseder: -> time.strptime("2009", "%Y") raises a value error ___ Python tracker

=?utf-8?q?[issue5239]_time.strptime("=EF=BC=92=EF=BC=90=EF=BC=90=EF=BC=99", _"%Y")_raises_a_value_error?=

2009-02-13 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: This patch comes from issue5240. I think testcase is needed. I'll try if I can. -- dependencies: +re.IGNORECASE not Unicode-ready keywords: +patch nosy: +ocean-city Added file: http://bugs.python.org/file13071/remove_ascii_flag.

[issue5239] Change time.strptime() to make it work with Unicode chars

2009-02-13 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Hmm, this fails on python2 too. Maybe re.ASCII is added for backward compatibility? Again, I'm not familiar with unicode, so I won't call remove_ascii_flag.patch as *fix*. -- nosy: +pitrou ___ Pyth

[issue5249] Fix strftime on windows.

2009-02-13 Thread Hirokazu Yamamoto
New submission from Hirokazu Yamamoto : On windows, format string should be encoded as mbcs. Otherwise, result of strftime would be broken. Here is the patch. -- components: Extension Modules, Windows files: fix_strftime_on_windows.patch keywords: patch messages: 81946 nosy: ocean-city

[issue5239] Change time.strptime() to make it work with Unicode chars

2009-02-13 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I added test. But this requires issue5249 fix to be passed on windows. (I used "\u3000" instead of "\xa0" because "\xa0" cannot be decoded on windows mbcs) -- dependencies: +Fix strftime on windows. Added file: ht

[issue5239] Change time.strptime() to make it work with Unicode chars

2009-02-13 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto : Removed file: http://bugs.python.org/file13071/remove_ascii_flag.patch ___ Python tracker <http://bugs.python.org/issue5239> ___ ___ Pytho

[issue5249] Fix strftime on windows.

2009-02-13 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto : -- priority: -> high ___ Python tracker <http://bugs.python.org/issue5249> ___ ___ Python-bugs-list mailing list Unsubscri

[issue5249] Fix strftime on windows.

2009-02-13 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: On VC6, wcsftime simply converts *format* to mbcs string, calls strftime, and converts result to unicode, so there is no difference between my patch and wcsftime. (Newer VC's wcsftime might have different implementation though) Maybe you are concerning

[issue5249] Fix strftime on windows.

2009-02-13 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I experimentally implemented with wcsftime, but I couldn't get same result as strftime + mbcs conversion. Probably because wcsftime depends on locale. Added file: http://bugs.python.org/file13079/experimental_wcsftime.

[issue5249] Fix strftime on windows.

2009-02-13 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto : ___ Python tracker <http://bugs.python.org/issue5249> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/o

[issue5249] Fix strftime on windows.

2009-02-13 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Sorry, if we use wcsftime, I cannot create the patch. On VC6, wcsftime returns not unicode but mbcs string which copied to wchar array. Maybe on snakebite.org, I can access VC9 and confirm its behavior on it

[issue1027570] os.stat errors when using shared drive on XP or NT

2009-02-14 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I tried on Win2000, I cannot reproduce this bug. Probably this issue was fixed at some point. -- nosy: +ocean-city ___ Python tracker <http://bugs.python.org/issue1027

[issue1027570] os.stat errors when using shared drive on XP or NT

2009-02-14 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I'll close this entry. Please reopen if something left. (ex: not work on XP or so) -- resolution: -> out of date status: open -> closed ___ Python tracker <http://bugs.python.or

[issue5273] 3.0.1 crashes in unicode path

2009-02-15 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Quick observation. This bug was introduces in r68363. import.c(994) newname = PyUnicode_FromString(pathname); pathname is mbcs on windows, but PyUnicode_FromString assumes it as UTF8. -- nosy: +ocean-city

[issue5273] 3.0.1 crashes in unicode path

2009-02-15 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Here is a patch. -- components: +Interpreter Core, Unicode keywords: +patch versions: +Python 3.1 Added file: http://bugs.python.org/file13098/fix_import.patch ___ Python tracker <http://bugs.python.

[issue5273] 3.0.1 crashes in unicode path

2009-02-15 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I'm not sure. Even my patch might not be correct anyway. On my VC6 Debugger, update_compiled_module(PyCodeObject *co, char *pathname) pathname is surely mbcs. But its caller load_source_module is calling if (fstat(fileno(fp), &

[issue5273] 3.0.1 crashes in unicode path

2009-02-15 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I tracked down, and I found this mbcs path is set in Python/import.c(1394) find_module. if (PyUnicode_Check(v)) { v = PyUnicode_AsEncodedString(v, Py_FileSystemDefaultEncoding, NULL); if (v

[issue5273] 3.0.1 crashes in unicode path

2009-02-15 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: >Should PyUnicode_CompareWithASCIIString() be replaced with something >else as well? I hope revised patch will fix this too. There seems to be no function to compare unicode object and file system encoded string, so I moved unicode creation

[issue5273] 3.0.1 crashes in unicode path

2009-02-15 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto : Removed file: http://bugs.python.org/file13098/fix_import.patch ___ Python tracker <http://bugs.python.org/issue5273> ___ ___ Python-bug

[issue5249] Fix strftime on windows.

2009-02-15 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Locale is my weak point. :-( If there is locale encoding function like PyUnicode_DecodeFSDefault for file system encoding, I think I can use it. ___ Python tracker <http://bugs.python.org/issue5

[issue5249] Fix strftime on windows.

2009-02-16 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Thanks, fixed in r69664(py3k) and r69665(release30-maint). -- priority: high -> resolution: accepted -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tr

[issue5282] mmap.resize and offset

2009-02-16 Thread Hirokazu Yamamoto
New submission from Hirokazu Yamamoto : This is first time to look at mmap module, so sorry if I'm saying totally wrong thing. (I noticed this when I saw issue2733) I think the behavior of mmap_resize_method is unclear when mapping object is created with offset > 0. >From vi

[issue5282] mmap.resize and offset

2009-02-16 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Yes, I noticed this issue while investigating issue2733. But sorry, I couldn't reproduce the bug on my machine. Even so, LPDWORD arg for SetPointer can be modified, so your patch looks correct. (There is SetPointerEx which can make the code simpler, but

[issue6416] Failed to compile selectmodule.c on windows (trunk)

2009-07-04 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto : -- priority: -> high ___ Python tracker <http://bugs.python.org/issue6416> ___ ___ Python-bugs-list mailing list Unsubscri

[issue6416] Failed to compile selectmodule.c on windows (trunk)

2009-07-04 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto : -- versions: +Python 3.1 ___ Python tracker <http://bugs.python.org/issue6416> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue6416] Failed to compile selectmodule.c on windows (trunk)

2009-07-04 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto : -- versions: +Python 3.2 -Python 3.1 ___ Python tracker <http://bugs.python.org/issue6416> ___ ___ Python-bugs-list mailin

[issue2733] mmap resize fails on anonymous memory

2009-07-05 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I still think we should forbid to resize anonymous memory map because this operation is really problematic. I think original poster's purpose can be fulfilled with creation of another mmap object with same tagname. Here is a patch f

[issue6455] Lib/distutils/tests/test_build_ext.py fails on windows

2009-07-09 Thread Hirokazu Yamamoto
New submission from Hirokazu Yamamoto : Extention name of shared object is ".pyd" not ".so" on windows. I hope attached patch will fix this issue. -- assignee: tarek components: Distutils, Windows files: fix_distutils_test.patch keywords: patch messages: 90376 nos

[issue6459] Lib/distutils\tests\test_build_ext.py fails on VC6

2009-07-10 Thread Hirokazu Yamamoto
New submission from Hirokazu Yamamoto : I got distutils error on Lib/distutils\tests\test_build_ext.py. I hope attached file will fix this issue. (This should complete r64127) E:\python-dev\py3k>py3k Lib\distutils\tests\test_build_ext.py test_build_ext (__main__.BuildExtTestC

[issue6459] distutils.command.build_ext.get_export_symbols should use the "PyInit" prefix rather then "init"

2009-07-11 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Well, I'm not sure but for example, Modules/_randomemodule.c uses "init_random" on trunk. Is it OK to use "PyInit" on trunk too? -- ___ Python tracker <http

[issue6459] distutils.command.build_ext.get_export_symbols should use the "PyInit" prefix rather then "init"

2009-07-11 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: bsddb seems to use #if directive to switch function name. ("init_bsddb" on trunk) #if (PY_VERSION_HEX < 0x0300) DL_EXPORT(void) init_bsddb(void) #else PyMODINIT_FUNC PyInit__bsddb(void)/* Note the two underscores */ #endif And

[issue6493] Can not set value for structure members larger than 32 bits

2009-07-16 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: What's your platform? I could reproduce this on windows. And I found attached patch can workaround this. -- keywords: +patch nosy: +ocean-city Added file: http://bugs.python.org/file14506/ctypes_workaround.

[issue6493] Can not set value for structure members larger than 32 bits

2009-07-16 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto : Added file: http://bugs.python.org/file14507/ctypes_workaround_2.patch ___ Python tracker <http://bugs.python.org/issue6493> ___ ___ Pytho

[issue6415] warnings.warn segfaults on bad formatted string

2009-07-17 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I've committed in r74040(trunk), r74043(release26-maint), r74046(py3k), r74047(release31-maint). Is release30-maint still active? -- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed version

[issue6415] warnings.warn segfaults on bad formatted string

2009-07-18 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Thank you, I've fixed it in r74091. I should have checked test results on all branches. -- ___ Python tracker <http://bugs.python.org/i

[issue6946] Document: Missing link to datetime.datetime

2009-09-19 Thread Hirokazu Yamamoto
New submission from Hirokazu Yamamoto : Please see http://docs.python.org/genindex-D.html. "datetime (class in datetime), [1]" links to same address. I think "[1]" should point to http://docs.python.org/library/datetime.html#datetime-datetime. -- assignee: geo

[issue6947] Fix distutils test on windows (SO extension)

2009-09-19 Thread Hirokazu Yamamoto
New submission from Hirokazu Yamamoto : This will fix distutils test error on windows. -- assignee: tarek components: Distutils, Tests files: test_distutils.patch keywords: patch messages: 92864 nosy: ocean-city, tarek severity: normal status: open title: Fix distutils test on windows

[issue6869] Embedded python crashed on 4th run, if "ctypes" is used

2009-09-19 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I hope attached patch will fix this issue. -- keywords: +patch nosy: +ocean-city Added file: http://bugs.python.org/file14936/fix_ctypes_crash.patch ___ Python tracker <http://bugs.python.org/issue6

[issue7043] test_urllib: constructLocalFileUrl returns invalid URLs on Windows

2009-10-04 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I think this can be fixed by merging r72343. -- nosy: +ocean-city ___ Python tracker <http://bugs.python.org/issue7

[issue6676] expat parser throws Memory Error when parsing multiple files

2009-10-09 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I'm not familiar with expat, but we can see what is happening more clearly with attached adhok patch. Traceback (most recent call last): File "expat-error.py", line 14, in p.ParseFile(file) xml.parsers.expat.ExpatError: parsing f

[issue3210] subprocess.Popen does not release process handles if process cannot be started

2009-10-09 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: No, this is not duplicate of issue5179. That issue described handle was leaked when exception occurred. But this issue is not *leak*. See following code. import subprocess, os, sys file = open("filename", "w") try: proc = subprocess.

[issue3210] subprocess.Popen does not release process handles if process cannot be started

2009-10-09 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Probably we can fix this issue by calling Close() of sp_handle_type somewhere in Lib/subprocess.py, but I have no patch now. -- ___ Python tracker <http://bugs.python.org/issue3

[issue6676] expat parser throws Memory Error when parsing multiple files

2009-10-09 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Well, I tried to write test like this. 1. Check if xml.parsers.expat.error is raised. 2. Compare *code* attribute of error object with xml.parsers.expat.errors.XML_ERROR_FINISHED But I noticed XML_ERROR_FINISHED is not integer but string. (!) According to

[issue6676] expat parser throws Memory Error when parsing multiple files

2009-10-09 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Here is the patch. I'm not confident with my English comment though. -- Added file: http://bugs.python.org/file15090/pyexpat.patch ___ Python tracker <http://bugs.python.org/i

[issue6676] expat parser throws Memory Error when parsing multiple files

2009-10-09 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto : Removed file: http://bugs.python.org/file15089/pyexpat_addhok.patch ___ Python tracker <http://bugs.python.org/issue6676> ___ ___ Python-bug

[issue6676] expat parser throws Memory Error when parsing multiple files

2009-10-09 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I knew existence of that new feature, but didn't know how to use it. -- ___ Python tracker <http://bugs.python.org/i

[issue6676] expat parser throws Memory Error when parsing multiple files

2009-10-09 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Hmm, looks useful. I think your patch is good. Only one problem is that we cannot use this new feature in python2.6. If we use my patch in that branch, I think there is no problem. -- ___ Python tracker <h

[issue7112] unicodetype_db.h warning: integer constant is too large for 'long'

2009-10-12 Thread Hirokazu Yamamoto
New submission from Hirokazu Yamamoto : I've got this warning while compiling on coLinux. gcc -pthread -c -fno-strict-aliasing -g -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -o Objects/unicodectype.o Objects/unicodectype.c In file included from Objects/unicodect

[issue5985] Implement os.path.samefile and os.path.sameopenfile on Windows

2009-10-14 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Here is my experimental patch. -- keywords: +patch nosy: +ocean-city Added file: http://bugs.python.org/file15122/samefile.patch ___ Python tracker <http://bugs.python.org/issue5

[issue5985] Implement os.path.samefile and os.path.sameopenfile on Windows

2009-10-14 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: > extend stat/fstat on Windows to set st_dev and st_ino to sensible > values (based on dwVolumeSerialNumber and nFileIndexLow/High) Once I considered this approach, but problems was that nFileIndexLow/High can change every time file handle is open

[issue5985] Implement os.path.samefile and os.path.sameopenfile on Windows

2009-10-14 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I'm not sure about this neither. So, XXX is in comment. ;-) On abspath() above, it also tries to import native method _getfullpathname(), and when it fails alternative implementation runs. (probably when someone calls ntpath.abspath from linux or some

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

2009-10-27 Thread Hirokazu Yamamoto
New submission from Hirokazu Yamamoto : 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&quo

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

2009-10-27 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I believe r75728 and r75879 are related. -- ___ Python tracker <http://bugs.python.org/issue7228> ___ ___ Python-bugs-list m

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

2009-10-28 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: MSVC6 uses __int64 as 64bit integer, and printf uses "I64" as its specifier. -- ___ Python tracker <http://bugs.python.

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

2009-10-28 Thread Hirokazu Yamamoto
Hirokazu Yamamoto 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 #define PY_

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

2009-10-28 Thread Hirokazu Yamamoto
Hirokazu Yamamoto 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 AFA

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

2009-10-28 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Sorry for confusion. I shouldn't have said last 3 lines in msg94601. :-( -- ___ Python tracker <http://bugs.python.org/i

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

2009-10-30 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: No, I don't have it. -- ___ Python tracker <http://bugs.python.org/issue7228> ___ ___ Python-bugs-list mailing list

[issue1739118] Investigated ref leak report related to thread regrtest.py

2009-10-30 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: This issue seems to be fixed in r75958. -- resolution: -> duplicate status: open -> closed superseder: -> memory leaks in py3k ___ Python tracker <http://bugs.python.org/

[issue7244] itertools.zip_longest behaves strangely with an iterable class

2009-10-31 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I saw strange thing with following code + release26-maint/trunk. from itertools import * class Repeater(object): # this class is similar to itertools.repeat def __init__(self, o, t): self.o = o self.t = int(t) def __iter__(self): # its

[issue7244] itertools.zip_longest behaves strangely with an iterable class

2009-10-31 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I hope an attached patch will fix this issue. (this patch is for trunk) I think PyErr_Clear() is needed to clear StopIteration there. -- keywords: +patch versions: +Python 2.6, Python 2.7, Python 3.2 Added file: http://bugs.python.org/file15239

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

2009-10-31 Thread Hirokazu Yamamoto
Hirokazu Yamamoto 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 <http://bugs.python.

[issue7244] itertools.zip_longest behaves strangely with an iterable class

2009-11-01 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I created the patch to improve test which was checked in r76004. This patch checks if correct elements are returned even when RuntimeError is raised. Could you take a look? -- Added file: http://bugs.python.org/file15245/improve_test_itertools.patch

[issue7244] itertools.zip_longest behaves strangely with an iterable class

2009-11-01 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: > correct elements are returned even when RuntimeError is raised. Or maybe it is not guaranteed. :-) -- ___ Python tracker <http://bugs.python.org/iss

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

2009-11-23 Thread Hirokazu Yamamoto
Hirokazu Yamamoto 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 <http://bugs.python.

[issue5282] mmap.resize and offset

2009-02-16 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I investigated more. Following code crashed with bus error on coLinux. import mmap def main(): align = mmap.ALLOCATIONGRANULARITY with open("a.txt", "w") as f: f.write("0" * align) f.write("1&qu

[issue5292] mmap crashes just on boundary.

2009-02-17 Thread Hirokazu Yamamoto
New submission from Hirokazu Yamamoto : I noticed following code crashes. I'll post fix soon. import mmap import os def main(): align = mmap.ALLOCATIONGRANULARITY path = os.path.splitext(__file__)[0] + ".txt" with open(path, "w") as f:

[issue5292] mmap crashes just on boundary.

2009-02-17 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Here is a patch. -- keywords: +patch Added file: http://bugs.python.org/file13115/fix_segfault_on_boundary.patch ___ Python tracker <http://bugs.python.org/issue5

[issue5292] mmap crashes just on boundary.

2009-02-17 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: This is obvious bug (and fix is obvious too), so I've commited in r69714. -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python

<    2   3   4   5   6   7   8   9   10   >