Bug 328055 - Python import broken when using multi line comments
Summary: Python import broken when using multi line comments
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: 2.11.0
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-25 12:04 UTC by Ralf Habacker
Modified: 2013-11-25 13:00 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 4.11.4


Attachments
testcase (259 bytes, text/x-python)
2013-11-25 12:05 UTC, Ralf Habacker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Habacker 2013-11-25 12:04:32 UTC
Importing the a python file containing the following class definitions with multi line comments let umbrello only create the class, not the methods: 

class test(object):
	""" class doc line 1
		class doc line2 """

	def function(a,b,c):
		""" method function line 1
			method function line 2
		""" 
		return a

	def function2(a,b,c):
		""" method function2 line 1
			method function2 line 2
		""" 
		return b


Reproducible: Always

Steps to Reproduce:
1. open umbrello
2. import the attached python file

Actual Results:  
Only the class from the test case is created, the methods not 

Expected Results:  
The methods should be created inside the class they belong to 

found bug in 4.11.0, may be introduced earlier
Comment 1 Ralf Habacker 2013-11-25 12:05:19 UTC
Created attachment 83750 [details]
testcase
Comment 2 Ralf Habacker 2013-11-25 12:57:19 UTC
Git commit f8777927eb3db9d3718f597335250b5057650184 by Ralf Habacker.
Committed on 25/11/2013 at 12:06.
Pushed by habacker into branch 'KDE/4.11'.

Fix broken python import when using multi line comments.

Searching for comment end tag should start *after* comment start tag,
otherwise the comment start tag will be interpreted as comment end tag too.
FIXED-IN:4.11.4

M  +2    -2    umbrello/codeimport/nativeimportbase.cpp

http://commits.kde.org/umbrello/f8777927eb3db9d3718f597335250b5057650184
Comment 3 Ralf Habacker 2013-11-25 12:59:27 UTC
Git commit 9ae6c459e032e47e35ed9775b349224b39f08c1c by Ralf Habacker.
Committed on 25/11/2013 at 12:06.
Pushed by habacker into branch 'KDE/4.12'.

Fix broken python import when using multi line comments.

Searching for comment end tag should start *after* comment start tag,
otherwise the comment start tag will be interpreted as comment end tag too.
FIXED-IN:4.11.4

M  +2    -2    umbrello/codeimport/nativeimportbase.cpp

http://commits.kde.org/umbrello/9ae6c459e032e47e35ed9775b349224b39f08c1c
Comment 4 Ralf Habacker 2013-11-25 13:00:28 UTC
Git commit 185332fa2cef588ca693c8b43df66bce220bbb1d by Ralf Habacker.
Committed on 25/11/2013 at 12:06.
Pushed by habacker into branch 'master'.

Fix broken python import when using multi line comments.

Searching for comment end tag should start *after* comment start tag,
otherwise the comment start tag will be interpreted as comment end tag too.
FIXED-IN:4.11.4
(cherry picked from commit f8777927eb3db9d3718f597335250b5057650184)

M  +2    -2    umbrello/codeimport/nativeimportbase.cpp

http://commits.kde.org/umbrello/185332fa2cef588ca693c8b43df66bce220bbb1d