As noted in the answer to Why do we use 1024 / 160 bit primes in DSA?, the security of DSA needs to worry about two attacks (neither of which should be described as factorisation).
There is the general number field sieve (GNFS) index calculus attack that depends on $L$. Calculating the difficulty of an GNFS attack accurately is not easy to describe, but can be looked up in tables such as the one that you quote above. The only missing value is $L=4096$ which (according to the RFC 3766 method on keylength.com is about 142-bits of security.
The other attack is to use a method similar to Pollard's kangaroo which will require roughly $2^{N/2}$ multiplications of $L$-bit numbers. Most people will then describe this as $N/2$-bits of security per your table.
The overall security is at best the minimum of these two values. We now see that the python option offer mismatched levels of security in some cases, which is not illegal but may be inefficient. The overall security offered for each pair is then
Parameters |
GNFS security |
Pollard security |
Overall security |
1024/160 |
80 |
80 |
80 |
2048/256 |
112 |
128 |
112 |
3072/256 |
128 |
128 |
128 |
4096/256 |
142 |
128 |
128 |