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

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

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

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

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

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

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

[issue23407] os.walk always follows Windows junctions

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

[issue29248] os.readlink fails on Windows

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

[issue23407] os.walk always follows Windows junctions

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

[issue29248] os.readlink fails on Windows

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

[issue23407] os.walk always follows Windows junctions

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

[issue23407] os.walk always follows Windows junctions

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

[issue23407] os.walk always follows Windows junctions

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

[issue23407] os.walk always follows Windows junctions

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

[issue23407] os.walk always follows Windows junctions

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

[issue23407] os.walk always follows Windows junctions

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

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

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

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

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

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

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

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

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

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

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

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

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

[issue23407] os.walk always follows Windows junctions

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

[issue4997] xml.sax.saxutils.XMLGenerator should write to io.RawIOBase.

2009-07-22 Thread Craig Holmquist
Changes by Craig Holmquist : Removed file: http://bugs.python.org/file14541/xmlgen.patch ___ Python tracker <http://bugs.python.org/issue4997> ___ ___ Python-bugs-list m

[issue4997] xml.sax.saxutils.XMLGenerator should write to io.RawIOBase.

2009-07-22 Thread Craig Holmquist
Craig Holmquist added the comment: Patch for documentation. -- Added file: http://bugs.python.org/file14545/xmlgen-doc.patch ___ Python tracker <http://bugs.python.org/issue4

[issue4997] xml.sax.saxutils.XMLGenerator should write to io.RawIOBase.

2009-07-22 Thread Craig Holmquist
Craig Holmquist added the comment: This new patch removes the "default to stdout" behavior. -- Added file: http://bugs.python.org/file14544/xmlgen2.patch ___ Python tracker <http://bugs.python.

[issue4997] xml.sax.saxutils.XMLGenerator should write to io.RawIOBase.

2009-07-22 Thread Craig Holmquist
Craig Holmquist added the comment: Actually, that patch may not work so well either... out defaults to sys.stdout, but that can't accept bytes. -- ___ Python tracker <http://bugs.python.org/i

[issue4997] xml.sax.saxutils.XMLGenerator should write to io.RawIOBase.

2009-07-22 Thread Craig Holmquist
Craig Holmquist added the comment: Patch attached. This patch doesn't actually restrict the output object to RawIOBase (that wouldn't work well, since files opened as binary are actually derived from BufferedIOBase). Instead, it just assumes the output object has a 'write'

[issue4997] xml.sax.saxutils.XMLGenerator should write to io.RawIOBase.

2009-07-22 Thread Craig Holmquist
Craig Holmquist added the comment: To clarify the specific problem: - If the file object passed to XMLGenerator is opened in binary mode, XMLGenerator raises TypeError as soon as it tries to write to it - If the passed file object is opened in text mode, XMLGenerator writes the prescribed

[issue4631] urlopen returns extra, spurious bytes

2009-01-09 Thread Craig Holmquist
Changes by Craig Holmquist : -- nosy: +craigh ___ Python tracker <http://bugs.python.org/issue4631> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue4566] 2.6.1 breaks many applications that embed Python on Windows

2009-01-02 Thread Craig Holmquist
Craig Holmquist added the comment: The patch works fine on my system (32-bit XP). Also I verified in Process Explorer that there's only one instance of msvcr90.dll loaded. ___ Python tracker <http://bugs.python.org/i

[issue4566] 2.6.1 breaks many applications that embed Python on Windows

2009-01-02 Thread Craig Holmquist
Craig Holmquist added the comment: I haven't been able to try this patch myself yet, but I see a potential problem: the "cookie" variable is declared as a DWORD, while ActivateActCtx expects a ULONG_PTR. DWORD and ULONG_PTR are only the same thing in 32-bit Windows. Also, where

[issue4566] 2.6.1 breaks many applications that embed Python on Windows

2009-01-01 Thread Craig Holmquist
Craig Holmquist added the comment: I took a look at this with the debugger, as Mark recommended. The CRT's DLLMain is called _CRTDLL_INIT, that in turn calls __CRTDLL_INIT. __CRTDLL_INIT calls another function, _check_manifest. _check_manifest calls an SxS function c

[issue4566] 2.6.1 breaks many applications that embed Python on Windows

2009-01-01 Thread Craig Holmquist
Craig Holmquist added the comment: > test.c's error is "can't find the DLL" - this will be as we attempt to > load Python's DLL - but this isn't the same as the original error, which > is "DLL init routine failed". To repro the initial error, I

[issue4566] 2.6.1 breaks many applications that embed Python on Windows

2009-01-01 Thread Craig Holmquist
Craig Holmquist added the comment: Here's an option, though unfortunately not a trivial one: use a private build of the C runtime. The Windows version of Firefox does this (mozcrt19.dll). The private CRT build doesn't use SxS in any way, so it gets around this issue, as well as ot

[issue4566] 2.6.1 breaks many applications that embed Python on Windows

2008-12-07 Thread Craig Holmquist
Craig Holmquist <[EMAIL PROTECTED]> added the comment: > I don't quite understand this issue yet. python26.dll is linked with > a manifest. Isn't that good enough? Apparently not, at least in my testing. It seems that if a DLL is loaded, Windows will try to resolve its d

[issue4566] 2.6.1 breaks many applications that embed Python on Windows

2008-12-06 Thread Craig Holmquist
Craig Holmquist <[EMAIL PROTECTED]> added the comment: I understand the rationale behind #4120, but it seems like it only helps a narrow set of applications, namely "applications that link dynamically with the same version of MSVCR90 as Python and that bundle the MSVCR90 DLL and

[issue4566] 2.6.1 breaks many applications that embed Python on Windows

2008-12-06 Thread Craig Holmquist
Craig Holmquist <[EMAIL PROTECTED]> added the comment: I've attached a manifest file that references the C runtime; adding this file to the Apache bin folder seems to workaround this issue. Added file: http://bugs.python.org/file12250/httpd.e

[issue4566] 2.6.1 breaks many applications that embed Python on Windows

2008-12-06 Thread Craig Holmquist
Craig Holmquist <[EMAIL PROTECTED]> added the comment: I've attached the test program I was using. The commands I used to compile it are: cl /MT /c /IC:\Python26\include testpy.c link /LIBPATH:C:\Python26\libs testpy.obj ___ Python tracker <[E

[issue4566] 2.6.1 breaks many applications that embed Python on Windows

2008-12-06 Thread Craig Holmquist
Changes by Craig Holmquist <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file12249/testpy.c ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue4566] 2.6.1 breaks many applications that embed Python on Windows

2008-12-06 Thread Craig Holmquist
New submission from Craig Holmquist <[EMAIL PROTECTED]>: Applications on Windows that don't link to the MSVCR90.DLL via a manifest are broken with Python 2.6.1. This includes apps that link with the C library statically and apps that link with other versions of it. These applicat

[issue4043] Warnings in IDLE raise TypeError (such as attempting to import deprecated modules)

2008-10-04 Thread Craig Holmquist
Craig Holmquist <[EMAIL PROTECTED]> added the comment: Okay, I think I've got it now: 1. If you import sets, it raises TypeError. However, if you import it a second time, it seems to work properly. 2. Trying to import a module that relies on the deprecated module (ie, sqlalchem

[issue4043] Warnings in IDLE raise TypeError (such as attempting to import deprecated modules)

2008-10-04 Thread Craig Holmquist
Craig Holmquist <[EMAIL PROTECTED]> added the comment: I should have checked this more carefully, but apparently you can still use the imported module after the exception. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue4043] Warnings in IDLE raise TypeError (such as attempting to import deprecated modules)

2008-10-04 Thread Craig Holmquist
Craig Holmquist <[EMAIL PROTECTED]> added the comment: Actually, it looks like ANY warning will raise this error in IDLE. For example: >>> import warnings >>> warnings.warn('blah blah') Traceback (most recent call last): File "", line 1,

[issue4043] Attempting to import deprecated modules in IDLE raises TypeError

2008-10-04 Thread Craig Holmquist
New submission from Craig Holmquist <[EMAIL PROTECTED]>: In Python 2.6, attempting to import depecated modules in IDLE raises a TypeError exception. I verified this with sets, mimify, and MimeWriter. Here's the output for sets: >>> import sets Traceback (most recen

[issue4019] 2.6 (final) uses old icons in Start Menu

2008-10-02 Thread Craig Holmquist
Changes by Craig Holmquist <[EMAIL PROTECTED]>: -- components: +Windows ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4019> ___ __

[issue4019] 2.6 (final) uses old icons in Start Menu

2008-10-02 Thread Craig Holmquist
New submission from Craig Holmquist <[EMAIL PROTECTED]>: The Start Menu icons created by the Python 2.6 installer use the old icons (the green snake, 4-bit color) instead of the new ones (blue and yellow snake, 24-bit color). This was observed on Windows XP. An installation of 2.5.2

[issue3215] Can't import sqlite3 in Python 2.6b1

2008-06-27 Thread Craig Holmquist
New submission from Craig Holmquist <[EMAIL PROTECTED]>: This is observed on Windows XP; I don't know if it affects other platforms. Trying to import sqlite3 gives this error: >>> import sqlite3 Traceback (most recent call last): File "", line 1, in impo

[issue2840] Expat parser locks XML source file if ContentHandler raises an exception

2008-05-12 Thread Craig Holmquist
New submission from Craig Holmquist <[EMAIL PROTECTED]>: This was observed in Python 2.5.2 on Windows XP. Run this code in IDLE: import xml.sax from xml.sax.handler import ContentHandler class C(ContentHandler): def startElement(self, name, attrs): assert