What's wrong with this Python streaming response?

What's wrong with this Python streaming response in an API. The Python code closes the database cursor before the generator is consumed, so the stream fails mid response. In Python services this causes partial downloads.

#whatswrongwiththispythoncode #pythonbug #pythonproductionbug #pythondebugging #pythonbackend #pythoncodereview #pythonmistake #pythonbestpractices #pythonreliability #pythonincid...

https://www.youtube.com/watch?v=MqjVyD53Uic

Whats wrong with this Python streaming response? #pythondataloss

YouTube

Why does this Python asyncio task run on wrong loop?

Why does this Python asyncio task run on wrong loop in a multi-loop app. The Python code creates a task from a thread without passing the loop. In Python services this schedules on the wrong event loop.

#whatswrongwiththispythoncode #pythonbug #pythonproductionbug #pythondebugging #pythonbackend #pythoncodereview #pythonmistake #pythonbestpractices #pythonreliability #pythonincident #pythonapi ...

https://www.youtube.com/watch?v=1_tED3YnL-8

Why does this Python asyncio task run on wrong loop? #whatswrongwiththispythoncode

YouTube

What's wrong with this Python cache read?

What's wrong with this Python cache read in a quota service. The Python code treats falsey values as a cache miss, so real zeros keep hitting the database. In production Python APIs this explodes traffic and latency when quotas are exhausted.

#whatswrongwiththispythoncode #pythonbug #pythonproductionbug #pythondebugging #pythonbackend #pythoncodereview #pythonmistake #pythonbestpractices #pythonreliabilit...

https://www.youtube.com/watch?v=e2xIU-tgPH4

Whats wrong with this Python cache read? #whatswrongwiththispythoncode

YouTube

What's wrong with this Python sqlite connection in threads?

What's wrong with this Python sqlite connection in threads in a web app. The Python code shares one connection across threads, but sqlite connections are not thread safe. In Python APIs this causes database locked errors.

#whatswrongwiththispythoncode #pythonbug #pythonproductionbug #pythondebugging #pythonbackend #pythoncodereview #pythonmistake #pythonbestpractices #pythonreliability #...

https://www.youtube.com/watch?v=LqV6WQ9AQ6I

Whats wrong with this Python sqlite connection in threads? #whatswrongwiththispythoncode

YouTube

What's wrong with this Python StringIO that returns empty on second read?

What's wrong with this Python StringIO that returns empty on second read in a parser. The Python code reads the buffer once and assumes it resets, so the second read gets nothing. In Python data pipelines this causes partial parses.

#whatswrongwiththispythoncode #pythonbug #pythonproductionbug #pythondebugging #pythonbackend #pythoncodereview #pythonmistake #pythonbestpract...

https://www.youtube.com/watch?v=HuPw8Ja4a6E

Whats wrong with this Python StringIO that returns empty on second read? #pythonbufferconsumed

YouTube

Why does this Python atexit handler run in wrong order?

Why does this Python atexit handler run in wrong order during shutdown. The Python code registers cleanup handlers that depend on each other, but atexit runs in reverse order. In Python services this breaks graceful shutdown.

#whatswrongwiththispythoncode #pythonbug #pythonproductionbug #pythondebugging #pythonbackend #pythoncodereview #pythonmistake #pythonbestpractices #pythonreliability #...

https://www.youtube.com/watch?v=hcvxbLALHoc

Why does this Python atexit handler run in wrong order? #pythonbackend

YouTube

Why does this Python multiprocessing spawn fail on lambda?

Why does this Python multiprocessing spawn fail on lambda in a worker pool. The Python code passes a lambda to Process, but lambdas cannot be pickled. In Python batch jobs this crashes on fork.

#whatswrongwiththispythoncode #pythonbug #pythonproductionbug #pythondebugging #pythonbackend #pythoncodereview #pythonmistake #pythonbestpractices #pythonreliability #pythonincident #pythonapi #py...

https://www.youtube.com/watch?v=uAKwA8te29k

Why does this Python multiprocessing spawn fail on lambda? #pythonreliability

YouTube

What's wrong with this Python fnmatch case sensitivity?

What's wrong with this Python fnmatch case sensitivity on Windows. The Python code uses fnmatch on paths, but behavior differs by OS. In Python file watchers this misses files on Windows.

#whatswrongwiththispythoncode #pythonbug #pythonproductionbug #pythondebugging #pythonbackend #pythoncodereview #pythonmistake #pythonbestpractices #pythonreliability #pythonincident #pythonapi #pythonengin...

https://www.youtube.com/watch?v=VR9Ui3zacok

Whats wrong with this Python fnmatch case sensitivity? #pythonglob

YouTube

What's wrong with this Python lambda capturing the wrong value?

What's wrong with this Python lambda capturing the wrong value in a callback. The Python lambda captures the loop variable by reference, so all callbacks see the final value. In Python async this fires wrong handlers.

#whatswrongwiththispythoncode #pythonbug #pythonproductionbug #pythondebugging #pythonbackend #pythoncodereview #pythonmistake #pythonbestpractices #pythonreliability #...

https://www.youtube.com/watch?v=qegfM_2tL0E

- YouTube

Enjoy the videos and music you love, upload original content, and share it all with friends, family, and the world on YouTube.

Why does this Python os.environ persist across tests?

Why does this Python os.environ persist across tests in pytest. The Python code modifies os.environ in a test without cleanup. In Python test suites this leaks config to other tests.

#whatswrongwiththispythoncode #pythonbug #pythonproductionbug #pythondebugging #pythonbackend #pythoncodereview #pythonmistake #pythonbestpractices #pythonreliability #pythonincident #pythonapi #pythonengineering ...

https://www.youtube.com/watch?v=-4gO_vqVSC8

Why does this Python os.environ persist across tests? #pythonapi

YouTube