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

1.28.71: documentation build fails with 'ServiceDocumenter' object has no attribute 'client_context_params' #3913

Closed
kloczek opened this issue Oct 26, 2023 · 12 comments
Labels
closing-soon This issue will automatically close in 4 days unless further comments are made. documentation This is a problem with documentation. guidance Question that needs advice or information.

Comments

@kloczek
Copy link

kloczek commented Oct 26, 2023

Describe the issue

Looks like 1.28.71 documentation build fails now. 1.28.69 was OK.

+ /usr/bin/sphinx-build -n -T -b man docs/source build/sphinx/man
Running Sphinx v7.1.2

Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/sphinx/config.py", line 356, in eval_config_file
    exec(code, namespace)  # NoQA: S102
  File "/home/tkloczko/rpmbuild/BUILD/boto3-1.28.71/docs/source/conf.py", line 32, in <module>
    generate_docs(os.path.dirname(os.path.abspath(__file__)), session)
  File "/home/tkloczko/rpmbuild/BUILD/boto3-1.28.71/boto3/docs/__init__.py", line 44, in generate_docs
    docs = ServiceDocumenter(
  File "/home/tkloczko/rpmbuild/BUILD/boto3-1.28.71/boto3/docs/service.py", line 74, in document_service
    self.client_context_params(context_params_section)
AttributeError: 'ServiceDocumenter' object has no attribute 'client_context_params'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/sphinx/cmd/build.py", line 285, in build_main
    app = Sphinx(args.sourcedir, args.confdir, args.outputdir,
  File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 207, in __init__
    self.config = Config.read(self.confdir, confoverrides or {}, self.tags)
  File "/usr/lib/python3.8/site-packages/sphinx/config.py", line 179, in read
    namespace = eval_config_file(filename, tags)
  File "/usr/lib/python3.8/site-packages/sphinx/config.py", line 369, in eval_config_file
    raise ConfigError(msg % traceback.format_exc()) from exc
sphinx.errors.ConfigError: There is a programmable error in your configuration file:

Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/sphinx/config.py", line 356, in eval_config_file
    exec(code, namespace)  # NoQA: S102
  File "/home/tkloczko/rpmbuild/BUILD/boto3-1.28.71/docs/source/conf.py", line 32, in <module>
    generate_docs(os.path.dirname(os.path.abspath(__file__)), session)
  File "/home/tkloczko/rpmbuild/BUILD/boto3-1.28.71/boto3/docs/__init__.py", line 44, in generate_docs
    docs = ServiceDocumenter(
  File "/home/tkloczko/rpmbuild/BUILD/boto3-1.28.71/boto3/docs/service.py", line 74, in document_service
    self.client_context_params(context_params_section)
AttributeError: 'ServiceDocumenter' object has no attribute 'client_context_params'


Configuration error:
There is a programmable error in your configuration file:

Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/sphinx/config.py", line 356, in eval_config_file
    exec(code, namespace)  # NoQA: S102
  File "/home/tkloczko/rpmbuild/BUILD/boto3-1.28.71/docs/source/conf.py", line 32, in <module>
    generate_docs(os.path.dirname(os.path.abspath(__file__)), session)
  File "/home/tkloczko/rpmbuild/BUILD/boto3-1.28.71/boto3/docs/__init__.py", line 44, in generate_docs
    docs = ServiceDocumenter(
  File "/home/tkloczko/rpmbuild/BUILD/boto3-1.28.71/boto3/docs/service.py", line 74, in document_service
    self.client_context_params(context_params_section)
AttributeError: 'ServiceDocumenter' object has no attribute 'client_context_params'

Links

N/A

@kloczek kloczek added documentation This is a problem with documentation. needs-triage This issue or PR still needs to be triaged. labels Oct 26, 2023
@nateprewitt
Copy link
Contributor

Hi @kloczek, it looks like you're trying to build the docs with an unsupported version of Botocore for this version of Boto3. Can you please update the full dependency closure and try again?

@nateprewitt nateprewitt added guidance Question that needs advice or information. and removed needs-triage This issue or PR still needs to be triaged. labels Oct 26, 2023
@kloczek
Copy link
Author

kloczek commented Oct 26, 2023

Nothing warned or exited with error that I have in build env unsupported version ..

@nateprewitt
Copy link
Contributor

Boto3 1.28.71 requires Botocore>= 1.31.71. You cannot install it without this version if you're following the provided dependencies. The method in the error exists in this release of Botocore.

Could you provide more info on how you validated your distribution is built correctly?

@kloczek
Copy link
Author

kloczek commented Oct 26, 2023

oto3 1.28.71 requires Botocore>= 1.31.71.

Nothing during pep517 based build shows warnings or errors that it requires exact minimal botocore version.

Tat dependency is present but it is not build-time dependency but install-time one.

@kloczek
Copy link
Author

kloczek commented Oct 26, 2023

Nevertheless looks like boto3 documentation builds with the same version botocore.

I'm living you decision about how to resolve this kind dependencies to not have similar issues.

@nateprewitt
Copy link
Contributor

nateprewitt commented Oct 26, 2023

Boto3 does not provide a PEP517 compliant build system. As noted in previous tickets [1] [2] you've opened, we do not support this build process for the docs. Is there a better way we can convey this for your build process? It looks like we have ~9 issues across our repositories for the same underlying issue in your workflow.

@kloczek
Copy link
Author

kloczek commented Oct 26, 2023

Content of the pyproject.toml and setup.cfg it is all what is needed to perform pep517 build and all is working here gile from more than two years.

In setup.cfg are only defined install time dependencies.

@nateprewitt
Copy link
Contributor

PEP 517 builds require a build-system declaration in either a pyproject.toml or setup.cfg file. The existence of these files does not directly imply PEP 517 support.

The reason your build is currently broken is there is a change required from the lastest version of Botocore. The build working previously was due to some version of Botocore installed on the system being available. You'll need to ensure you're updating both packages in tandem.

@nateprewitt nateprewitt added the closing-soon This issue will automatically close in 4 days unless further comments are made. label Oct 26, 2023
@kloczek
Copy link
Author

kloczek commented Oct 27, 2023

The reason your build is currently broken is there is a change required from the lastest version of Botocore

One more time.
This ticket is not about build (pep517 or else) module but about building/rendering DOCUMENTATION.

@nateprewitt
Copy link
Contributor

Apologies, to clarify my previous statements I'm responding to this comment #3913 (comment). You need to install the required dependencies specified in the setup.py before building the documentation. That is the solution to your issue.

@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@kloczek
Copy link
Author

kloczek commented Oct 27, 2023

You need to install the required dependencies specified in the setup.py before building the documentation

I want only clarify ..
I fully understand that and have no problem with that 😄
I've only been thinking about is it possible to avoid such situations in future.
Only this and nothing more.
If it would be hard I have no problem with accepting fact ticket has been closed and time to time such problems may happen 😋

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closing-soon This issue will automatically close in 4 days unless further comments are made. documentation This is a problem with documentation. guidance Question that needs advice or information.
Projects
None yet
Development

No branches or pull requests

2 participants