[issue36377] Python 'datastructures.html' docs page needs improvement because of ambiguity

2019-04-01 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
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



[issue36377] Python 'datastructures.html' docs page needs improvement because of ambiguity

2019-04-01 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset b00479d42aaaed589d8b374bf5e5c6f443b0b499 by Raymond Hettinger 
(Emmanuel Arias) in branch 'master':
bpo-36377: Specify that range() can not be compared (GH-12468)
https://github.com/python/cpython/commit/b00479d42aaaed589d8b374bf5e5c6f443b0b499


--

___
Python tracker 

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



[issue36364] errors in multiprocessing.shared_memory examples

2019-04-01 Thread Davin Potts


Davin Potts  added the comment:

Very much agreed, they're moving over to the main docs.

--

___
Python tracker 

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



[issue36501] Remove POSIX.1e ACLs in tests that rely on default permissions behavior

2019-04-01 Thread Ivan Pozdeev


Change by Ivan Pozdeev :


--
keywords: +patch
pull_requests: +12584
stage:  -> patch review

___
Python tracker 

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



[issue36501] Remove POSIX.1e ACLs in tests that rely on default permissions behavior

2019-04-01 Thread Ivan Pozdeev


New submission from Ivan Pozdeev :

In Linuxes with ACLs enabled, the following tests fail, as Steve Dower 
discovered in 
https://mail.python.org/pipermail/python-dev/2019-March/156929.html:

==
FAIL: test_mode (test.test_os.MakedirTests)
--
Traceback (most recent call last):
  File "/home/osboxes/Documents/cpython/Lib/test/test_os.py", line 1157, in 
test_mode
self.assertEqual(os.stat(parent).st_mode & 0o777, 0o775)
AssertionError: 493 != 509

==
FAIL: test_open_mode (test.test_pathlib.PosixPathTest)
--
Traceback (most recent call last):
  File "/home/osboxes/Documents/cpython/Lib/test/test_pathlib.py", line 2104, 
in test_open_mode
self.assertEqual(stat.S_IMODE(st.st_mode), 0o666)
AssertionError: 420 != 438

==
FAIL: test_touch_mode (test.test_pathlib.PosixPathTest)
--
Traceback (most recent call last):
  File "/home/osboxes/Documents/cpython/Lib/test/test_pathlib.py", line 2117, 
in test_touch_mode
self.assertEqual(stat.S_IMODE(st.st_mode), 0o666)
AssertionError: 420 != 438


POSIX.1e is supported by major distros even though it's officially withdrawn; 
see https://en.wikipedia.org/wiki/Access_control_list#Filesystem_ACLs .

--
components: Tests
messages: 339313
nosy: Ivan.Pozdeev
priority: normal
severity: normal
status: open
title: Remove POSIX.1e ACLs in tests that rely on default permissions behavior
type: behavior
versions: Python 2.7, 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



[issue36500] Add "regen-*" equivalent projects for Windows builds

2019-04-01 Thread anthony shaw


Change by anthony shaw :


--
nosy: +pablogsal

___
Python tracker 

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



[issue36485] Establish a uniform way to clear all caches in a given module

2019-04-01 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Quick question, would the existing sys.reload() logic suffice?

-- mymodule.py --

cache = {}  # On reload, this would clear the cache

def f(x):
if x in cache:
return cache[x]
y = x**2
cache[x] = y
return y

--

___
Python tracker 

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



[issue36485] Establish a uniform way to clear all caches in a given module

2019-04-01 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

[Brett]
> To me, the priority is clearing caches on a per-module basici
> and having a clear-all mechanism can be beneficial, not the
> other way around.

That makes more sense.

I'm changing the title to match the actual feature request and intent:

"Add a way to clear all caches" -> "Establish a uniform way to clear all caches 
in a given module"

--
title: Add a way to clear all caches -> Establish a uniform way to clear all 
caches in a given module

___
Python tracker 

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



[issue36500] Add "regen-*" equivalent projects for Windows builds

2019-04-01 Thread anthony shaw


anthony shaw  added the comment:

