Edwin,

Thanks for the heads-up.  I'll look into it.  I'm traveling right
now, so give me a few days.

Hope you are enjoying your class.

Dave

On Tue, Nov 20, 2018 at 10:43:16AM +0000, Matthijssen, E.F. (Edwin) wrote:
>    Just a short message (I'm in a 2 day course right now, so hardly any
>    time).
> 
>     
> 
>    Out-of-the-box the generated code is not working anymore.
> 
>     
> 
>    For example below a snapshot of the generated code:
> 
>        def export(self, outfile, level, namespaceprefix_='esdl:',
>    namespacedef_='xmlns:esdl="http://www.tno.nl/esdl";', name_='OutPort',
>    pretty_print=True):
> 
>            imported_ns_def_ = GenerateDSNamespaceDefs_.get('OutPort')
> 
>            if imported_ns_def_ is not None:
> 
>                namespacedef_ = imported_ns_def_
> 
>            if pretty_print:
> 
>                eol_ = '\n'
> 
>            else:
> 
>                eol_ = ''
> 
>            if self.original_tagname_ is not None:
> 
>                name_ = self.original_tagname_
> 
>            showIndent(outfile, level, pretty_print)
> 
>            outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_
>    and ' ' + namespacedef_ or '', ))
> 
>            already_processed = set()
> 
>            self.exportAttributes(outfile, level, already_processed,
>    namespaceprefix_, name_='OutPort')
> 
>            if self.hasContent_():
> 
>                outfile.write('>%s' % (eol_, ))
> 
>                self.exportChildren(outfile, level + 1, namespaceprefix_,
>    namespacedef_, name_='OutPort', pretty_print=pretty_print)
> 
>                showIndent(outfile, level, pretty_print)
> 
>                outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
> 
>            else:
> 
>                outfile.write('/>%s' % (eol_, ))
> 
>     
> 
>    The highlighted line causes the following error:
> 
>    TypeError: can only concatenate str (not "bool") to str
> 
>     
> 
>     
> 
>    -----Original Message-----
>    From: Dave Kuhlman <dkuhl...@davekuhlman.org>
>    Sent: maandag 19 november 2018 22:21
>    To: generateds-users <generateds-users@lists.sourceforge.net>
>    Subject: [Generateds-users] New version -- v. 2.30.8
> 
>     
> 
>    There is a new version of generateDS.py -- version 2.30.8.
> 
>     
> 
>    This version contains quite a few changes that have accumulated at the
>    Bitbucket repository.
> 
>     
> 
>    See the notes below from the README for more details.
> 
>     
> 
>    These fixes were made thanks to support from a number of users.
> 
>    Again, see the README.  Thanks to you all for that.
> 
>     
> 
>    There are still a few suggestions from users that require attention.
> 
>    I'll start looking into those next week.
> 
>     
> 
>    You can find the new version here:
> 
>     
> 
>    - Python Package Index -- http://pypi.python.org/pypi/generateDS/
> 
>    - Bitbucket -- For those of you who prefer using Mercurial, there is
> 
>      also a Mercurial repository at Bitbucket:
> 
>      https://bitbucket.org/dkuhlman/generateds
> 
>    - Source Forge -- http://sourceforge.net/projects/generateds/
> 
>     
> 
>    If you have comments, suggestions, or problems, please send them along. 
>    The email list is here:
> 
>    https://lists.sourceforge.net/lists/listinfo/generateds-users
> 
>     
> 
>    Dave
> 
>     
> 
>    # =========================================================
> 
>     
> 
>    Version 2.30.8 (11/14/2018)
> 
>     
> 
>    - Added unit tests for enum import.  Thanks to Mustafa Şenol Coşar
> 
>      for adding these tests.
> 
>    - Fix to generation of ``externalImports`` so that the generated
> 
>      import statements will be in a consistent, predictable order.
> 
>    - Converted ``tests/EnumImport/test_generated_code.py`` to use the
> 
>      Python unit test framework.
> 
>     
> 
>    Version 2.30.7 (11/12/2018)
> 
>     
> 
>    - Applied patch with fix for subclass suffix "Sub".  Thanks to
> 
>      Lucius for this fix.
> 
>    - Fixed lines in ``generateDS.py`` that were too long and exceeded
> 
>      the style guide recommendation (PEP 8).
> 
>     
> 
>    Version 2.30.6 (11/09/2018)
> 
>     
> 
>    - Merged additional namespace prefixes from François.
> 
>    - Fixed one corner case with the new namespace prefix changes -- For
> 
>      mixed content (character content containing mark-up) the
> 
>      parameters in the call and definition of method ``export`` in
> 
>      class ``MixedContainer`` were out of sync.
> 
>    - Question: Is it possible that we need an additional change to pass
> 
>      namespace prefixes and their definitions through mixed content and
> 
>      into complex content that it might contain?
> 
>    - Added an additional unit test for the namespace prefix changes.
> 
>      See the ``ipo`` unit test.  Thanks again to François Guimond for
> 
>      help with this.
> 
>     
> 
>    Version 2.30.5 (11/07/2018)
> 
>     
> 
>    - Merged namespace prefix changes for export functions from François
> 
>      Guimond.  Thank you François.
> 
>     
> 
>    Version 2.30.4 (11/06/2018)
> 
>     
> 
>    - Another patch from Mustafa for enums.  Thanks Mustafa.
> 
>     
> 
>    - A fix from François Guimond for passing namespaceprefix_ to
> 
>      ``self.exportChildren``.  Thanks François.
> 
>     
> 
>    Version 2.30.3 (11/05/2018)
> 
>     
> 
>    - Merged Mustafa Coşar's fix for enums.  Thank you Mustafa.
> 
>     
> 
>    - Added several files in the ``test/`` directory to the repo.
> 
>     
> 
>    Version 2.30.2 (11/01/2018)
> 
>     
> 
>    - When dealing with a derived type, generate "set_xxx" and "add_xxx"
> 
>      methods that automatically set ``original_tagname_`` and
> 
>      ``extensiontype_``, so that when exported ``xsi:type`` is used to
> 
>      specify the type.  Thanks to Edwin Matthijssen for working with me
> 
>      on this.
> 
>     
> 
>    Version 2.30.1 (10/18/2018)
> 
>     
> 
>    - New feature -- Each generated data binding class has a new
> 
>      instance variable: ``parent_object_``.  It is automatically set to
> 
>      reference the parent (i.e. container) of this object.  Thanks to
> 
>      Florian de Boissieu for suggesting this enhancement.
> 
>    - Added a comment to ``generateDS.py`` to help with customizing the
> 
>      code generated in getters and setters.  You can search
> 
>      ``generateDS.py`` for "add custom code here" and then add custom
> 
>      code there.  This is not a terribly convenient way for a user to
> 
>      add custom code, so if someone finds a need to use it, please
> 
>      contact me and we'll try to find a better way.
> 
>     
> 
>    Version 2.29.25 (10/05/2018)
> 
>     
> 
>    - Added a section to the documentation (generateDS.txt) for types
> 
>      derived by extension, i.e. types that use the xsi:type attribute
> 
>      in the XML instance document.  Thanks to Justin McManus for
> 
>      motivating me to learn about this and for providing guidance and
> 
>      pointers along the way.
> 
>    - Added a unit test for types derived by extension.
> 
>    - Converted unit tests so that we can use Python 3 not Python 2.
> 
>    - Changes in ``generateDS.py`` so that it uses the ``six``
> 
>      compatibility library to handle the ``urllib`` name changes
> 
>      between Python 2 and 3.
> 
>     
> 
>    # =========================================================
> 
>     
> 
>    --
> 
>     
> 
>    Dave Kuhlman
> 
>    http://www.davekuhlman.org
> 
>     
> 
>     
> 
>    _______________________________________________
> 
>    generateds-users mailing list
> 
>    generateds-users@lists.sourceforge.net
> 
>    https://lists.sourceforge.net/lists/listinfo/generateds-users
> 
>     
> 
>    This message may contain information that is not intended for you. If you
>    are not the addressee or if this message was sent to you by mistake, you
>    are requested to inform the sender and delete the message. TNO accepts no
>    liability for the content of this e-mail, for the manner in which you use
>    it and for damage of any kind resulting from the risks inherent to the
>    electronic transmission of messages.

-- 

Dave Kuhlman
http://www.davekuhlman.org


_______________________________________________
generateds-users mailing list
generateds-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/generateds-users

Reply via email to