Bug 409209 - Python import do not support attributes with initializers
Summary: Python import do not support attributes with initializers
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: importer (show other bugs)
Version: 2.28.2 (KDE Applications 19.04.2)
Platform: Other All
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-26 12:10 UTC by Ralf Habacker
Modified: 2019-06-26 13:25 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 2.28.3 (KDE Applications 19.04.3)
Sentry Crash Report:


Attachments
test case (1.59 KB, text/x-python)
2019-06-26 12:10 UTC, Ralf Habacker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Habacker 2019-06-26 12:10:30 UTC
Created attachment 121159 [details]
test case

SUMMARY

Static and instance specific class attributes with initializiers are not imported

STEPS TO REPRODUCE
1. download appended test case
2. start umbrello
3. choose python as active language
3. import appended file

OBSERVED RESULT
umbrello interprets initializations for list, dict and tuple incorrectly

EXPECTED RESULT
umbrello should import the initializations as attribute initial values


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Ralf Habacker 2019-06-26 13:25:08 UTC
Git commit 8d46395ab8ad6b7021035dd1c11e5cfd00757b62 by Ralf Habacker.
Committed on 26/06/2019 at 12:15.
Pushed by habacker into branch 'Applications/19.04'.

Fix 'Python import do not support attributes with initializers'
FIXED-IN:2.28.3 (KDE Applications 19.04.3)

M  +21   -3    test/import/python/types.py
M  +22   -9    umbrello/codeimport/pythonimport.cpp

https://commits.kde.org/umbrello/8d46395ab8ad6b7021035dd1c11e5cfd00757b62