Change by Matt Bogosian :
--
pull_requests: +29919
stage: backport needed -> patch review
pull_request: https://github.com/python/cpython/pull/31821
___
Python tracker
<https://bugs.python.org/issu
Change by Matt Bogosian :
--
keywords: +patch
nosy: +mbogosian
nosy_count: 4.0 -> 5.0
pull_requests: +29243
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/31061
___
Python tracker
<https://bugs.python.org/i
Matt Bogosian added the comment:
Please consider highlighting that dicts are not included in the documentation.
While *technically* true, this ...
> compact impacts the way that long sequences (lists, tuples, sets, etc) are
> formatted. If compact is false (the default) then eac
Matt Bogosian added the comment:
Thanks! Where's that documented? (Apologies if I missed it.)
--
___
Python tracker
<https://bugs.python.org/issue40346>
___
___
Matt Bogosian added the comment:
I landed here after investigating this surprising result:
# test_case.py
from random import Random
from typing import Sequence, Union
_RandSeed = Union[None, int, Sequence[int]]
class MyRandom(Random):
def __init__(
self,
seed
Matt Bogosian added the comment:
After some consideration, I think this is probably more correct:
```
--- /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tarfile.py
2016-12-17 12:41:21.0 -0800
+++ tarfile.py 2017-03-10 14:57:15.0 -0800
@@ -2347,9 +2347,10
Changes by Matt Bogosian <spam+python@eb3f73.yaymail.com>:
Removed file: http://bugs.python.org/file46717/tarfile.patch
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
Matt Bogosian added the comment:
This patch (also attached) seems to address this particular use case:
```
--- a/Lib/tarfile.py2016-12-17 12:41:21.0 -0800
+++ b/Lib/tarfile.py2017-03-10 12:23:34.0 -0800
@@ -2347,7 +2347,7 @@
# Advance the file pointer
Matt Bogosian added the comment:
I'm not sure if it helps at this point, but I've tried several "flavors" of
apparently legit tar files with zero entries. All fail.
``tarfile`` module:
```
$ ( set -x ; cd /tmp || exit 1 ; python -V ; rm -fv test.tar ; python -c
'import os, ta
Matt Bogosian added the comment:
FWIW, the (offending) fix for #24259 was introduced (e.g., in 2.7) via 2.7.10.
I've verified that 2.7.9 works as expected:
```
$ python -V
Python 2.7.9
$ python tarfail.py
opening /…/tarfail/test.tar.bz2
opening /…/tarfail/test.tar
New submission from Matt Bogosian:
It looks like there's a problem examining ``.tar`` files with no entries:
```
$ # ==
$ # Extract test cases (attached to this bug report)
$ tar xpvf tarfail.tar.bz2
x tarfail/
x tarfail/tarfail.py
New submission from Matt Bogosian:
>From (e.g)
>https://github.com/python/cpython/blob/2.7/Lib/distutils/command/check.py#L145:
{{{
try:
parser.parse(data, document)
except AttributeError as e: # <- this could happen anywhere inside
par
Changes by Matt Bogosian <spam+python@eb3f73.yaymail.com>:
--
nosy: +posita
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
Matt Bogosian added the comment:
> I consider this as a bug and think that we should weak some of checks
> isinstance(..., int) to isinstance(..., (int, long)). numbers.Integral is too
> wide type, C implementation doesn't support it.
Oddly enough, the C implementation is what i
New submission from Matt Bogosian:
datetime.py is peppered with ``assert`` statements that are two restrictive.
Specifically, ``isinstance(..., int)`` does not afford compatibility with
alternate ``int``-like implementations (e.g., ``future.types.newint``). Some
background:
* https
15 matches
Mail list logo