[issue39377] json.loads encoding parameter deprecation removal in Python 3.9

2020-01-19 Thread STINNER Victor


STINNER Victor  added the comment:

I reopen the issue.

> New changeset 5492bfcefec67b016e8239c0e9135bc2f03e3058 by Inada Naoki in 
> branch 'master':
> bpo-39377: json: Remove the encoding option. (GH-18075)
> https://github.com/python/cpython/commit/5492bfcefec67b016e8239c0e9135bc2f03e3058

Would you mind to document the removal in the following doc section?
https://docs.python.org/dev/whatsnew/3.9.html#removed

--
resolution: fixed -> 
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39377] json.loads encoding parameter deprecation removal in Python 3.9

2020-01-19 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

> Do you mean to say we should or shouldn't be raising an error? With 
> Inada-san's change you get this:

Sorry, I misread the patch as only removal and didn't test the change 
completely.

I am filing issues on code that I can find using this pattern and will wait for 
the feedback during alpha cycle.

* https://github.com/ansible/ansible/issues/66592
* https://github.com/jupyter/notebook/issues/5165
* https://github.com/django-extensions/django-extensions/issues/1465

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39377] json.loads encoding parameter deprecation removal in Python 3.9

2020-01-19 Thread Inada Naoki


Inada Naoki  added the comment:

If this broke some real-world software and the pain is high enough, we can 
revert the change and add one more deprecation period, like all other removals.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39377] json.loads encoding parameter deprecation removal in Python 3.9

2020-01-19 Thread Ammar Askar


Ammar Askar  added the comment:

Do you mean to say we should or shouldn't be raising an error? With Inada-san's 
change you get this:

>>> json.loads("true", encoding='utf8')
Traceback (most recent call last):
  File "", line 1, in 
  File "C:\Users\ammar\workspace\cpython\lib\json\__init__.py", line 359, in 
loads
return cls(**kw).decode(s)
TypeError: __init__() got an unexpected keyword argument 'encoding'

--
nosy: +ammar2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39377] json.loads encoding parameter deprecation removal in Python 3.9

2020-01-19 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Should we be raising an error if encoding is present on 3.9 as part of kwargs? 
It's obtrusive but for people going from Python 3.7 to 3.9 there will be no 
change and they will keep assuming encoding parameter is valid.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39392] Python Turtle is not filling alternate overlapping areas of a shape with same color

2020-01-19 Thread Lijo


New submission from Lijo :

Alternate overlapping areas of shape are not getting filled with same color. 
But instead its white.
Reproducible code

from turtle import *
color('black', 'yellow')
begin_fill()
circle(40)
circle(60)
circle(80)
end_fill()

Generated image ubuntu@python3.7.4
https://ibb.co/jG0bCBz

Raised a stackoverflow question
https://stackoverflow.com/questions/59811915/python-turtle-is-not-filling-alternate-overlapping-areas-of-a-shape-with-same-co

--
components: Tkinter
messages: 360290
nosy: lijose
priority: normal
severity: normal
status: open
title: Python Turtle is not filling alternate overlapping areas of a shape with 
same color
type: behavior
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39377] json.loads encoding parameter deprecation removal in Python 3.9

2020-01-19 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +17469
pull_request: https://github.com/python/cpython/pull/18076

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39377] json.loads encoding parameter deprecation removal in Python 3.9

2020-01-19 Thread Inada Naoki


Change by Inada Naoki :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39377] json.loads encoding parameter deprecation removal in Python 3.9

2020-01-19 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset 5492bfcefec67b016e8239c0e9135bc2f03e3058 by Inada Naoki in branch 
'master':
bpo-39377: json: Remove the encoding option. (GH-18075)
https://github.com/python/cpython/commit/5492bfcefec67b016e8239c0e9135bc2f03e3058


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3770] test_multiprocessing fails on systems with HAVE_SEM_OPEN=0

2020-01-19 Thread Matthew Fernandez


Matthew Fernandez  added the comment:

I'm trying to follow the history of this issue, as it does not seem fully 
resolved to me. While trying to package something for Debian, one of the buildd 
[0] logs for hurd-i386 points to this issue as the cause of a failure [1]. This 
occurs with Python 3.7, though Debian's Python 3.7 may involve some distro 
patches on top of upstream source. If the build log is inaccessible or 
incomprehensible, the relevant sections are:

...
The following additional packages will be installed:
... libpython3-stdlib libpython3.7-minimal libpython3.7-stdlib ... python3 
python3-minimal python3.7 python3.7-minimal
...
/usr/bin/ctest --force-new-ctest-process -j1
Test project /<>/obj-i686-gnu
Start 1: tests
1/1 Test #1: tests ***Failed0.10 sec
Traceback (most recent call last):
  File "/usr/lib/python3.7/multiprocessing/synchronize.py", line 28, in 

from _multiprocessing import SemLock, sem_unlink
ImportError: cannot import name 'SemLock' from '_multiprocessing' 
(/usr/lib/python3.7/lib-dynload/_multiprocessing.cpython-37m-i386-gnu.so)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/<>/tests/run-tests.py", line 46, in 
print_lock = multiprocessing.Lock()
  File "/usr/lib/python3.7/multiprocessing/context.py", line 66, in Lock
from .synchronize import Lock
  File "/usr/lib/python3.7/multiprocessing/synchronize.py", line 32, in 

" synchronization primitives needed will not" +
ImportError: This platform lacks a functioning sem_open implementation, 
therefore, the required synchronization primitives needed will not function, 
see issue 3770.

Do you know what is happening here? Maybe the compounded ImportError I'm seeing 
*was* the resolution referred to in prior comments, but if so it seems strange 
to reference this issue in the error message.

The hurd-i386 platform is not a priority for me, so if the answer is 
"multiprocessing doesn't work there" I am perfectly OK with this. Also I 
realise I am asking you to recall >10 year old memories so I apologise in 
advance for any re-opened wounds.

If you need to see the source for what buildd is actually testing here, it's 
the debian/v2020.11.01-1 tag of [2].

  [0]: https://wiki.debian.org/buildd
  [1]: 
https://buildd.debian.org/status/fetch.php?pkg=rumur=hurd-i386=2020.01.11-1=1579290012=0
  [2]: https://github.com/Smattr/rumur

--
nosy: +smattr

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39377] json.loads encoding parameter deprecation removal in Python 3.9

2020-01-19 Thread Inada Naoki


Change by Inada Naoki :


--
keywords: +patch
pull_requests: +17468
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/18075

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38536] Trailing space in formatted currency with international=True and symbol following value

2020-01-19 Thread Inada Naoki


Inada Naoki  added the comment:

I'm not sure this fix should be backported.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions:  -Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38536] Trailing space in formatted currency with international=True and symbol following value

2020-01-19 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset e96d954527aa376457451e32a9d75ae3ea9ab4bd by Inada Naoki in branch 
'master':
bpo-38536: locale: Remove trailing space in formatted currency (GH-16864)
https://github.com/python/cpython/commit/e96d954527aa376457451e32a9d75ae3ea9ab4bd


--
nosy: +inada.naoki

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20126] sched doesn't handle events added after scheduler starts

2020-01-19 Thread Ryan Govostes


Ryan Govostes  added the comment:

This absolutely should be documented. If adding an earlier event is not 
supported then it should raise an exception. Appearing the enqueue the event 
but not triggering the callback is especially confusing. It may be obvious 
behavior to someone who has spent time developing this module or working with 
it but not to someone who just wants to, e.g., build an alarm clock or calendar 
app.

--
nosy: +rgov

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27321] Email parser creates a message object that can't be flattened

2020-01-19 Thread Mark Sapiro


Change by Mark Sapiro :


--
pull_requests: +17467
pull_request: https://github.com/python/cpython/pull/18074

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39365] Support (SEEK_END/SEEK_CUR) relative seeking in StringIO

2020-01-19 Thread random832


random832  added the comment:

That documentation isn't specific to StringIO, and in any case, the limitation 
in question isn't documented. The actual implementation is at 
https://github.com/python/cpython/blob/HEAD/Modules/_io/stringio.c#L484

But if examples would help, they're simple to come up with:

>>> f = io.StringIO('t\xe9st')
>>> f.seek(-1, io.SEEK_END)
Traceback (most recent call last):
  File "", line 1, in 
OSError: Can't do nonzero cur-relative seeks
>>> f.seek(2, io.SEEK_CUR)
Traceback (most recent call last):
  File "", line 1, in 
OSError: Can't do nonzero cur-relative seeks
# demonstration that SEEK_SET works treating all characters as one unit
>>> f.seek(2, io.SEEK_SET)
2
>>> f.read()
'st'

As far as I know this is the case in all currently maintained versions of 
Python 3, since the C-based unicode StringIO implementation was added in 2008.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38400] Python segfaults when configured with --with-pydebug --with-trace-refs

2020-01-19 Thread Elvis Pranskevichus


Elvis Pranskevichus  added the comment:

Thanks for the lightning-fast turnaround, Pablo!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38400] Python segfaults when configured with --with-pydebug --with-trace-refs

2020-01-19 Thread miss-islington


miss-islington  added the comment:


New changeset 4cdb75890abd4ee7694744d5c24248f6735b0534 by Miss Islington (bot) 
in branch '3.8':
bpo-38400 Don't check for NULL linked list pointers in _PyObject_IsFreed 
(GH-16630)
https://github.com/python/cpython/commit/4cdb75890abd4ee7694744d5c24248f6735b0534


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38400] Python segfaults when configured with --with-pydebug --with-trace-refs

2020-01-19 Thread miss-islington


miss-islington  added the comment:


New changeset a360070121836dd29b691f5d6d14bcfb371d8029 by Miss Islington (bot) 
in branch '3.7':
bpo-38400 Don't check for NULL linked list pointers in _PyObject_IsFreed 
(GH-16630)
https://github.com/python/cpython/commit/a360070121836dd29b691f5d6d14bcfb371d8029


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38400] Python segfaults when configured with --with-pydebug --with-trace-refs

2020-01-19 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> Since https://bugs.python.org/issue38070 was backported to 3.8, shouldn't 
> this as well?  3.8 is currently broken otherwise.

Thanks for the catch, Elvis!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38400] Python segfaults when configured with --with-pydebug --with-trace-refs

2020-01-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +17466
pull_request: https://github.com/python/cpython/pull/18073

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38400] Python segfaults when configured with --with-pydebug --with-trace-refs

2020-01-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +17465
pull_request: https://github.com/python/cpython/pull/18072

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38400] Python segfaults when configured with --with-pydebug --with-trace-refs

2020-01-19 Thread Elvis Pranskevichus


Elvis Pranskevichus  added the comment:

Since https://bugs.python.org/issue38070 was backported to 3.8, shouldn't this 
as well?  3.8 is currently broken otherwise.

--
nosy: +Elvis.Pranskevichus

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34780] [Windows] Hang on startup if stdin refers to a pipe with an outstanding concurrent operation on Windows

2020-01-19 Thread STINNER Victor


Change by STINNER Victor :


--
title: Hang on startup if stdin refers to a pipe with an outstanding concurrent 
operation on Windows -> [Windows] Hang on startup if stdin refers to a pipe 
with an outstanding concurrent operation on Windows

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39391] Nondeterministic Pydoc output on functions that have functions as default parameters

2020-01-19 Thread Peter Occil


New submission from Peter Occil :

It appears that if a method has default parameters set to functions, as in this 
example:

def f1():
pass

def f2(a, b=f1):
pass

The resulting Pydoc output produces a different, nondeterministic rendering for 
the f2 method each time it generates the documentation, such as `m1(a, 
b=)` or `m1(a, b=)`.  And this is problematic for version control systems, among 
other things, especially since this is not a meaningful change to the 
documentation.

One solution may be to write, say, `m1(a, b=f1)` instead.

--
assignee: docs@python
components: Documentation
messages: 360278
nosy: Peter Occil, docs@python
priority: normal
severity: normal
status: open
title: Nondeterministic Pydoc output on functions that have functions as 
default parameters
type: behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35561] Valgrind reports Syscall param epoll_ctl(event) points to uninitialised byte(s)

2020-01-19 Thread miss-islington


miss-islington  added the comment:


New changeset 296383b6d05f9617283aeb5b601106f84b016198 by Miss Islington (bot) 
in branch '3.7':
bpo-35561: Supress valgrind false alarm on epoll_ctl(event) (GH-18060)
https://github.com/python/cpython/commit/296383b6d05f9617283aeb5b601106f84b016198


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35561] Valgrind reports Syscall param epoll_ctl(event) points to uninitialised byte(s)

2020-01-19 Thread miss-islington


miss-islington  added the comment:


New changeset 23793edf0d61aa98478541d0ff8f2b900ff1813d by Miss Islington (bot) 
in branch '3.8':
bpo-35561: Supress valgrind false alarm on epoll_ctl(event) (GH-18060)
https://github.com/python/cpython/commit/23793edf0d61aa98478541d0ff8f2b900ff1813d


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35561] Valgrind reports Syscall param epoll_ctl(event) points to uninitialised byte(s)

2020-01-19 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks Nikolaus Rath for the bug report, and thnaks Zackery Spytz for the fix!

The fix will be backported automatically to 3.7 and 3.8 as soon as CI tests 
pass.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35561] Valgrind reports Syscall param epoll_ctl(event) points to uninitialised byte(s)

2020-01-19 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset d8ef64422a75f40cecdb1a7ee43492607d3daaf6 by Victor Stinner 
(Zackery Spytz) in branch 'master':
bpo-35561: Supress valgrind false alarm on epoll_ctl(event) (GH-18060)
https://github.com/python/cpython/commit/d8ef64422a75f40cecdb1a7ee43492607d3daaf6


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35561] Valgrind reports Syscall param epoll_ctl(event) points to uninitialised byte(s)

2020-01-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +17464
pull_request: https://github.com/python/cpython/pull/18071

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35561] Valgrind reports Syscall param epoll_ctl(event) points to uninitialised byte(s)

2020-01-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +17463
pull_request: https://github.com/python/cpython/pull/18070

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39379] sys.path[0] is already absolute path

2020-01-19 Thread STINNER Victor


STINNER Victor  added the comment:

Correct, it seems like sys.path[0] was already absolute and so it can be 
removed from What's New in Python 3.9.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39374] Key in sort -> Callable Object instead of function

2020-01-19 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Go ahead and make a PR for this:

   function -> function (or other callable)

Let's keep the word "function" because it does a much better job of 
communicating that an the more abstract word "callable".

--
assignee: docs@python -> rhettinger
priority: normal -> low
versions:  -Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39390] shutil.copytree - 3.8 changed argument types of the ignore callback

2020-01-19 Thread Manuel Barkhau


Change by Manuel Barkhau :


--
keywords: +patch
pull_requests: +17462
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/18069

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39390] shutil.copytree - 3.8 changed argument types of the ignore callback

2020-01-19 Thread Manuel Barkhau


Change by Manuel Barkhau :


--
title: shutil.copytree - ignore callback behaviour change -> shutil.copytree - 
3.8 changed argument types of the ignore callback

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39390] shutil.copytree - ignore callback behaviour change

2020-01-19 Thread Manuel Barkhau


New submission from Manuel Barkhau :

In Python 3.8, the types of the parameters to the ignore callable appear to 
have changed.

Previously the `src` parameter was a string and the `names` parameter was a 
list of strings. Now the `src` parameter appears to be either a `pathlib.Path` 
or an `os.DirEntry`, while the `names` parameter is a set of strings.

I would suggest adding the following to the documentation 
https://github.com/python/cpython/blob/master/Doc/library/shutil.rst

   .. versionchanged:: 3.8
  The types of arguments to *ignore* have changed. The first argument 
  (the directory being visited) is a func:`os.DirEntry` or a 
  func:`pathlib.Path`; Previously it was a string. The second argument is
  a set of strings; previously it was a list of strings.

--
assignee: docs@python
components: Documentation, Library (Lib)
messages: 360271
nosy: docs@python, mbarkhau
priority: normal
severity: normal
status: open
title: shutil.copytree - ignore callback behaviour change
type: behavior
versions: Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39373] --

2020-01-19 Thread Zachary Ware


Change by Zachary Ware :


--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
title: new world -> --

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39389] gzip metadata fails to reflect compresslevel

2020-01-19 Thread William Chargin


William Chargin  added the comment:

(The commit reference above was meant to be git558f07891170, not a
Mercurial reference. Pardon the churn; I'm new here. :-) )

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34990] year 2038 problem in compileall.py

2020-01-19 Thread Bernhard M. Wiedemann


Bernhard M. Wiedemann  added the comment:

ping.
Another 19th of January passed.

I'd still like to see progress on this, because this hinders my other y2038 bug 
discovery work.

--
versions: +Python 3.5, Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39389] gzip metadata fails to reflect compresslevel

2020-01-19 Thread William Chargin


Change by William Chargin :


--
type:  -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39389] gzip metadata fails to reflect compresslevel

2020-01-19 Thread William Chargin


New submission from William Chargin :

The `gzip` module properly uses the user-specified compression level to
control the underlying zlib stream compression level, but always writes
metadata that indicates that the maximum compression level was used.

Repro:

```
import gzip

blob = b"The quick brown fox jumps over the lazy dog." * 32

with gzip.GzipFile("fast.gz", mode="wb", compresslevel=1) as outfile:
outfile.write(blob)

with gzip.GzipFile("best.gz", mode="wb", compresslevel=9) as outfile:
outfile.write(blob)
```

Run this script, then run `wc -c *.gz` and `file *.gz`:

```
$ wc -c *.gz
 82 best.gz
 84 fast.gz
166 total
$ file *.gz
best.gz: gzip compressed data, was "best", last modified: Sun Jan 19 20:15:23 
2020, max compression
fast.gz: gzip compressed data, was "fast", last modified: Sun Jan 19 20:15:23 
2020, max compression
```

The file sizes correctly reflect the difference, but `file` thinks that
both archives are written at max compression.

The error is that the ninth byte of the header in the output stream is
hard-coded to `\002` at Lib/gzip.py:260 (as of 558f07891170), which
indicates maximum compression. The correct value to indicate maximum
speed is `\004`. See RFC 1952, section 2.3.1:


Using GNU `gzip(1)` with `--fast` creates the same output file as the
one emitted by the `gzip` module, except for two bytes: the metadata and
the OS (the ninth and tenth bytes).

--
components: Library (Lib)
files: repro.py
messages: 360268
nosy: wchargin
priority: normal
severity: normal
status: open
title: gzip metadata fails to reflect compresslevel
versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9
Added file: https://bugs.python.org/file48853/repro.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36417] unicode.isdecimal bug in online Python 2 documentation

2020-01-19 Thread Zachary Ware


Zachary Ware  added the comment:

As Python 2.7 has reached EOL and the branch is closed to regular maintenance, 
I'm closing the issue.  Thanks for the report and patch anyway!

--
nosy: +zach.ware
resolution:  -> out of date
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29612] TarFile.extract() suffers from hard links inside tarball

2020-01-19 Thread Zachary Ware


Change by Zachary Ware :


--
nosy: +ethan.furman
versions: +Python 3.7, Python 3.8, Python 3.9 -Python 2.7, Python 3.4, Python 
3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39146] too much memory consumption in re.compile unicode

2020-01-19 Thread Zachary Ware


Zachary Ware  added the comment:

As mentioned on the attached PR, Python 2.7 has reached EOL and this can no 
longer be accepted.  Thanks for the report and patch anyway!

--
nosy: +zach.ware
resolution:  -> out of date
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34145] uuid3 and uuid5 hard to use portably between Python 2 and 3

2020-01-19 Thread Zachary Ware


Zachary Ware  added the comment:

Python 2.7 has reached EOL, and so this change can no longer be made.  Thanks 
for the idea report and idea anyway, Bence!

--
nosy: +zach.ware
resolution:  -> out of date
stage: patch review -> resolved
status: open -> closed
versions:  -Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24658] open().write() and .read() fails on 2 GB+ data (OS X)

