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

bpo-30871: Add test.pythoninfo #3075

Merged
merged 1 commit into from
Aug 17, 2017
Merged

bpo-30871: Add test.pythoninfo #3075

merged 1 commit into from
Aug 17, 2017

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Aug 11, 2017

Add Lib/test/pythoninfo.py: script collecting various informations
about Python to help debugging test failures.

https://bugs.python.org/issue30871

@vstinner
Copy link
Member Author

@zware: Would you mind to check if I added the pythoninfo run to all ways to run Python tests on all our CIs?

@vstinner
Copy link
Member Author

Oh, AppVeyor doesn't want to run on my PR? I'm not sure about my PCbuild/rt.bat change.

@zware
Copy link
Member

zware commented Aug 11, 2017

If you're only going for CI runs, then it should be removed from PCbuild\rt.bat and added to Tools\buildbot\test.bat instead. If you're going for all test runs, it could be removed from make buildbottest and added to Tools\scripts\run_test.py instead.

I think my actual preference would be to add a CLI option to regrtest, and add that flag to make buildbottest and Tools\buildbot\test.bat.

Also, AppVeyor isn't running because the most recent commit only changes .travis.yml, which AppVeyor ignores.

if key in self.info:
raise ValueError("duplicate key: %r" % key)

# accepted types: str, tuple of str, None
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tuples of str does not looks accepted here, the following TypeError looks more in-sync with the implementation "value type must be str, int or None". Also I'd place this kind of comment in the docstring, it's not that far and may be usefull?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment removed


def get_infos(self):
"""
Get informations at a key:value dictionary where values are strings.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/at/as/

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@vstinner
Copy link
Member Author

@zware: "If you're only going for CI runs, then it should be removed from PCbuild\rt.bat and added to Tools\buildbot\test.bat instead. If you're going for all test runs, it could be removed from make buildbottest and added to Tools\scripts\run_test.py instead. I think my actual preference would be to add a CLI option to regrtest, and add that flag to make buildbottest and Tools\buildbot\test.bat."

I don't want to pollute test output with pythoninfo. My plan is to run pythoninfo as a separated command to be able to collapse its output.

In AppVeyor and Travis CI config, I added the pythoninfo run in the build step, so it may be collapsed by default.

"Also, AppVeyor isn't running because the most recent commit only changes .travis.yml, which AppVeyor ignores."

Oh ok. I rebased my patch serie into a single commit and rebased it, so AppVeyor will run.

@vstinner
Copy link
Member Author

@zware: Oh, I forgot to mention that I plan to add a new "pythoninfo" step on buildbots once pythoninfo is added to 2.7, 3.6 and master branches.

Copy link
Member

@zware zware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've not reviewed the script itself in detail, but the CI changes LGTM.

* Add Lib/test/pythoninfo.py: script collecting various informations
  about Python to help debugging test failures.
* regrtest: remove sys.hash_info and sys.flags from header.
* Travis CI, Appveyor: run pythoninfo before tests
@vstinner vstinner merged commit b907abc into python:master Aug 17, 2017
@vstinner vstinner deleted the pythinfo branch August 17, 2017 14:40
vstinner added a commit that referenced this pull request Aug 21, 2017
* bpo-30871: Add test.pythoninfo (#3075)

* Add Lib/test/pythoninfo.py: script collecting various informations
  about Python to help debugging test failures.
* regrtest: remove sys.hash_info and sys.flags from header.
* Travis CI, Appveyor: run pythoninfo before tests
(cherry picked from commit b907abc)

* bpo-30871: pythoninfo: add expat and _decimal (#3121)

* bpo-30871: pythoninfo: add expat and _decimal

* Remove _decimal.__version__

The string is hardcoded, not really interesting.

(cherry picked from commit f6ebd83)

* bpo-30871: Add "make pythoninfo" (#3120)

(cherry picked from commit a3a01a2)

* bpo-30871: pythoninfo: more sys, os, time data (#3130)

* bpo-30871: pythoninfo: more sys, os, time data

PythonInfo now converts types other than intger to string by default.

* fix typo

(cherry picked from commit ad7eaed)

* bpo-31231: Fix pythoninfo in Travis config (#3134)

bpo-31231, bpo-30871: Replace "./python -m test.pythoninfo" with
"make pythoninfo", since macOS uses ./python.exe.
(cherry picked from commit 92b1f90)
vstinner added a commit that referenced this pull request Aug 22, 2017
* bpo-30871: Add test.pythoninfo (#3075)

* Add Lib/test/pythoninfo.py: script collecting various informations
  about Python to help debugging test failures.
* regrtest: remove sys.hash_info and sys.flags from header.
* Travis CI, Appveyor: run pythoninfo before tests
(cherry picked from commit b907abc)

* bpo-30871: pythoninfo: add expat and _decimal (#3121)

* bpo-30871: pythoninfo: add expat and _decimal

* Remove _decimal.__version__

The string is hardcoded, not really interesting.

(cherry picked from commit f6ebd83)

* bpo-30871: Add "make pythoninfo" (#3120)

(cherry picked from commit a3a01a2)

* bpo-30871: pythoninfo: more sys, os, time data (#3130)

* bpo-30871: pythoninfo: more sys, os, time data

PythonInfo now converts types other than intger to string by default.

* fix typo

(cherry picked from commit ad7eaed)

* bpo-31231: Fix pythoninfo in Travis config (#3134)

bpo-31231, bpo-30871: Replace "./python -m test.pythoninfo" with
"make pythoninfo", since macOS uses ./python.exe.
(cherry picked from commit 92b1f90)

(cherry picked from commit 29d007b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants