EncodingWarning when running under PyPy
Personne n'a encore pris cette issue.
- Langage dominant
- Python
- Étoiles
- 20.6k
- Forks
- 3.3k
- Métriques de merge des PR
- Métriques de PR en attente
Description
Bug Report
In this comment, I describe the warnings that I see when enabling mypy checks in PyPy.
To Reproduce
Grab jaraco/keyring@e9285df and run tox -e pypy (or tox -e pypy3 if pypy is aliased to Python 2). Note the tests run with PYTHONWARNDEFAULTENCODING=true.
Expected Behavior
There should be no warnings.
Actual Behavior
Warnings are emitted, three directly implicating mypy code and one implicated in configparser for mypy checks. I just ran the tests again and got even more warnings.
conftest.py::mypy
/opt/homebrew/Cellar/pypy3.10/7.3.15/libexec/lib/pypy3.10/configparser.py:694: EncodingWarning: 'encoding' argument not specified.
encoding = io.text_encoding(encoding)
conftest.py::mypy
/Users/jaraco/code/jaraco/keyring/.tox/pypy/lib/pypy3.10/site-packages/mypy/modulefinder.py:851: EncodingWarning: 'encoding' argument not specified.
with open(versions_path) as f:
conftest.py::mypy
/Users/jaraco/code/jaraco/keyring/.tox/pypy/lib/pypy3.10/site-packages/mypy/metastore.py:108: EncodingWarning: 'encoding' argument not specified.
with open(tmp_filename, "w") as f:
conftest.py::mypy
/Users/jaraco/code/jaraco/keyring/.tox/pypy/lib/pypy3.10/site-packages/mypy/build.py:1187: EncodingWarning: 'encoding' argument not specified.
with open(gitignore, "x") as f:
conftest.py::mypy
/Users/jaraco/code/jaraco/keyring/.tox/pypy/lib/pypy3.10/site-packages/mypy/build.py:1201: EncodingWarning: 'encoding' argument not specified.
with open(cachedir_tag, "x") as f:
conftest.py::mypy
/Users/jaraco/code/jaraco/keyring/.tox/pypy/lib/pypy3.10/site-packages/mypy/build.py:3526: EncodingWarning: 'encoding' argument not specified.
with open(fnam, "w") as f:
Your Environment
- Mypy version used: 0.10.3
- Mypy command-line flags: nothing special
- Mypy configuration options from
mypy.ini(and other config files): https://github.com/jaraco/keyring/blob/e9285df/mypy.ini - Python version used: Python 3.10.13 (PyPy 7.3.15)
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Reproduisez le rapport avec tox -e pypy et PYTHONWARNDEFAULTENCODING=true. Examinez les emplacements d’avertissement indiqués dans mypy/modulefinder.py, mypy/metastore.py et mypy/build.py, tout en tenant compte de l’avertissement distinct dans configparser.py. Le travail est terminé lorsque l’exécution PyPy concernée se termine sans ces messages EncodingWarning.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python
- Domaine
- tooling
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 25/100