Skip to content
This repository has been archived by the owner on Mar 5, 2024. It is now read-only.

Fix giza on python 3.8. #423

Closed
wants to merge 2 commits into from
Closed

Conversation

p-mongo
Copy link
Contributor

@p-mongo p-mongo commented Jun 28, 2020

Fixes error:

Traceback (most recent call last):
  File "/home/w/.local/bin/giza", line 8, in 
    sys.exit(main())
  File "/home/w/.local/lib/python3.8/site-packages/giza/cmdline.py", line 162, in main
    argh.dispatch(parser, namespace=args)
  File "/home/w/.local/lib/python3.8/site-packages/argh/dispatching.py", line 174, in dispatch
    for line in lines:
  File "/home/w/.local/lib/python3.8/site-packages/argh/dispatching.py", line 277, in _execute_command
    for line in result:
  File "/home/w/.local/lib/python3.8/site-packages/argh/dispatching.py", line 231, in _call
    result = function(namespace_obj)
  File "/home/w/.local/lib/python3.8/site-packages/giza/operations/make.py", line 140, in main
    run_make_operations(targets, conf)
  File "/home/w/.local/lib/python3.8/site-packages/giza/operations/make.py", line 235, in run_make_operations
    sphinx_publication(conf, app)
  File "/home/w/.local/lib/python3.8/site-packages/giza/operations/sphinx_cmds.py", line 103, in sphinx_publication
    sphinx_content_preperation(app, conf)
  File "/home/w/.local/lib/python3.8/site-packages/giza/operations/sphinx_cmds.py", line 171, in sphinx_content_preperation
    for (_, (build_config, sconf)) in get_restricted_builder_jobs(conf):
  File "/home/w/.local/lib/python3.8/site-packages/giza/config/helper.py", line 142, in get_restricted_builder_jobs
    for ((edition, langauge, builder), (bconf, sconf)) in get_builder_jobs(conf):
  File "/home/w/.local/lib/python3.8/site-packages/giza/config/helper.py", line 136, in get_builder_jobs
    get_sphinx_build_configuration(edition, language, builder, conf.runstate))
  File "/home/w/.local/lib/python3.8/site-packages/giza/config/helper.py", line 164, in get_sphinx_build_configuration
    sconf = render_sconf(edition, builder, language, conf)
  File "/home/w/.local/lib/python3.8/site-packages/giza/config/sphinx_config.py", line 46, in render_sconf
    sconf = SphinxConfig(conf, sconf_base)
  File "/home/w/.local/lib/python3.8/site-packages/giza/config/sphinx_config.py", line 89, in __init__
    self.ingest(input_obj)
  File "/home/w/.local/lib/python3.8/site-packages/giza/config/sphinx_config.py", line 96, in ingest
    self._raw = render_sphinx_config(input_obj)
  File "/home/w/.local/lib/python3.8/site-packages/giza/config/sphinx_config.py", line 306, in render_sphinx_config
    for i in computed.keys():
RuntimeError: dictionary changed size during iteration

@p-mongo
Copy link
Contributor Author

p-mongo commented Jun 28, 2020

Also fixes two places where subprocess.check_call now returns bytes on python 3.8.

Fixes error:

