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

2.0.0: '_io.BufferedRandom' object has no attribute 'buffer' #126

Closed
2uasimojo opened this issue Jan 31, 2020 · 2 comments
Closed

2.0.0: '_io.BufferedRandom' object has no attribute 'buffer' #126

2uasimojo opened this issue Jan 31, 2020 · 2 comments

Comments

@2uasimojo
Copy link

2uasimojo commented Jan 31, 2020

Building docs in OpenStack nova with blockdiag 2.0.0 results in the following error:

  File "/home/efried/openstack/nova/.tox/docs/lib/python3.6/site-packages/sphinx/cmd/build.py", line 276, in build_main
    app.build(args.force_all, filenames)
  File "/home/efried/openstack/nova/.tox/docs/lib/python3.6/site-packages/sphinx/application.py", line 353, in build
    self.builder.build_update()
  File "/home/efried/openstack/nova/.tox/docs/lib/python3.6/site-packages/sphinx/builders/__init__.py", line 299, in build_update
    len(to_build))
  File "/home/efried/openstack/nova/.tox/docs/lib/python3.6/site-packages/sphinx/builders/__init__.py", line 311, in build
    updated_docnames = set(self.read())
  File "/home/efried/openstack/nova/.tox/docs/lib/python3.6/site-packages/sphinx/builders/__init__.py", line 418, in read
    self._read_serial(docnames)
  File "/home/efried/openstack/nova/.tox/docs/lib/python3.6/site-packages/sphinx/builders/__init__.py", line 439, in _read_serial
    self.read_doc(docname)
  File "/home/efried/openstack/nova/.tox/docs/lib/python3.6/site-packages/sphinx/builders/__init__.py", line 479, in read_doc
    doctree = read_doc(self.app, self.env, self.env.doc2path(docname))
  File "/home/efried/openstack/nova/.tox/docs/lib/python3.6/site-packages/sphinx/io.py", line 350, in read_doc
    pub.publish()
  File "/home/efried/openstack/nova/.tox/docs/lib/python3.6/site-packages/docutils/core.py", line 217, in publish
    self.settings)
  File "/home/efried/openstack/nova/.tox/docs/lib/python3.6/site-packages/sphinx/io.py", line 137, in read
    self.parse()
  File "/home/efried/openstack/nova/.tox/docs/lib/python3.6/site-packages/docutils/readers/__init__.py", line 77, in parse
    self.parser.parse(self.input, document)
  File "/home/efried/openstack/nova/.tox/docs/lib/python3.6/site-packages/sphinx/parsers.py", line 95, in parse
    self.statemachine.run(inputlines, document, inliner=self.inliner)
  File "/home/efried/openstack/nova/.tox/docs/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 171, in run
    input_source=document['source'])
  File "/home/efried/openstack/nova/.tox/docs/lib/python3.6/site-packages/docutils/statemachine.py", line 239, in run
    context, state, transitions)
  File "/home/efried/openstack/nova/.tox/docs/lib/python3.6/site-packages/docutils/statemachine.py", line 460, in check_line
    return method(match, context, next_state)
  File "/home/efried/openstack/nova/.tox/docs/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 2771, in underline
    self.section(title, source, style, lineno - 1, messages)
  File "/home/efried/openstack/nova/.tox/docs/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 327, in section
    self.new_subsection(title, lineno, messages)
  File "/home/efried/openstack/nova/.tox/docs/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 395, in new_subsection
    node=section_node, match_titles=True)
  File "/home/efried/openstack/nova/.tox/docs/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 282, in nested_parse
    node=node, match_titles=match_titles)
  File "/home/efried/openstack/nova/.tox/docs/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 196, in run
    results = StateMachineWS.run(self, input_lines, input_offset)
  File "/home/efried/openstack/nova/.tox/docs/lib/python3.6/site-packages/docutils/statemachine.py", line 239, in run
    context, state, transitions)
  File "/home/efried/openstack/nova/.tox/docs/lib/python3.6/site-packages/docutils/statemachine.py", line 460, in check_line
    return method(match, context, next_state)
  File "/home/efried/openstack/nova/.tox/docs/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 2771, in underline
    self.section(title, source, style, lineno - 1, messages)
  File "/home/efried/openstack/nova/.tox/docs/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 327, in section
    self.new_subsection(title, lineno, messages)
  File "/home/efried/openstack/nova/.tox/docs/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 395, in new_subsection
    node=section_node, match_titles=True)
  File "/home/efried/openstack/nova/.tox/docs/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 282, in nested_parse
    node=node, match_titles=match_titles)
  File "/home/efried/openstack/nova/.tox/docs/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 196, in run
    results = StateMachineWS.run(self, input_lines, input_offset)
  File "/home/efried/openstack/nova/.tox/docs/lib/python3.6/site-packages/docutils/statemachine.py", line 239, in run
    context, state, transitions)
  File "/home/efried/openstack/nova/.tox/docs/lib/python3.6/site-packages/docutils/statemachine.py", line 460, in check_line
    return method(match, context, next_state)
  File "/home/efried/openstack/nova/.tox/docs/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 2771, in underline
    self.section(title, source, style, lineno - 1, messages)
  File "/home/efried/openstack/nova/.tox/docs/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 327, in section
    self.new_subsection(title, lineno, messages)
  File "/home/efried/openstack/nova/.tox/docs/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 395, in new_subsection
    node=section_node, match_titles=True)
  File "/home/efried/openstack/nova/.tox/docs/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 282, in nested_parse
    node=node, match_titles=match_titles)
  File "/home/efried/openstack/nova/.tox/docs/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 196, in run
    results = StateMachineWS.run(self, input_lines, input_offset)
  File "/home/efried/openstack/nova/.tox/docs/lib/python3.6/site-packages/docutils/statemachine.py", line 239, in run
    context, state, transitions)
  File "/home/efried/openstack/nova/.tox/docs/lib/python3.6/site-packages/docutils/statemachine.py", line 460, in check_line
    return method(match, context, next_state)
  File "/home/efried/openstack/nova/.tox/docs/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 2344, in explicit_markup
    nodelist, blank_finish = self.explicit_construct(match)
  File "/home/efried/openstack/nova/.tox/docs/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 2356, in explicit_construct
    return method(self, expmatch)
  File "/home/efried/openstack/nova/.tox/docs/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 2099, in directive
    directive_class, match, type_name, option_presets)
  File "/home/efried/openstack/nova/.tox/docs/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 2148, in run_directive
    result = directive_instance.run()
  File "/home/efried/openstack/nova/doc/ext/versioned_notifications.py", line 56, in run
    return self._build_markup(notifications)
  File "/home/efried/openstack/nova/doc/ext/versioned_notifications.py", line 145, in _build_markup
    base_path=os.path.abspath(self.SAMPLE_ROOT))
  File "/home/efried/openstack/nova/nova/tests/json_ref.py", line 51, in resolve_refs
    obj_with_refs[key] = resolve_refs(value, base_path)
  File "/home/efried/openstack/nova/nova/tests/json_ref.py", line 42, in resolve_refs
    resolved_ref = _resolve_ref(ref, base_path)
  File "/home/efried/openstack/nova/nova/tests/json_ref.py", line 29, in _resolve_ref
    ref_value = jsonutils.load(f)
  File "/home/efried/openstack/nova/.tox/docs/lib/python3.6/site-packages/oslo_serialization/jsonutils.py", line 276, in load
    return json.load(codecs.getreader(encoding)(fp), **kwargs)
  File "/home/efried/openstack/nova/.tox/docs/lib/python3.6/site-packages/blockdiag/utils/compat.py", line 24, in <lambda>
    return lambda stream, *args: getreader(encoding)(stream.buffer, *args)
AttributeError: '_io.BufferedRandom' object has no attribute 'buffer'

The build venv has the following package levels:

actdiag==2.0.0,alabaster==0.7.12,alembic==1.3.3,amqp==2.5.2,appdirs==1.4.3,attrs==19.3.0,automaton==1.17.0,Babel==2.8.0,bcrypt==3.1.7,blockdiag==2.0.0,cachetools==4.0.0,castellan==1.4.0,certifi==2019.11.28,cffi==1.13.2,chardet==3.0.4,cliff==2.18.0,cmd2==0.8.9,cryptography==2.8,cursive==0.2.2,debtcollector==1.22.0,decorator==4.4.1,dnspython==1.16.0,docutils==0.15.2,dogpile.cache==0.9.0,dulwich==0.19.15,eventlet==0.25.1,extras==1.0.0,fasteners==0.14.1,fixtures==3.0.0,funcparserlib==0.3.6,futurist==1.10.0,greenlet==0.4.15,idna==2.8,imagesize==1.2.0,importlib-metadata==1.5.0,iso8601==0.1.12,Jinja2==2.11.1,jmespath==0.9.4,jsonpatch==1.25,jsonpointer==2.0,jsonschema==3.2.0,keystoneauth1==3.18.0,keystonemiddleware==8.0.0,kombu==4.6.7,linecache2==1.0.0,lxml==4.5.0,Mako==1.1.1,MarkupSafe==1.1.1,microversion-parse==0.2.1,monotonic==1.5,msgpack==0.6.2,munch==2.5.0,netaddr==0.7.19,netifaces==0.10.9,networkx==2.4,-e git+ssh://efried@review.openstack.org:29418/openstack/nova@6b44628695301ee446d019c21a44e34cedfac970#egg=nova,numpy==1.18.1,openstackdocstheme==1.31.2,openstacksdk==0.40.0,os-api-ref==1.6.2,os-brick==2.11.0,os-client-config==2.0.0,os-resource-classes==0.5.0,os-service-types==1.7.0,os-traits==2.2.0,os-vif==1.17.0,os-win==4.3.2,os-xenapi==0.3.4,osc-lib==2.0.0,oslo.cache==1.38.1,oslo.concurrency==3.31.0,oslo.config==6.12.0,oslo.context==2.23.0,oslo.db==6.0.0,oslo.i18n==3.25.1,oslo.log==3.45.2,oslo.messaging==10.5.0,oslo.middleware==3.38.1,oslo.policy==2.4.1,oslo.privsep==1.33.3,oslo.reports==1.31.1,oslo.rootwrap==5.17.1,oslo.serialization==2.29.2,oslo.service==1.41.1,oslo.upgradecheck==0.3.2,oslo.utils==3.42.1,oslo.versionedobjects==1.37.0,osprofiler==2.9.0,ovs==2.11.0,ovsdbapp==1.0.0,packaging==20.1,paramiko==2.7.1,Paste==3.3.0,PasteDeploy==2.0.1,pbr==5.4.4,Pillow==7.0.0,prettytable==0.7.2,psutil==5.6.7,pyasn1==0.4.8,pyasn1-modules==0.2.8,pycadf==2.10.0,pycparser==2.19,pydot==1.4.1,Pygments==2.5.2,pyinotify==0.9.6,PyJWT==1.7.1,PyNaCl==1.3.0,pyOpenSSL==19.1.0,pyparsing==2.4.6,pyperclip==1.7.0,pypowervm==1.1.24,pyroute2==0.5.7,pyrsistent==0.15.7,python-barbicanclient==4.9.0,python-cinderclient==5.0.0,python-dateutil==2.8.1,python-editor==1.0.4,python-glanceclient==2.17.0,python-keystoneclient==3.22.0,python-mimeparse==1.6.0,python-neutronclient==6.14.0,python-pcre==0.7,pytz==2019.3,PyYAML==5.3,reno==2.11.3,repoze.lru==0.7,requests==2.22.0,requestsexceptions==1.4.0,retrying==1.3.3,rfc3986==1.3.2,Routes==2.4.1,seqdiag==2.0.0,simplejson==3.17.0,six==1.14.0,snowballstemmer==2.0.0,sortedcontainers==2.1.0,Sphinx==2.3.1,sphinx-feature-classification==1.0.0,sphinxcontrib-actdiag==2.0.0,sphinxcontrib-applehelp==1.0.1,sphinxcontrib-devhelp==1.0.1,sphinxcontrib-htmlhelp==1.0.2,sphinxcontrib-jsmath==1.0.1,sphinxcontrib-qthelp==1.0.2,sphinxcontrib-seqdiag==2.0.0,sphinxcontrib-serializinghtml==1.1.3,sphinxcontrib-svg2pdfconverter==1.0.1,SQLAlchemy==1.3.13,sqlalchemy-migrate==0.13.0,sqlparse==0.3.0,statsd==3.3.0,stevedore==1.31.0,taskflow==3.8.0,Tempita==0.5.2,tenacity==6.0.0,testresources==2.0.1,testscenarios==0.5.0,testtools==2.3.0,tooz==1.67.2,traceback2==1.4.0,unittest2==1.1.0,urllib3==1.25.8,vine==1.3.0,voluptuous==0.11.7,warlock==1.3.3,wcwidth==0.1.8,webcolors==1.10,WebOb==1.8.6,websockify==0.9.0,whereto==0.4.0,wrapt==1.11.2,yappi==1.2.3,zipp==2.1.0,zVMCloudConnector==1.4.1