2020-01-19 Thread Zachary Ware


Change by Zachary Ware :


--
keywords:  -needs review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24658] open().write() and .read() fails on 2 GB+ data (OS X)

2020-01-19 Thread Zachary Ware


Zachary Ware  added the comment:

Since 3.x is fixed and 2.7 has reached EOL, I'm closing the issue.  Thanks for 
getting it fixed in 3.x, Stephane and Victor!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions:  -Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34834] test_ssl.test_options does not correctly account for built-in ctx defaults with openssl 1.1.1

2020-01-19 Thread Zachary Ware


Zachary Ware  added the comment:

As this issue appears to only affect 2.7 which recently reached end-of-life 
status, I'm going to go ahead and close it.

--
assignee:  -> christian.heimes
components: +SSL, Tests
nosy: +zach.ware
resolution:  -> out of date
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34780] Hang on startup if stdin refers to a pipe with an outstanding concurrent operation on Windows

2020-01-19 Thread Zachary Ware


Change by Zachary Ware :


--
versions: +Python 3.9 -Python 2.7, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39388] IDLE: Changes to keybindings aren't reverted on cancel

2020-01-19 Thread Cheryl Sabella


Change by Cheryl Sabella :


--
keywords: +patch
pull_requests: +17460
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/18068

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39388] IDLE: Changes to keybindings aren't reverted on cancel

2020-01-19 Thread Cheryl Sabella


New submission from Cheryl Sabella :

In https://bugs.python.org/issue35598#msg332634, Terry mentioned a bug when 
updating the configuration of a key, but then cancelling out of configdialog.

> Change a key binding.  Cancel. Re-open config dialog.  Try to change back.  
> It says original binding is in use -- which it is if one closes IDLE and 
> reopens, or opens a different instance.  It seems that cancel is not properly 
> undoing the temporary change.

--
assignee: terry.reedy
components: IDLE
messages: 360262
nosy: cheryl.sabella, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE: Changes to keybindings aren't reverted on cancel
type: enhancement
versions: Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39385] Add an assertNoLogs context manager to unittest TestCase

2020-01-19 Thread Kit Yan Choi


Change by Kit Yan Choi :


--
keywords: +patch
pull_requests: +17459
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/18067

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38558] Data Structures documentation out of sync with new Walrus operator

2020-01-19 Thread Adorilson Bezerra


Change by Adorilson Bezerra :


--
pull_requests: +17458
pull_request: https://github.com/python/cpython/pull/16973

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39134] can't construct dataclass as ABC (or runtime check as data protocol)

2020-01-19 Thread Guido van Rossum


Guido van Rossum  added the comment:

In the example, it should be `int`, right?

Anyway, the bug tracker is not a good place to get questions answered. Since 
this is mostly about type checking, I recommend that you try this Gitter 
instance: https://gitter.im/python/typing

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29435] Allow to pass fileobj to is_tarfile

2020-01-19 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +ethan.furman, xtreak
versions: +Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39387] configparser read_file() with variable

2020-01-19 Thread Mattia Verga


Mattia Verga  added the comment:

I started trying to reproduce this with different Python interpreters and I've 
found it now works as expected also with the original one (BTW it was CPython 
3.7.6).
I really don't know why it didn't work before. Sorry for the noise.

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39385] Add an assertNoLogs context manager to unittest TestCase

2020-01-19 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39387] configparser read_file() with variable

2020-01-19 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

I can't reproduce this on Linux machine with Python 3.7 and 3.8. Assigning the 
open file object shouldn't really make a difference unless you are passing the 
same file object that was read to initialize a different configparser object.

cat review-stats.cfg
[global]
a = b

python3.7
Python 3.7.0 (default, Jun 28 2018, 00:00:00) 
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import configparser
>>> config = configparser.ConfigParser()
>>> config.read_file(open('review-stats.cfg'))
>>> config.sections()
['global']
>>> config2 = configparser.ConfigParser()
>>> f = open('review-stats.cfg')
>>> f
<_io.TextIOWrapper name='review-stats.cfg' mode='r' encoding='UTF-8'>
>>> config2.read_file(f)
>>> config2.sections()
['global']


python
Python 3.8.0 (default, Nov  6 2019, 21:49:08) 
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import configparser
>>> config = configparser.ConfigParser()
>>> config.read_file(open('review-stats.cfg'))
>>> config.sections()
['global']
>>> config2 = configparser.ConfigParser()
>>> f = open('review-stats.cfg')
>>> f
<_io.TextIOWrapper name='review-stats.cfg' mode='r' encoding='UTF-8'>
>>> config2.read_file(f)
>>> config2.sections()
['global']
>>> config3 = configparser.ConfigParser()
>>> config3.read_file(f) # This wouldn't work since f.read() is '' and has 
>>> reached file end.
>>> config3.sections()
[]
>>>

--
nosy: +xtreak

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17005] Add a topological sort algorithm

2020-01-19 Thread Zahari Dim


Zahari Dim  added the comment:

I would like to suggest a `dependency_resolver` API that I have been using that 
goes in line with what Tim Peters proposes in 
https://bugs.python.org/issue17005#msg359702

A DAG would be an object that can be iterated in topological order with 
__iter__ (for simple sequential usage) or have a way of managing all the tasks 
that can be run in parallel. The later is done with a generator function:

```
def dependency_resolver(self):
"""Yield the set of nodes that have all dependencies satisfied (which 
could be an empty set). Send the next
completed task."""
```

which is used with something like:

```
deps = dag.dependency_resolver()
pending_tasks = deps.send(None)
if not pending_tasks:
#Graph empty
return
#Note this is a can be done in parallel/async
while True:
some_task = pending_tasks.pop()
complete_task_somehow(some_task)
try:
   more_tasks = deps.send(some_task)
except StopIteration:
   #Exit when we have sent in all the nodes in the graph
   break
else:
pending_tasks |= more_tasks

```


An implementation I have used for some time is here:


https://github.com/NNPDF/reportengine/blob/master/src/reportengine/dag.py

although I'd make simpler now. In practice I have found that the function I use 
most of the time to build the graph is:

dag.add_or_update_node(node=something_hashable, inputs={set of existing nodes}, 
outputs={set of existing nodes}).

which adds the node to the graph if it was not there and maps updates the 
dependencies to add inputs and outputs, which in my experience matches the way 
one discovers dependencies for things like packages.

--
nosy: +Zahari.Dim

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39387] configparser read_file() with variable

2020-01-19 Thread Mattia Verga


New submission from Mattia Verga :

I'm trying to assign a file object to a variable and then pass this variable to 
configparse.read_file(), but for some reason that doesn't work:

>>> import configparser
>>> config = configparser.ConfigParser()
>>> config.read_file(open('review-stats.cfg'))
>>> config.sections()
['global']
>>>
>>> config2 = configparser.ConfigParser()
>>> f = open('review-stats.cfg')
>>> f
<_io.TextIOWrapper name='review-stats.cfg' mode='r' encoding='UTF-8'>
>>> config2.read_file(f)
>>> config2.sections()
[]

Shouldn't those results be the same?

--
components: Library (Lib)
messages: 360257
nosy: Mattia Verga
priority: normal
severity: normal
status: open
title: configparser read_file() with variable
type: behavior
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39365] Support (SEEK_END/SEEK_CUR) relative seeking in StringIO

2020-01-19 Thread sanket


sanket  added the comment:

can you provide more details? Python version and code/steps to reproduce. 
That'd be more helpful as it seems the methods are already implemented in 
latest version https://docs.python.org/3/library/io.html#io.TextIOBase.seek

--
nosy: +sanketplus

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-01-19 Thread hai shi


Change by hai shi :


--
pull_requests: +17457
pull_request: https://github.com/python/cpython/pull/18066

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39385] Add an assertNoLogs context manager to unittest TestCase

2020-01-19 Thread SilentGhost


Change by SilentGhost :


--
nosy: +ezio.melotti, michael.foord, rbcollins
versions: +Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-01-19 Thread hai shi


Change by hai shi :


--
pull_requests: +17456
pull_request: https://github.com/python/cpython/pull/18065

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com