Traceback (most recent call last):
  File "/home/w/.local/bin/giza", line 8, in <module>
    sys.exit(main())
  File "/home/w/.local/lib/python3.8/site-packages/giza/cmdline.py", line 162, in main
    argh.dispatch(parser, namespace=args)
  File "/home/w/.local/lib/python3.8/site-packages/argh/dispatching.py", line 174, in dispatch
    for line in lines:
  File "/home/w/.local/lib/python3.8/site-packages/argh/dispatching.py", line 277, in _execute_command
    for line in result:
  File "/home/w/.local/lib/python3.8/site-packages/argh/dispatching.py", line 231, in _call
    result = function(namespace_obj)
  File "/home/w/.local/lib/python3.8/site-packages/giza/operations/make.py", line 140, in main
    run_make_operations(targets, conf)
  File "/home/w/.local/lib/python3.8/site-packages/giza/operations/make.py", line 235, in run_make_operations
    sphinx_publication(conf, app)
  File "/home/w/.local/lib/python3.8/site-packages/giza/operations/sphinx_cmds.py", line 103, in sphinx_publication
    sphinx_content_preperation(app, conf)
  File "/home/w/.local/lib/python3.8/site-packages/giza/operations/sphinx_cmds.py", line 171, in sphinx_content_preperation
    for (_, (build_config, sconf)) in get_restricted_builder_jobs(conf):
  File "/home/w/.local/lib/python3.8/site-packages/giza/config/helper.py", line 142, in get_restricted_builder_jobs
    for ((edition, langauge, builder), (bconf, sconf)) in get_builder_jobs(conf):
  File "/home/w/.local/lib/python3.8/site-packages/giza/config/helper.py", line 136, in get_builder_jobs
    get_sphinx_build_configuration(edition, language, builder, conf.runstate))
  File "/home/w/.local/lib/python3.8/site-packages/giza/config/helper.py", line 164, in get_sphinx_build_configuration
    sconf = render_sconf(edition, builder, language, conf)
  File "/home/w/.local/lib/python3.8/site-packages/giza/config/sphinx_config.py", line 46, in render_sconf
    sconf = SphinxConfig(conf, sconf_base)
  File "/home/w/.local/lib/python3.8/site-packages/giza/config/sphinx_config.py", line 89, in __init__
    self.ingest(input_obj)
  File "/home/w/.local/lib/python3.8/site-packages/giza/config/sphinx_config.py", line 96, in ingest
    self._raw = render_sphinx_config(input_obj)
  File "/home/w/.local/lib/python3.8/site-packages/giza/config/sphinx_config.py", line 306, in render_sphinx_config
    for i in computed.keys():
RuntimeError: dictionary changed size during iteration
Fixes errors like:

Traceback (most recent call last):
  File "/home/w/.local/bin/giza", line 8, in <module>
    sys.exit(main())
  File "/home/w/.local/lib/python3.8/site-packages/giza/cmdline.py", line 162, in main
    argh.dispatch(parser, namespace=args)
  File "/home/w/.local/lib/python3.8/site-packages/argh/dispatching.py", line 174, in dispatch
    for line in lines:
  File "/home/w/.local/lib/python3.8/site-packages/argh/dispatching.py", line 277, in _execute_command
    for line in result:
  File "/home/w/.local/lib/python3.8/site-packages/argh/dispatching.py", line 231, in _call
    result = function(namespace_obj)
  File "/home/w/.local/lib/python3.8/site-packages/giza/operations/make.py", line 140, in main
    run_make_operations(targets, conf)
  File "/home/w/.local/lib/python3.8/site-packages/giza/operations/make.py", line 235, in run_make_operations
    sphinx_publication(conf, app)
  File "/home/w/.local/lib/python3.8/site-packages/giza/operations/sphinx_cmds.py", line 103, in sphinx_publication
    sphinx_content_preperation(app, conf)
  File "/home/w/.local/lib/python3.8/site-packages/giza/operations/sphinx_cmds.py", line 197, in sphinx_content_preperation
    dependency_refresh_app.extend_queue(refresh_dependency_tasks(build_config))
  File "/home/w/.local/lib/python3.8/site-packages/giza/content/dependencies.py", line 132, in refresh_dependency_tasks
    refresh_deps(conf)
  File "/home/w/.local/lib/python3.8/site-packages/giza/content/dependencies.py", line 106, in refresh_deps
    graph = include_files(conf=conf)
  File "/home/w/.local/lib/python3.8/site-packages/giza/includes.py", line 44, in include_files
    for d in grep.split('\n')]
TypeError: a bytes-like object is required, not 'str'
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants