-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path703552.txt
55 lines (54 loc) · 2.47 KB
/
703552.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
[padhle@IITJEE uv-bug]$ zsh
[padhle@IITJEE ~/Projects/Python/uv-bug]$ ls
2025-02-15-14-41-19-24853.cast
bug.cast
main-bug.py
main.py
working.cast
[padhle@IITJEE ~/Projects/Python/uv-bug]$ bat main-bug.py
───────┬─────────────────────────────────────────────────────────────────────
│ File: main-bug.py
───────┼─────────────────────────────────────────────────────────────────────
1 │ import urllib3
2 │ import brotli
3 │
4 │ http = urllib3.PoolManager()
5 │
6 │ response = http.request('GET', 'https://python.org/') # No 'with' s
│ tatement
7 │
8 │ html = response.data # Read the data *immediately*
9 │
10 │ response.release_conn() # Return the connection to the pool (VERY I
│ MPORTANT!)
11 │
12 │ compressed_html = brotli.compress(html)
13 │ print(compressed_html[:50]) # Print a snippet of compressed data
14 │
15 │ decompressed_html = brotli.decompress(compressed_html).decode('utf-8
│ ', errors='ignore') #Handle potential decoding errors.
16 │ print(decompressed_html[:50]) # Print a snippet of decompressed data
───────┴─────────────────────────────────────────────────────────────────────
[padhle@IITJEE ~/Projects/Python/uv-bug]$ python main-bug.py
b'\x1b\x92\xc5D\x14\xf4?`1`\xb7)\x07g\xd9\xff\xe6)\x8d\x00\xcdA\xcc4\xb6\xc6\xd1\xe0\x08\x8d}\x92\xfb\xbf\xbat\xef2\xf99%\x10\xda.\x1c0|c\x94\xb3'
<!doctype html>
<!--[if lt IE 7]> <html class="n
[padhle@IITJEE ~/Projects/Python/uv-bug]$ ls
2025-02-15-14-41-19-24853.cast
bug.cast
main-bug.py
main.py
working.cast
[padhle@IITJEE ~/Projects/Python/uv-bug]$ uv run --with=urllib3 brotli main-bug.py
[padhle@IITJEE ~/Projects/Python/uv-bug]$ ls
2025-02-15-14-41-19-24853.cast
bug.cast
main-bug.py
main-bug.py.br
main.py
working.cast
[padhle@IITJEE ~/Projects/Python/uv-bug]$ why is this here???
zsh: no matches found: here???
[padhle@IITJEE ~/Projects/Python/uv-bug]$
[padhle@IITJEE uv-bug]$
exit