Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When a field has no description (description=None) initialization fails #69

Closed
pbauer opened this issue Sep 13, 2018 · 1 comment · Fixed by #72
Closed

When a field has no description (description=None) initialization fails #69

pbauer opened this issue Sep 13, 2018 · 1 comment · Fixed by #72

Comments

@pbauer
Copy link
Member

pbauer commented Sep 13, 2018

The recent changes broke the Plone-biuld (e.g. https://jenkins.plone.org/view/PLIPs/job/plip-py3/707)

Traceback (most recent call last):
  File "/home/jenkins/workspace/plip-py3/src/plone.supermodel/plone/supermodel/parser.py", line 72, in parse
    return _parse(source, policy)
  File "/home/jenkins/workspace/plip-py3/src/plone.supermodel/plone/supermodel/parser.py", line 161, in _parse
    baseFields
  File "/home/jenkins/workspace/plip-py3/src/plone.supermodel/plone/supermodel/parser.py", line 122, in readField
    field = handler.read(fieldElement)
  File "/home/jenkins/workspace/plip-py3/src/plone.supermodel/plone/supermodel/exportimport.py", line 136, in read
    field_instance = self._constructField(attributes)
  File "/home/jenkins/workspace/plip-py3/src/plone.supermodel/plone/supermodel/exportimport.py", line 81, in _constructField
    return self.klass(**attributes)
  File "/home/jenkins/workspace/plip-py3/src/zope.schema/src/zope/schema/_bootstrapfields.py", line 494, in __init__
    super(Text, self).__init__(*args, **kw)
  File "/home/jenkins/workspace/plip-py3/src/zope.schema/src/zope/schema/_bootstrapfields.py", line 476, in __init__
    super(MinMaxLen, self).__init__(**kw)
  File "/home/jenkins/workspace/plip-py3/src/zope.schema/src/zope/schema/_bootstrapfields.py", line 244, in __init__
    doc_description = '\n'.join(_DocStringHelpers.docstring_to_lines(description)[:-1])
  File "/home/jenkins/workspace/plip-py3/src/zope.schema/src/zope/schema/_bootstrapfields.py", line 133, in docstring_to_lines
    lines = docstring.expandtabs().splitlines()
plone.supermodel.parser.SupermodelParseError: 'NoneType' object has no attribute 'expandtabs'
@pbauer
Copy link
Member Author

pbauer commented Sep 19, 2018

Thanks!

clrpackages pushed a commit to clearlinux-pkgs/zope.schema that referenced this issue Sep 20, 2018
Jason Madden (8):
      Back to development: 4.7.1
      Add IFromBytes
      Add versionchanged sphinx directive for Bool.
      Use separate branches for Number.fromBytes for PY2/3; sprinkle 'no cover' for PY2
      Merge pull request #71 from zopefoundation/feature/IFromBytes
      Fix passing ``None`` as the description to a field constructor.
      Merge pull request #72 from zopefoundation/issue69
      Preparing release 4.8.0

4.8.0 (2018-09-19)
==================

- Add the interface ``IFromBytes``, which is implemented by the
  numeric and bytes fields, as well as ``URI``, ``DottedName``, and
  ``Id``.

- Fix passing ``None`` as the description to a field constructor. See
  `issue 69 <https://github.com/zopefoundation/zope.schema/issues/69>`_.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant