rahulsmahadev opened a new pull request, #4367:
URL: https://github.com/apache/iceberg-python/pull/4367

   # Rationale for this change
   
   `S3V4RestSigner` sends its signing requests to the REST catalog's signer 
endpoint from its own `requests.Session()`, without a User-Agent. Those calls 
show up as `python-requests/<version>` instead of the `pyiceberg/<version> 
(<python implementation> <python version>)` value that the catalog sends since 
#4330, following the REST spec's User-Agent recommendation 
(apache/iceberg#17727).
   
   This moves the value into a small `_user_agent()` helper in 
`pyiceberg.catalog.rest` and sets it on signer requests the same way the 
catalog session does, after the `header.*` properties.
   
   ## Are these changes tested?
   
   Yes. `test_s3v4_rest_signer` now checks that the signing request carries the 
pyiceberg User-Agent. Without this change it fails, because the request sends 
`python-requests/<version>`.
   
   ## Are there any user-facing changes?
   
   S3 remote signing requests now send the pyiceberg User-Agent. As on the 
catalog session, a `header.User-Agent` property does not override it.
   
   This pull request and its description were written by Isaac.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to