#200 Makepy do not work for python-2.4.1c2

closed-wont-fix
Mark Hammond
com (105)
8
2006-04-01
2005-03-19
Boris Nazaroff
No

I've tried to install python-2.4.1c2 and pywin32 -
(build 203 for 2.4). And when trying to use makepy on
MSXML-4 or MSXML-3 it just bailed out with syntax error
somewhere in the generated py-file. (Moreover, i've
tried com tests - many of them have failed).

Also I've tried latest CVS snapshot as of 10:00 (GMT+3)
19-Mar, have built it with MSVS 7.1 - no luck.

I cannot decide if this is related to the "long code"
bug, since (1) python do not crash, it just report
syntax error and (2) this "long code" appears to be
fixed at this moment. So I desided to add this issue as
a new bug.

Unfortunately I cannot check it with python 2.4 now,
I'll report on this later. (Since latest ActiveState
Python build works fine for me with python 2.4, and, as
I think with pywin January snapshot - there were some
pathches for overflows in the generation).

I'll attach generated gen-py file and the error
message, may be it'll help.

Discussion

1 2 > >> (Page 1 of 2)
  • Boris Nazaroff
    Boris Nazaroff
    2005-03-19

     
    Attachments
  • Mark Hammond
    Mark Hammond
    2005-03-20

    Logged In: YES
    user_id=14198

    That is a very strange error - I can see no problem with the
    generated file, and the error in the traceback is clearly
    referencing a 'return' in a comment. I've never seen
    anything like it :)

     
  • Boris Nazaroff
    Boris Nazaroff
    2005-03-20

    Logged In: YES
    user_id=1242633

    It appears that it 'errs' in random place, at least I have
    tried several COMs and haven't succeeded in finding a
    patter, except that it always in the comment after some
    function.

    I'll try to reproduce it on another computer at work.

    May be it is 2.4.1 that is broken...

     
  • Boris Nazaroff
    Boris Nazaroff
    2005-03-21

    Logged In: YES
    user_id=1242633

    Ok, I've tried it on python 2.4 and 2.4.1c2. Generated
    {CLSID}.py file on 2.4.1c2.

    2.4 imports it Ok
    2.4.1c2 reports error in this module

    I do not know Python enough ot decide if this is a bug in
    2.4.1c2 (or in 2.4 contrary, that parsed errorneous file Ok
    instead of producing an error). If this is a bug in 2.4.1c2,
    should it be reported to python project?

     
  • Mark Hammond
    Mark Hammond
    2005-03-21

    Logged In: YES
    user_id=14198

    I can repro this - thanks! See http://www.python.org/sf/1163244

     
  • Mark Hammond
    Mark Hammond
    2005-03-21

    • priority: 5 --> 8
    • assigned_to: nobody --> mhammond
    • status: open --> open-accepted
     
  • Boris Nazaroff
    Boris Nazaroff
    2005-03-31

    Logged In: YES
    user_id=1242633

    2.4.1 is out and still the same story :-(

     
  • janez jere
    janez jere
    2005-04-01

    Logged In: YES
    user_id=182593

    it must be a python bug, because a single space = ' ' fixes
    the code and python proceeds.

    Example: if error is reported on "ret = ..." line bellow,
    just add one single space at the end of the line before
    error: in this case at the end def clone....):--> <--

    # Result is of type IXMLDOMNode
    def cloneNode(self, deep=defaultNamedNotOptArg):
    ret = self._oleobj_.InvokeTypes(19, LCID, 1, (9, 0), ((11,
    1),),deep
    )

    In all cases an extra space before error is good workaround

     
  • James Kew
    James Kew
    2005-04-06

    Logged In: YES
    user_id=598066

    I think I might be experiencing the same bug: on ActiveState
    Python 2.4.1, and iTunes 4.7.1, running

    import win32com.client
    win32com.client.gencache.EnsureDispatch
    ("iTunes.Application")

    throws a syntax error:

    "C:\DOCUME~1\James\LOCALS~1\Temp\gen_py\2.4
    \9E93C96F-CF0D-43F6-8BA8-B807A3370712x0x1x2
    \IiTunes.py", line 232
    "CurrentVisual": (1610743851, 2, (9, 0),
    (), "CurrentVisual", '{340F3315-ED72-4C09-9ACF-
    21EB4BDF9931}'),
    "EQEnabled": (1610743853, 2, (11, 0),
    (), "EQEnabled", None),

    ^
    SyntaxError: invalid syntax

     
  • Mark Hammond
    Mark Hammond
    2006-04-01

    • status: open-accepted --> closed-wont-fix
     
1 2 > >> (Page 1 of 2)