Replace, fork or copy sharedmock

Aperta
#549 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
testing

Direzione di ricerca

Start with the dependency entry in requirements/local.in and its use in documentcloud/common/serverless/tests/test_error_handling.py. Inspect how sharedmock supports mocks across process boundaries, then compare the options in the issue: fork it, bring the helpers into the codebase, or find a replacement. Done means those tests no longer depend on the unmaintained third-party repository and still cover the expected behavior.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

dependencies

sharedmock is installed from a third-party git repo (elritsch/python-sharedmock) that hasn't been updated since 2017.
https://github.com/MuckRock/documentcloud/blob/fe9be7f12d525eb90defbe7035a4bcd45aa2b6a1/requirements/local.in#L15

In my PR to get us to python 3.15, I've pinned it to a specific commit to keep the expected behavior in case a commit gets pushed down the road which breaks expected behavior out from underneath us as it is currently unpinned on master.
https://github.com/elritsch/python-sharedmock@f12c7beb770bc67cccd52a25631e2ceee462a34a#egg=sharedmock

I avoided the PyPi distributed sharedmock because although the author is listed as Elmar Ritsch, it was packaged by other developers who don't have a ton of history on PyPi: https://pypi.org/project/sharedmock/. It's also out of date.

sharedmock is only used in documentcloud/common/serverless/tests/test_error_handling.py, for mocks that work across process boundaries. I'm not sure how to fix this, so I've left it for follow up cleanup.

If we absolutely need it, we can fork it or if it's small enough we can include the helpers in the code base..otherwise look for a replacement.

This is good cleanup follow up after the Python upgrade.

Lingua principale
Python
Stelle
55
Fork
10
Merge medio
1g 22h
PR unite (30g)
13

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di MuckRock/documentcloud

Tutte le issue di MuckRock/documentcloud

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.