graphql-python / graphql-python/graphql-core-legacy

ProcessExecutor failing

Ouverte
#83 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Python
Étoiles
372
Forks
175
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

(using osx, python 3.5)

seems to be trouble with using promises and pickle together. Also decorated methods seem to have trouble which means resolvers are often a problem. Adding a comma to args fixes the "Queue is not iterable" error but the second error is much more intricate.

```
ERROR|2016-10-01 01:12:57,673|graphql.execution.executor >> An error occurred while resolving field Query.viewer
Traceback (most recent call last):
File "/Users/ben/.virtualenvs/current/lib/python3.5/site-packages/graphql/execution/executor.py", line 190, in resolve_or_error
return executor.execute(resolve_fn, source, args, context, info)
File "/Users/ben/.virtualenvs/current/lib/python3.5/site-packages/graphql/execution/executors/process.py", line 29, in execute
_process = Process(target=queue_process, args=(self.q))
File "/usr/local/Cellar/python3/3.5.2_1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/multiprocessing/process.py", line 80, in __init__
self._args = tuple(args)
TypeError: 'Queue' object is not iterable
[01/Oct/2016 01:12:57] "POST /graphql? HTTP/1.1" 200 116
Traceback (most recent call last):
File "/usr/local/Cellar/python3/3.5.2_1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/multiprocessing/queues.py", line 241, in _feed
obj = ForkingPickler.dumps(obj)
File "/usr/local/Cellar/python3/3.5.2_1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/multiprocessing/reduction.py", line 51, in dumps
cls(buf, protocol).dump(obj)
TypeError: can't pickle _thread.lock objects
```

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Commencez par graphql/execution/executors/process.py et le chemin d’appel dans graphql/execution/executor.py, puis reproduisez le rapport sur macOS avec Python 3.5. Étudiez la gestion de l’argument Queue et l’échec de pickling impliquant des resolvers décorés et des promises. Le travail est terminé lorsque les erreurs signalées Queue et _thread.lock ne se produisent plus pendant l’exécution des resolvers.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
python
Domaine
backend
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
30/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.