Project now also does:
regen-symbol (regenerate Lib/symbol.py)
and regen-keyword (regenerate Lib/keyword.py)

--

___
Python tracker 

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



[issue36500] Add "regen-*" equivalent projects for Windows builds

2019-04-01 Thread anthony shaw


Change by anthony shaw :


--
nosy: +brett.cannon, steve.dower

___
Python tracker 

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



[issue36500] Add "regen-*" equivalent projects for Windows builds

2019-04-01 Thread anthony shaw


Change by anthony shaw :


--
keywords: +patch
pull_requests: +12583
stage:  -> patch review

___
Python tracker 

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



[issue36500] Add "regen-*" equivalent projects for Windows builds

2019-04-01 Thread anthony shaw


New submission from anthony shaw :

Now that pgen is written in Python, it'd be useful for Windows users to be able 
to rebuild grammar and tokens into the parser table.

The current hook (make regen-grammar) is built into the Makefile.

Add support for VS2017+ vcxproj files to call the script directly

--
components: Build
messages: 339309
nosy: anthony shaw
priority: normal
severity: normal
status: open
title: Add "regen-*" equivalent projects for Windows builds
versions: Python 3.8

___
Python tracker 

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



[issue36210] correct AIX logic in setup.py for non-existant optional extensions

2019-04-01 Thread عشقى و حناني

Change by عشقى و حناني :


Added file: https://bugs.python.org/file48241/name of the past

___
Python tracker 

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



[issue36499] unpickling of a datetime object in 3.5 fails when pickled with 2.7

2019-04-01 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +belopolsky, p-ganssle

___
Python tracker 

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



[issue36499] unpickling of a datetime object in 3.5 fails when pickled with 2.7

2019-04-01 Thread Vadim


New submission from Vadim :

Unpickling fails when pickling is performed with 2.7 (pickledatetime.py) and 
unpickling is done with 3.5 (Tested on Ubuntu 16.04)
Please see detailed error description and workaround in the comments to the 
attached files.

--
components: Library (Lib)
files: pickle_unpickle.tar.gz
messages: 339308
nosy: vadimf
priority: normal
severity: normal
status: open
title: unpickling of a datetime object in 3.5 fails when pickled with 2.7
type: crash
versions: Python 2.7, Python 3.5
Added file: https://bugs.python.org/file48240/pickle_unpickle.tar.gz

___
Python tracker 

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



[issue36432] Running python test suite fails on macOS 10.14.4 with resource.RLIMIT_STACK error

2019-04-01 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

I confirm that reverting 335ab5b66f432ae3713840ed2403a11c368f5406 work as a 
workaround, and does not seem to create regressions.

--

___
Python tracker 

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



[issue36432] Running python test suite fails on macOS 10.14.4 with resource.RLIMIT_STACK error

2019-04-01 Thread Rémi Lapeyre

Change by Rémi Lapeyre :


--
nosy: +remi.lapeyre

___
Python tracker 

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



[issue13120] Default nosigint option to pdb.Pdb() prevents use in non-main thread

2019-04-01 Thread miss-islington


Change by miss-islington :


--
pull_requests: +12582

___
Python tracker 

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



[issue13120] Default nosigint option to pdb.Pdb() prevents use in non-main thread

2019-04-01 Thread miss-islington


miss-islington  added the comment:


New changeset 9139f926a8d8e5b71830cb7e10b0807836b5e9a4 by Miss Islington (bot) 
(Daniel Hahler) in branch 'master':
bpo-13120: fix typo with test_issue13120() method name (GH-12250)
https://github.com/python/cpython/commit/9139f926a8d8e5b71830cb7e10b0807836b5e9a4


--
nosy: +miss-islington

___
Python tracker 

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



[issue32413] Document that locals() may return globals()

2019-04-01 Thread Brett Cannon


Change by Brett Cannon :


--
nosy: +brett.cannon

___
Python tracker 

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



[issue30661] Support tarfile.PAX_FORMAT in shutil.make_archive

2019-04-01 Thread C.A.M. Gerlach


C.A.M. Gerlach  added the comment:

Thanks for the confirmation!

--

___
Python tracker 

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



[issue36493] Add math.midpoint(a,b) function

2019-04-01 Thread Stefan Behnel


Stefan Behnel  added the comment:

I buy the YAGNI argument and won't fight for this. Thanks for your input.

--
resolution:  -> rejected
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



[issue36210] correct AIX logic in setup.py for non-existant optional extensions

2019-04-01 Thread Michael Felt


Change by Michael Felt :


--
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



[issue36210] correct AIX logic in setup.py for non-existant optional extensions

2019-04-01 Thread Michael Felt


Michael Felt  added the comment:

Updating this to not only correct the failure of 3rd-party library ncurses 
(while IBM curses builds with no issue) to also stop announcing that the 
optional modules osaudiodev and spwd have not been built.

Neither are supported on AIX - so they will never be there.

--
title: ncurses versus cursus integration - platform differences and defaults -> 
correct AIX logic in setup.py for non-existant optional extensions

___
Python tracker 

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



[issue13501] Make libedit support more generic; port readline / libedit to FreeBSD

2019-04-01 Thread Robert Marshall


Robert Marshall  added the comment:

The pull request is now ready for a review.

Apologies for the delay - took me a bit longer to circle back on this than I 
would have liked.

--

___
Python tracker 

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



[issue36085] Enable better DLL resolution

2019-04-01 Thread Steve Dower


Change by Steve Dower :


--
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



[issue36485] Add a way to clear all caches

2019-04-01 Thread Brett Cannon


Brett Cannon  added the comment:

RE: "And do you think polling for a new magic attribute is the right 
approach?": my thinking behind that idea is that by standardizing the function 
name it's easy to tell if there's a cache, but you can also do away with the 
registration with a 3 lines of code. To me, the priority is clearing caches on 
a per-module basici and having a clear-all mechanism can be beneficial, not the 
other way around.

--

___
Python tracker 

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



[issue30661] Support tarfile.PAX_FORMAT in shutil.make_archive

2019-04-01 Thread Lars Gustäbel

Lars Gustäbel  added the comment:

tarfile does not use the `format` argument for reading, it will be detected. 
You can even mix different formats in one archive and tarfile will be fine with 
it.

--
nosy: +lars.gustaebel

___
Python tracker 

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



[issue36157] Document PyInterpreterState_Main().

2019-04-01 Thread Eric Snow


Eric Snow  added the comment:

Thanks for working on this, Joannah!  :)

--
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



[issue36157] Document PyInterpreterState_Main().

2019-04-01 Thread miss-islington


miss-islington  added the comment:


New changeset 35fc38e5e82d18ceec95af9af2103319497e2eaf by Miss Islington (bot) 
in branch '3.7':
bpo-36157:Document PyInterpreterState_Main() (GH-12238)
https://github.com/python/cpython/commit/35fc38e5e82d18ceec95af9af2103319497e2eaf


--

___
Python tracker 

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



[issue36157] Document PyInterpreterState_Main().

2019-04-01 Thread miss-islington


Change by miss-islington :


--
keywords: +patch
pull_requests: +12581
stage: commit review -> patch review

___
Python tracker 

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



[issue36157] Document PyInterpreterState_Main().

2019-04-01 Thread miss-islington


miss-islington  added the comment:


New changeset 8c61739defd88c7f79e86537886c33745843ce01 by Miss Islington (bot) 
(Joannah Nanjekye) in branch 'master':
bpo-36157:Document PyInterpreterState_Main() (GH-12238)
https://github.com/python/cpython/commit/8c61739defd88c7f79e86537886c33745843ce01


--
nosy: +miss-islington

___
Python tracker 

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



[issue36487] Make C-API docs clear about what the "main" interpreter is

2019-04-01 Thread Eric Snow


Change by Eric Snow :


--
nosy: +eric.snow

___
Python tracker 

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



[issue36495] Out-of-bounds array reads in Python/ast.c

2019-04-01 Thread Guido van Rossum


Guido van Rossum  added the comment:


New changeset a4d78362397fc3bced6ea80fbc7b5f4827aec55e by Guido van Rossum 
(Brad Larsen) in branch 'master':
bpo-36495: Fix two out-of-bounds array reads (GH-12641)
https://github.com/python/cpython/commit/a4d78362397fc3bced6ea80fbc7b5f4827aec55e


--

___
Python tracker 

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



[issue36498] combining dict comprehensing and lists lead to IndexError

2019-04-01 Thread SilentGhost


SilentGhost  added the comment:

IndexError is caused by the fact that split results in an empty list.

--
nosy: +SilentGhost
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type: compile error -> behavior

___
Python tracker 

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



[issue36498] combining dict comprehensing and lists lead to IndexError

2019-04-01 Thread Benjamin Krala


Benjamin Krala  added the comment:

Correction of typo in the last sentence:

To avoid the bug you can change the 1 into -1

--

___
Python tracker 

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



[issue36498] combining dict comprehensing and lists lead to IndexError

2019-04-01 Thread Benjamin Krala


New submission from Benjamin Krala :

Following code snipped leads to an IndexError in the last line.
It basically puts EN_cmw into a dict where is a split on '->'.
It avoid the bug you can change the 1 into -1.
(By definition it shouldnt make a difference)


EN_cmw = '''abandonned->abandoned
 aberation->aberration
 abilityes->abilities
 abilties->abilities
 abilty->ability
 abondon->abandon
 abbout->about
 '''
EN_cmw = EN_cmw.split('\n')
EN_cmw = [string.strip() for string in EN_cmw]


{
line.split('->')[0]: line.split('->')[1] for line in EN_cmw
}

--
components: Interpreter Core
messages: 339293
nosy: Benjamin Krala
priority: normal
severity: normal
status: open
title: combining dict comprehensing and lists lead to IndexError
type: compile error
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



[issue36488] os.sendfile() on BSD and macOS does not return bytes sent on EINTR

2019-04-01 Thread Josh Rosenberg


Josh Rosenberg  added the comment:

Wasn't the point of PEP475 that all EINTR returns would be explicitly handled 
by retrying rather than forcing the user to handle it? Seems like the correct 
solution is still to retry, but on OSX/FreeBSD we'd need to update the offset 
and count arguments to account for the data that has already been sent.

--
nosy: +josh.r

___
Python tracker 

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



[issue36497] Undocumented behavior in csv.Sniffer (preferred delimiters)

2019-04-01 Thread SilentGhost


Change by SilentGhost :


--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python
stage:  -> needs patch
versions: +Python 3.8

___
Python tracker 

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



[issue36497] Undocumented behavior in csv.Sniffer (preferred delimiters)

2019-04-01 Thread Thomas Buhrmann


New submission from Thomas Buhrmann :

When the Sniffer detects more than one possible delimiter, as e.g. in the 
following file

"a;b;c;d,e;f;g;h"

the result will always be the ',' delimiter, independent of how "dominant" 
another delimiter is. This is because the codepath analyzing dominance will 
only get executed if the undocumented Sniffer member Sniffer.preferred is 
overwritten by the user after initialization.

While not strictly a bug, the behavior should probably be documented, and the 
'preferred' member could be exposed as an argument in __init__() perhaps?

--
components: Library (Lib)
messages: 339291
nosy: thomas
priority: normal
severity: normal
status: open
title: Undocumented behavior in csv.Sniffer (preferred delimiters)
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



[issue20844] SyntaxError: encoding problem: iso-8859-1 on Windows

2019-04-01 Thread Inada Naoki


Change by Inada Naoki :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.7, Python 3.8 -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



[issue20844] SyntaxError: encoding problem: iso-8859-1 on Windows

2019-04-01 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset 8384670615a90418fc52c3881242b7c10d1f2b13 by Inada Naoki in branch 
'3.7':
bpo-20844: open script file with "rb" mode (GH-12616)
https://github.com/python/cpython/commit/8384670615a90418fc52c3881242b7c10d1f2b13


--

___
Python tracker 

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



[issue30587] Mock with spec object does not ensure method call signatures

2019-04-01 Thread Michael Foord

Michael Foord  added the comment:

Spec objects are currently dumb. It would be a new feature to add signature 
validation to them. 

I think it would be a useful feature though as currently autospec sort of 
obsoletes spec objects whilst being more heavyweight and harder to use. 

I think it would appropriate to add to 3.8 but not to 3.7. 

Compatibility with existing tests is the issue. The obvious answer is a flag to 
turn it on/off but that adds complexity to the API. 

My gut feeling is that spec objects are far more commonly used in situations 
where validation would be useful than a detriment. 

> On 31 Mar 2019, at 18:07, Karthikeyan Singaravelan  
> wrote:
> 
> 
> Karthikeyan Singaravelan  added the comment:
> 
> I am slightly concerned if spec should gain more responsibility than just 
> validating attribute access which is mentioned in the docs. With the linked 
> PR spec below would also validate the signature which is not done in Python 
> 3.7 so this might break code for someone who only wants to validate access 
> attribute access and not signature of the methods. It seems the PR also adds 
> autospec argument to Mock that is currently not supported though spec and 
> spec_set are supported.
> 
> from unittest import mock
> 
> def foo(lish):
>pass
> 
> mock_foo = mock.Mock(spec=foo)
> mock_foo(1, 2)
> 
> try:
>mock_foo.non_existent
> except AttributeError:
>print("raises AttributeError for non-existent attribute")
> 
> # 3.7
> 
> ➜  cpython git:(pr_1982) python3.7 /tmp/foo.py
> raises AttributeError for non-existent attribute
> 
> # With PR
> 
> ➜  cpython git:(pr_1982) ./python.exe /tmp/foo.py
> Traceback (most recent call last):
>  File "/tmp/foo.py", line 7, in 
>mock_foo(1, 2)
>  File 
> "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/unittest/mock.py", 
> line 1009, in __call__
>_mock_self._mock_check_sig(*args, **kwargs)
>  File 
> "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/unittest/mock.py", 
> line 103, in checksig
>sig.bind(*args, **kwargs)
>  File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/inspect.py", 
> line 3016, in bind
>return args[0]._bind(args[1:], kwargs)
>  File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/inspect.py", 
> line 2937, in _bind
>raise TypeError('too many positional arguments') from None
> TypeError: too many positional arguments
> 
> --
> 
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue31904] Python should support VxWorks RTOS

2019-04-01 Thread LihuaZhao


Change by LihuaZhao :


--
pull_requests: +12580

___
Python tracker 

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



[issue20844] SyntaxError: encoding problem: iso-8859-1 on Windows

2019-04-01 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +12579

___
Python tracker 

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



[issue20844] SyntaxError: encoding problem: iso-8859-1 on Windows

2019-04-01 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset 10654c19b5e6efdf3c529ff9bf7bcab89bdca1c1 by Inada Naoki in branch 
'master':
bpo-20844: open script file with "rb" mode (GH-12616)
https://github.com/python/cpython/commit/10654c19b5e6efdf3c529ff9bf7bcab89bdca1c1


--
nosy: +inada.naoki

___
Python tracker 

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



[issue27992] Clarify %(prog)s in argparse help formatter returns basename of sys.argv[0] by default

2019-04-01 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Thanks for the report. To be little more clear it returns the "basename of 
sys.argv[0]" at [0] than the attached patch that says "uses part of 
``sys.argv[0]``" .

[0] 
https://github.com/python/cpython/blob/62f9588663ebfea1735e9d142ef527395a6c2b95/Lib/argparse.py#L1638

--
nosy: +paul.j3, xtreak
title: In the argparse there is a misleading words about %(prog)s value -> 
Clarify %(prog)s in argparse help formatter returns basename of sys.argv[0] by 
default
versions: +Python 3.7, Python 3.8 -Python 3.6

___
Python tracker 

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



[issue36026] Different error message when sys.settrace is used

2019-04-01 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



[issue36026] Different error message when sys.settrace is used

2019-04-01 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset 62f9588663ebfea1735e9d142ef527395a6c2b95 by Inada Naoki in branch 
'master':
bpo-36026: make descr error message consistent (GH-11930)
https://github.com/python/cpython/commit/62f9588663ebfea1735e9d142ef527395a6c2b95


--

___
Python tracker 

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



[issue31904] Python should support VxWorks RTOS

2019-04-01 Thread LihuaZhao


Change by LihuaZhao :


--
pull_requests: +12578

___
Python tracker 

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



[issue36493] Add math.midpoint(a,b) function

2019-04-01 Thread Tim Peters


Tim Peters  added the comment:

I'm inclined to agree with Mark - the wholly naive algorithm is already 
"perfect" away from extreme (whether large or small) magnitudes, and can't be 
beat for speed either.  This kind of thing gets much more attractive in IEEE 
single precision, where getting near the extremes can be common in some apps.

That said, at a higher level there's no end to FP functions that _could_ be 
implemented to be more accurate in some (even many) cases.  That it's possible 
isn't enough, on its own, to justify all the eternal costs of supplying it.  
Significant real life use cases make for far more compelling justification.

For new FP stuff, the first thing I ask is "does numpy/scipy/mpmath supply 
it?".  I don't know in this case, but if the answer is "no", then it's a pretty 
safe bet that number-crunching Python users have insignificant real use for it. 
 If the answer is "yes", then the question changes to whether Pythoneers other 
than those _already_ using the major number-crunching Python packages have 
significant real uses for it.

On that basis, e.g., accepting the whole `statistics` module was an easy call 
(many real uses outside of just specialists), but adding a function to do LU 
decomposition of a matrix is an easy reject (exceedingly useful, in fact, but 
those who need it almost certainly already use the Python packages that already 
supply it).

--

___
Python tracker 

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



[issue36492] Deprecate passing some conflicting arguments by keyword

2019-04-01 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Fixes (but not deprecations) were backported to 3.7.

--
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



[issue36492] Deprecate passing some conflicting arguments by keyword

2019-04-01 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset a37f356de19828241bf19129f804369794c72ed3 by Serhiy Storchaka in 
branch '3.7':
[3.7] bpo-36492: Fix passing special keyword arguments to some functions. 
(GH-12637) (GH-12645)
https://github.com/python/cpython/commit/a37f356de19828241bf19129f804369794c72ed3


--

___
Python tracker 

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



[issue36492] Deprecate passing some conflicting arguments by keyword

2019-04-01 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +12577

___
Python tracker 

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



[issue36493] Add math.midpoint(a,b) function

2019-04-01 Thread Mark Dickinson


Change by Mark Dickinson :


--
nosy: +tim.peters

___
Python tracker 

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



[issue36493] Add math.midpoint(a,b) function

2019-04-01 Thread Mark Dickinson


Mark Dickinson  added the comment:

Special cases aside, I think this is a YAGNI. The "obvious" formulas `(a + 
b)/2)` and `0.5 * (a + b)` _do_ do exactly the right thing (including giving a 
perfectly correctly-rounded answer with round-ties-to-even on a typical IEEE 
754-using machine) provided that subnormals and values very close to the upper 
limit are avoided. If you're doing floating-point arithmetic with values of 
size > 1e300, you've probably already got significant issues.

I could see specialist uses for this, e.g., in a general purpose bisection 
algorithm, but I'm not convinced it's worth adding something to the math 
library just for that.

--

___
Python tracker 

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



[issue36493] Add math.midpoint(a,b) function

2019-04-01 Thread Mark Dickinson


Mark Dickinson  added the comment:

Yes, I'd definitely expect `midpoint(inf, -inf)` to be `nan`.

--

___
Python tracker 

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



[issue36492] Deprecate passing some conflicting arguments by keyword

2019-04-01 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 42a139ed88c487f325a241c6ee8b308b3c045975 by Serhiy Storchaka in 
branch 'master':
bpo-36492: Deprecate passing some arguments as keyword arguments. (GH-12637)
https://github.com/python/cpython/commit/42a139ed88c487f325a241c6ee8b308b3c045975


--

___
Python tracker 

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