@SeanMooney
Copy link

#128 should resolve this

tk0miya added a commit to tk0miya/blockdiag that referenced this issue Feb 1, 2020
@tk0miya tk0miya closed this as completed in 14893db Feb 1, 2020
tk0miya added a commit that referenced this issue Feb 1, 2020
Fix #126: '_io.BufferedRandom' object has no attribute 'buffer'
@tk0miya
Copy link
Contributor

tk0miya commented Feb 1, 2020

Sorry for inconvenience. Just fixed.

openstack-gerrit pushed a commit to openstack/openstack that referenced this issue Feb 22, 2020
* Update requirements from branch 'master'
  - Merge "blacklist blockdiag 2.0.0"
  - blacklist blockdiag 2.0.0
    
    blockdiag has been used as an indirect dependcy via some sphinx
    extensions such as sphinxcontrib-blockdiag and sphinxcontrib-actdiag
    for several releases. For the past few releases nova has monkey
    patched blockdiag to work around there global replacement
    of codec.getreader under python 3.
    
    The 2.0.0 release broke how that monkey patching worked and also
    was the first release in several years. Now that the project is active
    again we have reported the python 3 issue to the maintainer
    blockdiag/blockdiag#126 and it
    has been adressed by blockdiag/blockdiag#129
    in 2.0.1 which has now been released.
    https://pypi.org/project/blockdiag/2.0.1/
    
    This change blacklists 2.0.0. This change does not raise the minimum
    requirement. Nova can selectively raise its minimum requirement in the
    future in tree if it chooses to remove support for monkey patching
    older releases.
    
    Other project are recommended to use 2.0.1 or later as this is the first
    release which is python3 only and is compatible with the sphinx
    extentions we use without monkey patching.
    
    Change-Id: I414d9e604616d49b4456ebc348418e9b1b09058b
openstack-gerrit pushed a commit to openstack/requirements that referenced this issue Feb 22, 2020
blockdiag has been used as an indirect dependcy via some sphinx
extensions such as sphinxcontrib-blockdiag and sphinxcontrib-actdiag
for several releases. For the past few releases nova has monkey
patched blockdiag to work around there global replacement
of codec.getreader under python 3.

The 2.0.0 release broke how that monkey patching worked and also
was the first release in several years. Now that the project is active
again we have reported the python 3 issue to the maintainer
blockdiag/blockdiag#126 and it
has been adressed by blockdiag/blockdiag#129
in 2.0.1 which has now been released.
https://pypi.org/project/blockdiag/2.0.1/

This change blacklists 2.0.0. This change does not raise the minimum
requirement. Nova can selectively raise its minimum requirement in the
future in tree if it chooses to remove support for monkey patching
older releases.

Other project are recommended to use 2.0.1 or later as this is the first
release which is python3 only and is compatible with the sphinx
extentions we use without monkey patching.

Change-Id: I414d9e604616d49b4456ebc348418e9b1b09058b
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

No branches or pull requests

3 participants