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

Build warnings triggered when run using Sphinx 2.2 #801

Closed
johnthagen opened this issue Sep 19, 2019 · 11 comments
Closed

Build warnings triggered when run using Sphinx 2.2 #801

johnthagen opened this issue Sep 19, 2019 · 11 comments

Comments

@johnthagen
Copy link
Contributor

Description of problem

Several warnings are triggered when building PDF output the latest master branch using Sphinx 2.2 and Python 3.7.

$ sphinx-build -a -n -W -b pdf . _build
...
.tox/docs/lib/python3.7/importlib/__init__.py:127: RemovedInSphinx30Warning: sphinx.environment.NoUri is deprecated. Check CHANGES for Sphinx API modifications.
  return _bootstrap._gcd_import(name[level:], package, level)

.tox/docs/lib/python3.7/site-packages/rst2pdf/rson.py:140: FutureWarning: Possible nested set at position 2
  splitter = re.compile(pattern).split

.tox/docs/lib/python3.7/site-packages/rst2pdf/pdfbuilder.py:602: RemovedInSphinx30Warning: sphinx.util.osutil.ustrtime is deprecated for removal
  date=ustrftime(self.config.today_fmt or _('%B %d, %Y'))

At least the bottom two are generated from this package, the first one I'm not sure on.

🖥 Versions

Python 3.7

Sphinx 2.2.0

rst2pdf master branch 2571340

sphinx-rtd-theme==0.4.3

@johnthagen
Copy link
Contributor Author

johnthagen commented Sep 24, 2019

See #788

@akrabat
Copy link
Member

akrabat commented Sep 26, 2019

Thanks for the report. Out of interest, have you just started to use rst2pdf and how did you hear about it?

@johnthagen
Copy link
Contributor Author

johnthagen commented Sep 26, 2019

have you just started to use rst2pdf

I have just started using rst2pdf, yes.

how did you hear about it

I believe I googled "Create PDF using Sphinx" and found this SO post: https://stackoverflow.com/questions/39534718/how-to-create-a-pdf-out-of-sphinx-documentation-tool/47720278#47720278

So far it's been great! All we need is probably some doc updates (#802) and to get a new release on PyPI. Given Python 2 is EOL in just a couple months, all of our projects are Python 3-only (#796) so we have to point to the master branch on GitHub in our requirements.

@akrabat
Copy link
Member

akrabat commented Sep 27, 2019

Thanks @johnthagen. I think #785 is the only blocker for a PyPI release with Python 3 support.

@akrabat
Copy link
Member

akrabat commented Sep 27, 2019

I believe that this is fixed as #788 is now merged.

@johnthagen
Copy link
Contributor Author

@akrabat Can confirm the warnings are now gone as of the latest master.

@johnthagen
Copy link
Contributor Author

johnthagen commented Jan 24, 2020

@akrabat We are still getting this warning using rst2pdf==0.96:

docs installed: alabaster==0.7.12,Babel==2.8.0,certifi==2019.11.28,chardet==3.0.4,Click==7.0,docutils==0.16,filelock==3.0.12,idna==2.8,imagesize==1.2.0,importlib-metadata==1.4.0,Jinja2==2.10.3,MarkupSafe==1.1.1,more-itertools==8.1.0,packaging==20.1,pdfrw==0.4,Pillow==7.0.0,pip-tools==4.4.0,pluggy==0.13.1,py==1.8.1,Pygments==2.5.2,pyparsing==2.4.6,pytz==2019.3,reportlab==3.5.34,requests==2.22.0,rst2pdf==0.96,six==1.14.0,smartypants==2.0.1,snowballstemmer==2.0.0,Sphinx==2.3.1,sphinx-rtd-theme==0.4.3,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-serializinghtml==1.1.3,toml==0.10.0,tox==3.14.3,urllib3==1.25.8,virtualenv==16.7.9,zipp==2.0.1
docs run-test-pre: PYTHONHASHSEED='2706317774'
docs run-test: commands[0] | sphinx-build -a -n -W . _build
Running Sphinx v2.3.1
/.tox/docs/lib/python3.7/site-packages/rst2pdf/rson.py:140: FutureWarning: Possible nested set at position 2
  splitter = re.compile(pattern).split

I think one of the warnings still needs to be fixed.

@dave-lawrence-dev
Copy link

Hi, still getting this on 0.96.dev0 running on Ubuntu focal:

/usr/lib/python3/dist-packages/rst2pdf/rson.py:140: FutureWarning: Possible nested set at position 2 splitter = re.compile(pattern).split

@samuelharmer
Copy link

Windows with Miniconda installed Python, pip installed rst2pdf. Doesn't happen with all my input files though so assume there is a particular problem with some of them. Let me know if I can help identify the cause, or whether this wants its own bug report?

${HOME}\.conda\envs\general\lib\site-packages\rst2pdf\rson.py:119: FutureWarning: Possible nested set at position 2
  splitter = re.compile(pattern).split

python --version
Python 3.8.5
rst2pdf --version
0.98

OK, I was going to attempt to provide a code sample but this is especially strange. Given the exact same input, it doesn't happen every single time.

@akrabat
Copy link
Member

akrabat commented Sep 17, 2020

@samuelharmer This has been fixed in #880 and will be in the next release. It is harmless on Python 3.8 as it's a warning for a change to Python expected in the future.

@samuelharmer
Copy link

@akrabat thanks for the pointer, #880 didn't come up in my Google for the error message so hopefully this will help anyone else too 😄

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

4 participants