Bug 374597 - Python export and re-import breaks function names and private attribute of private functions
Summary: Python export and re-import breaks function names and private attribute of pr...
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: 2.13.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-05 15:08 UTC by a.baumfalk
Modified: 2017-01-05 15:43 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 2.21.1 (KDE Applications 16.12.1)


Attachments
re-imported from python code (9.71 KB, text/x-xmi)
2017-01-05 15:08 UTC, a.baumfalk
Details
starting case after adding public/private function pair (9.17 KB, text/x-xmi)
2017-01-05 15:10 UTC, a.baumfalk
Details

Note You need to log in before you can comment on or make changes to this bug.
Description a.baumfalk 2017-01-05 15:08:40 UTC
Created attachment 103213 [details]
re-imported from python code

Steps to reproduce:
---------------------------
1. create a class with a public function named "publicFunction" and a private function named "privateFunction".
2. Export to python, result will be:
---
class MyClass(object):

  """


  :version:
  :author:
  """

  def publicFunction(self):
    """


    @return  :
    @author
    """
    pass

  def __privateFunction(self):
    """


    @return  :
    @author
    """
    pass
---

3. re-import from exported Code (see attached Umbrello2.xmi).
As a result I get a public function with the name "__privateFunction" instead of a private function with the name "privateFunction".
Comment 1 a.baumfalk 2017-01-05 15:10:00 UTC
Created attachment 103214 [details]
starting case after adding public/private function pair
Comment 2 Ralf Habacker 2017-01-05 15:43:34 UTC
Git commit 4284cc069969b3b53916f7eeaaed5fa0c62ac54d by Ralf Habacker.
Committed on 05/01/2017 at 15:43.
Pushed by habacker into branch 'Applications/16.12'.

Parse and set method visibility in python import.
FIXED-IN:2.21.1 (KDE Applications 16.12.1)

M  +10   -3    umbrello/codeimport/pythonimport.cpp

https://commits.kde.org/umbrello/4284cc069969b3b53916f7eeaaed5fa0c62ac54d