Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Regression: localhost.localdomain default breaks name resolution

Aperta
#175 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
flask, python
Ambito
backend, testing

Direzione di ricerca

Inizia da pytest_flask.fixtures.live_server e analizza come original_server_name, SESSION_COOKIE_DOMAIN e url_for determinano il nome host del server di test. Riproduci la richiesta o la generazione dell'URL che fallisce, quindi verifica che l'URL risultante utilizzi localhost e venga risolto negli ambienti CI interessati.

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

Descrizione

bug

Describe the bug
In version 1.2.1, the following update was made:

Fix bug in :meth:pytest_flask.fixtures.live_server where SESSION_COOKIE_DOMAIN was set to false due to original_server_name defaulting to "localhost". The new default is "localhost.localdomain".

This causes issues when we go to make requests to our Flask test server. Specifically we get errors that look like this:

WARNING  urllib3.connectionpool:connectionpool.py:871 Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NameResolutionError("<urllib3.connection.HTTPConnection object at 0x16dd5a4d0>: Failed to resolve 'localhost.localdomain' ([Errno 8] nodename nor servname provided, or not known)")': /graphql

When we make a request to url_for, we get back a URL that looks like http://localhost.localdomain/graphql instead of http://localhost/graphql

While I know I can add localhost.localdomain to my local /etc/hosts file, there are many docker images we're using in our CI pipelines that also do not know how to resolve this domain name.

Lingua principale
Python
Stelle
499
Fork
93
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

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 pytest-dev/pytest-flask

Tutte le issue di pytest-dev/pytest-flask

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.