[docs] [issue35109] Doctest in CI uses python binary built from master causing DeprecationWarnings

Karthikeyan Singaravelan report at bugs.python.org
Tue Oct 30 04:34:25 EDT 2018


New submission from Karthikeyan Singaravelan <tir.karthi at gmail.com>:

Currently we run doctest in CI and we use the environment variable PYTHON to get the path of python binary to be used for virtualenv creation. We set PYTHON=../python in .travis.yml at [0] before running tests thus this causes the CI to use development version of the binary. Some of the modules used for doctest have incompatible changes related to importing from collections. The DeprecationWarning related code will be removed in 3.8 thus it will cause the doctest to fail while using the modules in CI. Since I have enabled -W in issue34081 they are visible now.

I propose using stable version of Python like python 3.7 so that when we remove collections import related code in master the doctest doesn't fail on Travis. There are respective PRs for this warnings in the repo but using stable version will fix this. We don't need to test the modules against the master branch of Python for doctest which is currently doing.

Sample warning : https://travis-ci.org/python/cpython/jobs/448195459#L2603

> /home/travis/build/python/cpython/Doc/venv/lib/python3.8/site-packages/babel/localedata.py:17: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
>  from collections import MutableMapping

On local machine the .travis.yml is not executed thus it uses PYTHON=python3 in Doc/Makefile and thus this not a problem locally building the docs that uses a stable version of Python.


Adding @mdk for feedback on this.

[0] https://github.com/python/cpython/blob/master/.travis.yml#L164

----------
assignee: docs at python
components: Build, Documentation
messages: 328886
nosy: docs at python, mdk, xtreak
priority: normal
severity: normal
status: open
title: Doctest in CI uses python binary built from master causing DeprecationWarnings
versions: Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35109>
_______________________________________


More information about the docs mailing list