Append fetch query parameters before the URL fragment
@abhinandanjoshii já está trabalhando nisso.
Desde 10/9/2026.
Avaliação
Esta issue ainda não foi avaliada.
Descrição
Problem
_build_request() in src/pythonnative/net.py appends encoded params to the end of the entire URL. If the URL contains a fragment, the new parameters become part of that fragment and aren't sent to the server.
Confirmed example:
url: https://example.test/items?existing=1#details
params: {"q": "hello world"}
current: https://example.test/items?existing=1#details&q=hello+world
expected: https://example.test/items?existing=1&q=hello+world#details
The current request's selector is /items?existing=1, so the server never receives q.
Requested change
Use urllib.parse.urlsplit() and urlunsplit() to append to the query component while preserving the fragment. Keep urlencode(..., doseq=True) so list-valued parameters continue to work.
Acceptance criteria
- Tests cover URLs with neither query nor fragment, an existing query, a fragment, and both.
- Existing query parameters remain intact, including repeated keys and encoded values.
- List-valued parameters still become repeated query parameters.
- Assert the outgoing
Request.selectorincludes the added parameters and excludes the fragment; assert the URL's fragment is preserved separately. - Empty or absent
paramsleave the URL unchanged.
Starting points and verification
Add focused request-construction tests in tests/test_net.py; these cases don't need a server or network. Keep this change focused on URL assembly so it can be reviewed independently of request header handling.
uv run pytest tests/test_net.py -q
./scripts/check.sh
Suggested commit message
Following CONTRIBUTING.md:
fix(net): append query parameters before URL fragments
Before starting
Please follow the issue-claiming process: check for an assignee or linked pull request, comment to claim the issue, and wait for a maintainer to assign it before opening a pull request. Contributor setup is in CONTRIBUTING.md.
- Linguagem predominante
- Python
- Estrelas
- 131
- Forks
- 22
- Merge médio
- 3d 2h
- PRs com merge (30d)
- 5
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de pythonnative/pythonnative
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
pythonnative/pythonnative#125 ·
-
Add an API reference page for QueryClient and QuerySnapshotTalvez já em andamento @glenlouis8 assumiu há 17 dias. Abertadocumentation good first issue
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 86/100
pythonnative/pythonnative#95 · 1 comentário · 1 responsável ·
-
Cover diagnostic warning retention and reset behavior with testsTalvez já em andamento @glenlouis8 assumiu há 17 dias. Abertagood first issue
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
pythonnative/pythonnative#94 · 1 comentário · 1 responsável ·
-
Test icon generation fallbacks when Pillow is unavailableTalvez já em andamento @glenlouis8 assumiu há 17 dias. Abertagood first issue
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
pythonnative/pythonnative#93 · 1 comentário · 1 responsável ·
-
enhancement
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
pythonnative/pythonnative#122 ·
Todas as issues de pythonnative/pythonnative
Issues semelhantes
-
plot_graph crashes when a mesh node has no m2m edgeTalvez já em andamento @tygvi assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
mllam/neural-lam#883 · 1 comentário ·
Mantenedores costumam responder em até 2 dias
-
enhancement possible-duplicate
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 78/100
AOSSIE-Org/PictoPy#1715 · 2 comentários ·
Mantenedores costumam responder em até 6 dias
-
SQLite connector omits generated columns from the catalog, and drops relationships sourced on themAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
NVIDIA/auto-ontology#511 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
ethereum/execution-specs#3996 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
cpp-best-practices/project_validator#267 ·
Mantenedores costumam responder em até 1 dia