[issue13849] Add tests for NUL checking in certain strs

2016-07-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9e997c8f4876 by Berker Peksag in branch '3.5':
Issue #13849: Fix test_null_bytes under Windows
https://hg.python.org/cpython/rev/9e997c8f4876

New changeset a28abe83cf5c by Berker Peksag in branch 'default':
Issue #13849: Merge from 3.5
https://hg.python.org/cpython/rev/a28abe83cf5c

--

___
Python tracker 

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



[issue27539] negative Fraction ** negative int not normalized

2016-07-22 Thread Vedran Čačić

Vedran Čačić added the comment:

The .diff format of patch for fractions.py is at 
http://bugs.python.org/file43786/TwCVpiFp.diff

The line numbers in it are the newest I could get (from 
https://hg.python.org/cpython/file/default/Lib/fractions.py).

I would also add the test I was talking about (Fraction(-1, 2) ** -1), if I 
knew where to do it.

--

___
Python tracker 

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



[issue13849] Add tests for NUL checking in certain strs

2016-07-22 Thread Martin Panter

Martin Panter added the comment:

http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.5/builds/1072/steps/test/logs/stdio
==
FAIL: test_null_bytes (test.test_genericpath.TestGenericTest) (attr='getsize')
--
Traceback (most recent call last):
  File 
"C:\buildbot.python.org\3.5.kloth-win64\build\lib\test\test_genericpath.py", 
line 285, in test_null_bytes
self.assertEqual(str(cm.exception), 'embedded null byte')
AssertionError: 'stat: embedded null character' != 'embedded null byte'
- stat: embedded null character
+ embedded null byte

--
nosy: +martin.panter
status: closed -> open

___
Python tracker 

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



[issue1621] Do not assume signed integer overflow behavior

2016-07-22 Thread Martin Panter

Changes by Martin Panter :


Added file: http://bugs.python.org/file43839/array-size.patch

___
Python tracker 

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



[issue1621] Do not assume signed integer overflow behavior

2016-07-22 Thread Martin Panter

Martin Panter added the comment:

Perhaps we should add a test for the __length_hint__() overflow to 
tuple_and_list.patch:

>>> a = [1,2,3,4]
>>> import sys
>>> class B:
...  def __iter__(s): return s
...  def __next__(s): raise StopIteration()
...  def __length_hint__(s): return sys.maxsize
... 
>>> a.extend(B())
Objects/listobject.c:844:8: runtime error: signed integer overflow: 4 + 
2147483647 cannot be represented in type 'int'

array-size.patch fixes the ctypes array size overflow (including a test).

--

___
Python tracker 

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



[issue1621] Do not assume signed integer overflow behavior

2016-07-22 Thread Martin Panter

Martin Panter added the comment:

Apart from the empty “if” statement style (see review), tuple_and_list.patch 
looks good to me.

I understand the patches from 2011 and earlier have all been committed (correct 
me if I missed something).

Here is another patch fixing a 64-bit overflow in _thread, detected by the 
test_timeout() method in test_threading:
Modules/_threadmodule.c:59:17: runtime error: signed integer overflow: 
6236628528058 + 92233720360 cannot be represented in type 'long int'

--
Added file: http://bugs.python.org/file43838/thread.patch

___
Python tracker 

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



[issue13849] Add tests for NUL checking in certain strs

2016-07-22 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for your review, Victor. I don't care about 2.7 at this point so I went 
with 3.5+ :)

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



[issue13849] Add tests for NUL checking in certain strs

2016-07-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 899f06eb390c by Berker Peksag in branch '3.5':
Issue #13849: Add tests for null byte checking in test_genericpath
https://hg.python.org/cpython/rev/899f06eb390c

New changeset 9498736fbd8f by Berker Peksag in branch 'default':
Issue #13849: Merge from 3.5
https://hg.python.org/cpython/rev/9498736fbd8f

--
nosy: +python-dev

___
Python tracker 

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



[issue27130] zlib: OverflowError while trying to compress 2^32 bytes or more

2016-07-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2192edcfea02 by Martin Panter in branch '2.7':
Issue #27130: Fix handling of buffers exceeding (U)INT_MAX in “zlib” module
https://hg.python.org/cpython/rev/2192edcfea02

--

___
Python tracker 

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



[issue27591] multiprocessing: Possible uninitialized pointer use in Windows builds

2016-07-22 Thread Berker Peksag

Berker Peksag added the comment:

Thanks! I should read PEP 7 again :)

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



[issue27493] logging module fails with unclear error when supplied a (Posix)Path

2016-07-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5424252ce174 by Berker Peksag in branch 'default':
Issue #27493: Fix test_path_objects under Windows
https://hg.python.org/cpython/rev/5424252ce174

--

___
Python tracker 

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



[issue27591] multiprocessing: Possible uninitialized pointer use in Windows builds

2016-07-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset da955567d7c7 by Berker Peksag in branch '3.5':
Issue #27591: Set sigint_event to NULL if _PyOS_IsMainThread() returns false
https://hg.python.org/cpython/rev/da955567d7c7

New changeset d5f796da4013 by Berker Peksag in branch 'default':
Issue #27591: Merge from 3.5
https://hg.python.org/cpython/rev/d5f796da4013

--
nosy: +python-dev

___
Python tracker 

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



[issue27130] zlib: OverflowError while trying to compress 2^32 bytes or more

2016-07-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bd61bcd9bee8 by Martin Panter in branch '3.5':
Issue #27130: Fix handling of buffers exceeding UINT_MAX in “zlib” module
https://hg.python.org/cpython/rev/bd61bcd9bee8

New changeset bd556f748cf8 by Martin Panter in branch 'default':
Issue #27130: Merge zlib 64-bit fixes from 3.5
https://hg.python.org/cpython/rev/bd556f748cf8

--
nosy: +python-dev

___
Python tracker 

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



[issue27577] Make implementation and doc of tuple and list more compliant

2016-07-22 Thread Raymond Hettinger

Raymond Hettinger added the comment:

This should have been changed in Python 3.0 which is when were allowed to make 
non-backwards compatible changes.  Since it wasn't, we have to live this mild 
annoyance forever (you can't change it without breaking somebody's working code 
somewhere).

I'm open to a small documentation patch that indicates that the actual keyword 
is "sequence" but the main entry of list(iterable) should remain because it is 
more descriptive of the kind of argument that is allowed.

--
assignee:  -> rhettinger
nosy: +rhettinger

___
Python tracker 

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



[issue24773] Implement PEP 495 (Local Time Disambiguation)

2016-07-22 Thread Martin Panter

Martin Panter added the comment:

This upset the buildbots:

http://buildbot.python.org/all/builders/PPC64%20Fedora%203.x/builds/1259/steps/test/logs/stdio
==
FAIL: test_all (test.datetimetester.ZoneInfoCompleteTest)
--
Traceback (most recent call last):
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/test/datetimetester.py",
 line 4784, in test_all
self.assertTrue(result.wasSuccessful(), name + ' ' + suffix)
AssertionError: False is not true : Africa/El_Aaiun system_transitions

--
nosy: +martin.panter
status: closed -> open

___
Python tracker 

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



[issue27493] logging module fails with unclear error when supplied a (Posix)Path

2016-07-22 Thread Martin Panter

Martin Panter added the comment:

Windows fails the test:

http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/7989/steps/test/logs/stdio
==
ERROR: test_path_objects (test.test_logging.HandlerTest)
--
Traceback (most recent call last):
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_logging.py", 
line 599, in test_path_objects
os.unlink(fn)
PermissionError: [WinError 32] The process cannot access the file because it is 
being used by another process: 
'C:\\Users\\Buildbot\\AppData\\Local\\Temp\\tmplffg6d26'

--
nosy: +martin.panter
status: closed -> open

___
Python tracker 

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



[issue27587] Issues, reported by PVS-Studio static analyzer

2016-07-22 Thread Martin Panter

Martin Panter added the comment:

Also on python-dev, Chris Angelico pointed out that the _elementtree.c case is 
a false positive. So that would leave the binascii one, which I think is worth 
simpifying, but is probably not very serious.

--

___
Python tracker 

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



[issue27591] multiprocessing: Possible uninitialized pointer use in Windows builds

2016-07-22 Thread STINNER Victor

STINNER Victor added the comment:

issue27591_v2.diff LGTM except of a minor comment (PEP 7!) on the review.

--

___
Python tracker 

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



[issue27591] multiprocessing: Possible uninitialized pointer use in Windows builds

2016-07-22 Thread Berker Peksag

Berker Peksag added the comment:

Here is an updated patch. Thanks, Victor.

--
Added file: http://bugs.python.org/file43837/issue27591_v2.diff

___
Python tracker 

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



[issue27579] Add a tutorial for AsyncIO in the documentation

2016-07-22 Thread STINNER Victor

STINNER Victor added the comment:

The tutorial is happening but outside Python:
https://github.com/asyncio-doc/asyncio-doc

I suggest to now close this issue.

--

___
Python tracker 

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



[issue27587] Issues, reported by PVS-Studio static analyzer

2016-07-22 Thread Martin Panter

Martin Panter added the comment:

Christian Heimes posted a patch for _PyState_AddModule() on Python-dev: 
https://marc.info/?l=python-dev=146922730716425=2

--

___
Python tracker 

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



[issue24773] Implement PEP 495 (Local Time Disambiguation)

2016-07-22 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed
superseder:  -> Document PEP 495 (Local Time Disambiguation) features

___
Python tracker 

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



[issue27595] Document PEP 495 (Local Time Disambiguation) features

2016-07-22 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
dependencies: +Implement PEP 495 (Local Time Disambiguation)

___
Python tracker 

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



[issue27595] Document PEP 495 (Local Time Disambiguation) features

2016-07-22 Thread Alexander Belopolsky

New submission from Alexander Belopolsky:

PEP 495 has been implemented in issue 24773.  This issue is created to track 
the necessary changes to the datetime module documentation.

--
assignee: belopolsky
components: Documentation
messages: 271041
nosy: akira, belopolsky, haypo, stub, tim.peters
priority: normal
severity: normal
stage: needs patch
status: open
title: Document PEP 495 (Local Time Disambiguation) features
type: enhancement
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



[issue24773] Implement PEP 495 (Local Time Disambiguation)

2016-07-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7c0917670ab8 by Alexander Belopolsky in branch 'default':
Closes issue #24773: Implement PEP 495 (Local Time Disambiguation).
https://hg.python.org/cpython/rev/7c0917670ab8

--
nosy: +python-dev

___
Python tracker 

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



[issue24773] Implement PEP 495 (Local Time Disambiguation)

2016-07-22 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

I am posting the final version of the patch complete with the NEWS entry.  
Compared with the previous patch, issue24773-final.diff contains a fix for a 
reference leak.

I would like to use this opportunity to thank Zachary Ware for providing a 
Windows VM with a complete Python development setup, as well as everyone who 
participated in PEP 495 discussions and code reviews.

--
Added file: http://bugs.python.org/file43836/issue24773-final.diff

___
Python tracker 

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



[issue27594] Assertion failure when running "test_ast" tests with coverage.

2016-07-22 Thread ap

New submission from ap:

This is with a build of the default branch on OS X 10.11.6:

$ hg identify
fada654c5f72 tip
$ ./python.exe --version
Python 3.6.0a3+
$

The "test_ast" tests appear to run fine without coverage tracking enabled:

$ ./python.exe -m test test_ast
Run tests sequentially
0:00:00 [1/1] test_ast
1 test OK.
Total duration: 0:00:07
$

But when coverage tracking is enabled, an assertion fails:

$ ./python.exe -m test --coverage -D`pwd`/coverage_data test_ast
Run tests sequentially
0:00:00 [1/1] test_ast
Assertion failed: (line > 0), function _PyCode_CheckLineNumber, file 
Objects/codeobject.c, line 717.
Fatal Python error: Aborted

Current thread 0x7fff76279000 (most recent call first):
  File "test", line 0 in 
  File "/python-dev/cpython/Lib/test/test_ast.py", line 559 in 
test_level_as_none
  File "/python-dev/cpython/Lib/unittest/case.py", line 600 in run
  File "/python-dev/cpython/Lib/unittest/case.py", line 648 in __call__
  File "/python-dev/cpython/Lib/unittest/suite.py", line 122 in run
  File "/python-dev/cpython/Lib/unittest/suite.py", line 84 in __call__
  File "/python-dev/cpython/Lib/unittest/suite.py", line 122 in run
  File "/python-dev/cpython/Lib/unittest/suite.py", line 84 in __call__
  File "/python-dev/cpython/Lib/unittest/suite.py", line 122 in run
  File "/python-dev/cpython/Lib/unittest/suite.py", line 84 in __call__
  File "/python-dev/cpython/Lib/test/support/__init__.py", line 1709 in run
  File "/python-dev/cpython/Lib/test/support/__init__.py", line 1810 in 
_run_suite
  File "/python-dev/cpython/Lib/test/support/__init__.py", line 1844 in 
run_unittest
  File "/python-dev/cpython/Lib/test/libregrtest/runtest.py", line 179 in 
test_runner
  File "/python-dev/cpython/Lib/test/libregrtest/runtest.py", line 180 in 
runtest_inner
  File "/python-dev/cpython/Lib/test/libregrtest/runtest.py", line 144 in 
runtest
  File "", line 1 in 
  File "/python-dev/cpython/Lib/trace.py", line 469 in runctx
  File "/python-dev/cpython/Lib/test/libregrtest/main.py", line 330 in 
run_tests_sequential
  File "/python-dev/cpython/Lib/test/libregrtest/main.py", line 406 in run_tests
  File "/python-dev/cpython/Lib/test/libregrtest/main.py", line 466 in _main
  File "/python-dev/cpython/Lib/test/libregrtest/main.py", line 446 in main
  File "/python-dev/cpython/Lib/test/libregrtest/main.py", line 508 in main
  File "/python-dev/cpython/Lib/test/__main__.py", line 2 in 
  File "/python-dev/cpython/Lib/runpy.py", line 85 in _run_code
  File "/python-dev/cpython/Lib/runpy.py", line 184 in _run_module_as_main
Abort trap: 6
$

--
components: Tests
messages: 271038
nosy: ap
priority: normal
severity: normal
status: open
title: Assertion failure when running "test_ast" tests with coverage.
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



[issue27593] Deprecate sys._mercurial and create sys._git

2016-07-22 Thread Brett Cannon

New submission from Brett Cannon:

This is part of the GitHub migration. And by "deprecate" sys._mercurial I mean 
fill it with default values 
(https://www.python.org/dev/peps/pep-0512/#deprecate-sys-mercurial).

--
components: Library (Lib)
messages: 271037
nosy: brett.cannon
priority: normal
severity: normal
status: open
title: Deprecate sys._mercurial and create sys._git

___
Python tracker 

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



[issue27592] FIPS_mode() and FIPS_mode_set() functions in Python (ssl)

2016-07-22 Thread Cristi Fati

Cristi Fati added the comment:

Thank you all for chiming in (so quickly). I did this in 2013 (maybe back then 
the situation was different), and have successfully used it since.

Regarding comments:
 - Alex:
   1: I'm not an expert, so I'm not going to argue with it. However I thought 
that if it's enforced by the government (and NIST) it would make sense. 
Nowadays I get this feeling that when it comes to security, people tend to lose 
their technical common sense and implement stuff without questioning.
   2: I've just read Steve Marquess's post (and a couple of others linked from 
it) and I'm a little bit surprised since the FIPS funcs have been added to 
OpenSSL stating with version 1.0.* and they're about to be removed. Anyway, 
there are IT mammoths that have deals with the government (big bucks deals - 
involving FIPS) and use OpenSSL as a cryptography and secure socket provider 
(personally I consider those corporations that make use of open source software 
in order to get millions and give nothing back, parasites). I think when 
OpenSSL will publicly announce the FIPS drop, they'll will have nothing to do 
but chip in, as it will be extremely difficult to switch to other providers (if 
any - I've seen Bladelogic name mentioned,I'm not sure it will cover, also for 
Java apps there was RSA or EMC, which is also going out of support).
   3: This is a good point, since there's no other alternative (that I know 
of), that uses/doesn't use FIPS.

 - David: bug9216 - the patch from RedHat (`usedforsecurity` parameter for md5 
hash), I'm using it for 3 years; I didn't encounter the 2nd one. But both apply 
to hashlib. Reagrding ssl, changing FIPS mode would make a difference, e.g. 
when creating secure connections with certificates with (now considered weak 
anyway) md5 hash algorithms.

Thanks everyone for reviewing.

--

___
Python tracker 

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



[issue27579] Add a tutorial for AsyncIO in the documentation

2016-07-22 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
nosy: +terry.reedy

___
Python tracker 

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



[issue27577] Make implementation and doc of tuple and list more compliant

2016-07-22 Thread Terry J. Reedy

Terry J. Reedy added the comment:

>>> help(tuple)
Help on class tuple in module builtins:

class tuple(object)
 |  tuple() -> empty tuple
 |  tuple(iterable) -> tuple initialized from iterable's items
...
>>> tuple(sequence=[1,2,3])
(1, 2, 3)

I am surprised.  Searches with Google, Githup, Nullage turned up no example of 
such usage.  'tuple(sequence)' has, rather naturally, been used.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue27271] asyncio lost udp packets

2016-07-22 Thread Марк Коренберг

Марк Коренберг added the comment:

@yselivanov

Can you prove that packets may be lost even in UNIX sockets ?

(it is not related to this task directly)

--
nosy: +mmarkk

___
Python tracker 

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



[issue27590] tarfile module next() method hides exceptions

2016-07-22 Thread Yujie Chen

Yujie Chen added the comment:

Yeah, I just tried on Python3.5 and it didn't report any errors either.

--

___
Python tracker 

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



[issue27547] Crash or freeze trying to execute b'a' * 0xFFFFFFFFFFFFFFF

2016-07-22 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Crash reports should include the minimum code needed to produce the crash.  
Adding function calls that never happen because the arguments cannot be 
computed adds noise that obscures the problem.  Here, b"a"*0xFFF 
would require more memory that any current computer has.  Float and array are 
irrelevant.  On Windows, it freezes python.  A MemoryError would be nicer, but 
this may be "won't fix".

--
nosy: +terry.reedy
title: Integer Overflow Crash On float(array.array()) -> Crash or freeze trying 
to execute b'a' * 0xFFF

___
Python tracker 

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



[issue27366] PEP487: Simpler customization of class creation

2016-07-22 Thread Martin Teichmann

Changes by Martin Teichmann :


Added file: http://bugs.python.org/file43835/pep487.patch

___
Python tracker 

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



[issue27366] PEP487: Simpler customization of class creation

2016-07-22 Thread Martin Teichmann

Changes by Martin Teichmann :


Removed file: http://bugs.python.org/file43834/pep487.patch

___
Python tracker 

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



[issue27544] Document the ABCs for instance/subclass checks of dict view types

2016-07-22 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The view objects *are* built-ins, but are not exposed in the __builtins__ 
module.  This is true of many internal types, perhaps even a majority. The 
function and list_iterator classes are other examples.

>>> type(lambda: 0)

>>> type(iter([]))


A few such 'hidden' classes are exposed in the types module.

"This module provides names for many of the types that are required to 
implement a Python interpreter. It deliberately avoids including some of the 
types that arise only incidentally during processing such as the listiterator 
type.

Typical use of these names is for isinstance() or issubclass() checks."

The function class is.

"types.FunctionType
types.LambdaType

The type of user-defined functions and functions created by lambda 
expressions."
  
The list_iterator class is not. Perhaps the rationale is that there is no 
reason to know whether an iterator is iterating over a list, tuple, range, set, 
frozenset, dict, or anything else.  They are all used the same.  On the other 
hand, Different view types are used a bit differently.

Types includes a generic MappingProxyType.  Perhaps you should propose adding 
the specific dict view types.  Or you can create them yourself.
  KeysViewType = type({}.keys())
  ValuesViewType = type({}.values())
  ItemsViewType = type({}.items())
This is the code that would be used in the module if they were added there.

--
nosy: +terry.reedy
versions:  -Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

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



[issue27586] Is this a regular expression library bug?

2016-07-22 Thread Bruce Eckel

Bruce Eckel added the comment:

Thank you ebarry, very helpful. Tim, sorry I missed you at Pycon.

--

___
Python tracker 

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



[issue27366] PEP487: Simpler customization of class creation

2016-07-22 Thread Berker Peksag

Changes by Berker Peksag :


--
components: +Interpreter Core -Library (Lib)
nosy: +berker.peksag
stage:  -> patch review

___
Python tracker 

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



[issue27561] Warn against subclassing builtins, and overriding their methods

2016-07-22 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Will do.

--

___
Python tracker 

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



[issue27592] FIPS_mode() and FIPS_mode_set() functions in Python (ssl)

2016-07-22 Thread R. David Murray

R. David Murray added the comment:

Heh, I should have said "an" expert.  With two weighing in I think I'll close 
this.

Thanks for the contribution, though.  Sorry we aren't going to make use of it.

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



[issue27592] FIPS_mode() and FIPS_mode_set() functions in Python (ssl)

2016-07-22 Thread Christian Heimes

Christian Heimes added the comment:

I second Alex's statement, too.

Am 22. Juli 2016 21:48:20 MESZ, schrieb "R. David Murray" 
:
>
>R. David Murray added the comment:
>
>See also issue 9216 and issue 9146.  Even if we wanted to do it it
>sounds like it isn't quite as easy as allowing the mode to be set.
>
>I'm inclined to agree with Alex, since he's the expert.  Especially
>since it *is* possible to set it from outside the process.
>
>--
>nosy: +r.david.murray
>
>___
>Python tracker 
>
>___

--

___
Python tracker 

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



[issue27366] PEP487: Simpler customization of class creation

2016-07-22 Thread Martin Teichmann

Changes by Martin Teichmann :


Added file: http://bugs.python.org/file43834/pep487.patch

___
Python tracker 

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



[issue27366] PEP487: Simpler customization of class creation

2016-07-22 Thread Martin Teichmann

Changes by Martin Teichmann :


Removed file: http://bugs.python.org/file43611/pep487a.patch

___
Python tracker 

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



[issue14218] include rendered output in addition to markup

2016-07-22 Thread Brett Cannon

Brett Cannon added the comment:

Moved to https://github.com/python/devguide/issues/14

--
nosy: +brett.cannon
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue18041] mention issues with code churn in the devguide

2016-07-22 Thread Brett Cannon

Changes by Brett Cannon :


--
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue23320] devguide should mention rules about "paragraph reflow" in the documentation

2016-07-22 Thread Brett Cannon

Brett Cannon added the comment:

Moved to https://github.com/python/devguide/issues/12

--
nosy: +brett.cannon
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue27539] negative Fraction ** negative int not normalized

2016-07-22 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Vedran: The migration to git and GitHub is in progress.  The devguide is being 
moved today.  CPython itself should be done by the end of the year, but after 
3.6.0 is released in Sept.

I am on Windows and yes, setting up on Windows can be a nuisance.  Learning VS 
is not needed, as one can just run PCBuild/build.bat to compile.  But 
installing 9 GB of even the free version, to use the compiler, is.  TortoiseHG 
makes minimal use of hg pretty easy.  I had never used any source control 
system before.  But this will be unnecessary soon.

I let Mark decide if he can use the diff as is.  Are the line numbers those of 
fractions.py, or do they need to be translated?

--
nosy: +terry.reedy

___
Python tracker 

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



[issue16931] mention work-around to create diffs in default/non-git mode

2016-07-22 Thread Brett Cannon

Brett Cannon added the comment:

With the pending migration to git, this probably isn't worth the effort.

--
nosy: +brett.cannon
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue16930] mention limitations and/or alternatives to hg graft

2016-07-22 Thread Brett Cannon

Brett Cannon added the comment:

With the migration to git pending, this won't be worth the effort.

--
nosy: +brett.cannon
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue17227] devguide: buggy heading numbers

2016-07-22 Thread Brett Cannon

Brett Cannon added the comment:

Moved to https://github.com/python/devguide/issues/11

--
nosy: +brett.cannon
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue10965] dev task of documenting undocumented APIs

2016-07-22 Thread Brett Cannon

Brett Cannon added the comment:

Moved to https://github.com/python/devguide/issues/10

--
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue24689] Add tips for effective online communication to devguide

2016-07-22 Thread Brett Cannon

Brett Cannon added the comment:

Moved to https://github.com/python/devguide/issues/9

--
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue20851] Update devguide to cover testing from a tarball

2016-07-22 Thread Brett Cannon

Brett Cannon added the comment:

I don't think this is worth doing.

--
resolution:  -> rejected
status: open -> closed

___
Python tracker 

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



[issue24682] Add Quick Start: Communications section to devguide

2016-07-22 Thread Brett Cannon

Brett Cannon added the comment:

Moved to https://github.com/python/devguide/issues/8

--
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue27592] FIPS_mode() and FIPS_mode_set() functions in Python (ssl)

2016-07-22 Thread R. David Murray

R. David Murray added the comment:

See also issue 9216 and issue 9146.  Even if we wanted to do it it sounds like 
it isn't quite as easy as allowing the mode to be set.

I'm inclined to agree with Alex, since he's the expert.  Especially since it 
*is* possible to set it from outside the process.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue24016] Add a Sprints organization/preparation section to devguide

2016-07-22 Thread Brett Cannon

Brett Cannon added the comment:

Moved to https://github.com/python/devguide/issues/7

--
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue23951] Update devguide style to use a similar theme as Docs

2016-07-22 Thread Brett Cannon

Brett Cannon added the comment:

Moved to https://github.com/python/devguide/issues/6

--
nosy: +brett.cannon
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue27590] tarfile module next() method hides exceptions

2016-07-22 Thread R. David Murray

R. David Murray added the comment:

OK, I've closed #16858 in favor of this one, since we at least had some 
discussion here.

I see you selected 2.7.  Does python3 have the same issues? (I'm guessing it 
does, though there has been some work done on the module.)

--
nosy: +mmarkk

___
Python tracker 

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



[issue16858] tarfile silently hides errors

2016-07-22 Thread R. David Murray

R. David Murray added the comment:

Closing this in favor of issue 27590, which at least got a little discussion.

--
nosy: +r.david.murray
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> tarfile module next() method hides exceptions

___
Python tracker 

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



[issue27572] Support bytes-like objects when base is given to int()

2016-07-22 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

No, the fix was applied to all maintained versions (2.7 and 3.4+). This means 
that we need some deprecation period before dropping this feature (if decide to 
drop it).

What about other Python implementations? Are they support byte-likes objects 
besides bytes and bytearray? Do they correctly handle embedded NUL and 
not-NUL-terminated buffers?

--

___
Python tracker 

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



[issue27592] FIPS_mode() and FIPS_mode_set() functions in Python (ssl)

2016-07-22 Thread Alex Gaynor

Alex Gaynor added the comment:

I'm opposed to adding FIPS knobs to Python's SSL module for a few reasons:

- FIPS is a bad standard (which I'm happy to talk at length about)
- OpenSSL is regularly on the verge of dropping FIPS support 
(https://www.openssl.org/blog/blog/2016/07/20/fips/ is the most recent rescue 
from the brink of removal)
- It further ties us to the OpenSSL API, in favor of being a more general 
purpose SSL API.

--
nosy: +alex, christian.heimes, dstufft, giampaolo.rodola, janssen, pitrou

___
Python tracker 

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



[issue27493] logging module fails with unclear error when supplied a (Posix)Path

2016-07-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fada654c5f72 by Vinay Sajip in branch 'default':
Closes #27493: accepted Path objects in file handlers for logging.
https://hg.python.org/cpython/rev/fada654c5f72

--
nosy: +python-dev
resolution:  -> fixed
stage: needs patch -> 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



[issue27592] FIPS_mode() and FIPS_mode_set() functions in Python (ssl)

2016-07-22 Thread Cristi Fati

New submission from Cristi Fati:

During last years, the FIPS mode, has become more and more popular, especially 
in US (probably because it was "promoted" by government institutions).
All OpenSSL versions (didn't check 1.0.0 or lower since they're no longer 
supported), have the "basic FIPS functionality", even if built without 
openssl-fips module. By "basic FIPS functionality", I mean the 2 functions:
- `int FIPS_mode(void)` - used to get the current FIPS mode (for non FIPS 
openssl, it simply returns 0)
- `int FIPS_mode_set(int r)` - used to set the current FIPS mode in the 
currently loaded libcrypto/libeay32 (for non FIPS openssl it sets the openssl 
error: "error:0F06D065:common libcrypto routines:FIPS_mode_set:fips mode not 
supported")

The goal of this patch is to add the 2 functions in Python (3.4.4 source 
tarball) - ssl (and _ssl) module - in order to be able to control FIPS mode 
from within a Python process (I am aware that some platforms allow setting FIPS 
at a global level, but this offers more granularity).

The patch is simple, for the getter it simply returns the OpenSSL function 
value, while for the setter it doesn't return anything but throws an exception 
if some error occurs.

Note0 (about how do I set the error): 
`_setSSLError(ERR_error_string(ERR_get_error(), NULL) , 0, __FILE__, 
__LINE__);` as opposed to the regular way: `_setSSLError(NULL, 0, __FILE__, 
__LINE__);`. I didn't use the whole make_ssl_data.py mechanism because:
- 1 - it binds against the OpenSSL version used at compile time
 - 1.1 - on Ux (where Python modules are dynamically linked to OpenSSL), if 
compiling against one OpenSSL version and at runtime another (newer) version 
which defines new functionality (and new error codes) is present, if one of 
those newer errors is encountered, the error message won't be as complete: 
"ssl.SSLError: fips mode already set (_ssl.c:3763)" as opposed to 
"ssl.SSLError: error:2D078072:FIPS routines:FIPS_module_mode_set:fips mode 
already set (_ssl.c:3763)"
 - 1.2 - on Win (where Python modules are statically linked to OpenSSL), there 
won't be such a problem. However, regarding static linking (this is not related 
to this post), this is not a scalable solution (now if only _ssl and _hashlib 
link to OpenSSL, it's __sort of__ OK, but if another one, or more will be added 
it won't be), so dynamic linking should be used, although that comes with its 
problems. 2 possible ways to solve them:
  - 1.2.1 - simply dynamic link to OpenSSL and at runtime it will fail 
importing the modules; this will happen a lot since (as opposed to Ux), I think 
that there's a 90%+ chance that no OpenSSL is installed on a Win machine
  - 1.2.2 - dynamic link to OpenSSL and also redistribute the OpenSSL dlls 
(although I didn't check what this would mean from licensing PoV). This would 
also raise the problem of precedence: which dlls should be used by default if 
an OpenSSL version is installed on the machine.
- 2 - It is simpler (here I might be missing something). To me it seems cleaner 
to delegate the job to (runtime) OpenSSL instead of make_ssl_data.py and the 
logic from `fill_and_set_sslerror` (which could be removed in the future, I'd 
say).

Note1: The whole thing could also be applied to hashlib (simply copy the 
changes from ssl.py to hashlib.py - to have as less duplicate code as 
possible), but since due to hashlib caching, changing the FIPS mode on the fly 
won't be reflected in the possibility/impossibility of using a hash (e.g. 
`md5`), I figured that it doesn't worth the effort. As a workaround, for 
someone who really needs to set it, they can do it from ssl.

--
files: Python-3.4.4-ssl_fips.patch
keywords: patch
messages: 271006
nosy: CristiFati
priority: normal
severity: normal
status: open
title: FIPS_mode() and FIPS_mode_set() functions in Python (ssl)
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file43833/Python-3.4.4-ssl_fips.patch

___
Python tracker 

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



[issue27590] tarfile module next() method hides exceptions

2016-07-22 Thread Yujie Chen

Yujie Chen added the comment:

The other issue is 
http://bugs.python.org/issue16858

--

___
Python tracker 

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



[issue27591] multiprocessing: Possible uninitialized pointer use in Windows builds

2016-07-22 Thread STINNER Victor

STINNER Victor added the comment:

I suggested a different way to fix the issue on the review.

Python 2.7 is not affected by the bug, but Python 3.5 and 3.6 are affected.

--

___
Python tracker 

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



[issue27591] multiprocessing: Possible uninitialized pointer use in Windows builds

2016-07-22 Thread STINNER Victor

STINNER Victor added the comment:

It's a little strange that nobody reports a multiprocessing crash on Windows 
before. It looks like ResetEvent() is called with a random number (coming from 
the uninitialized stack memory).

Windows is probably smart and does nothing if the argument is not a known 
handle of an event object.

--
nosy: +haypo

___
Python tracker 

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



[issue27587] Issues, reported by PVS-Studio static analyzer

2016-07-22 Thread Berker Peksag

Berker Peksag added the comment:

> V547 Expression 's->sock_fd < 0' is always false. Unsigned type value is 
> never < 0. Modules/socketmodule.c:655
> V547 Expression 's->sock_fd < 0' is always false. Unsigned type value is 
> never < 0. Modules/_ssl.c:1702
> V547 Expression 'sock->sock_fd < 0' is always false. Unsigned type value is 
> never < 0. Modules/_ssl.c:2018

Victor fixed these issues in 6c11f52ab9db and 025281485318.

> V614 Potentially uninitialized pointer 'sigint_event' used. 
> Modules/_multiprocessing/semaphore.c:120

See issue 27591.

--
nosy: +berker.peksag
stage:  -> needs patch
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



[issue27587] Issues, reported by PVS-Studio static analyzer

2016-07-22 Thread Chris Rebert

Changes by Chris Rebert :


--
nosy: +cvrebert

___
Python tracker 

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



[issue27561] Warn against subclassing builtins, and overriding their methods

2016-07-22 Thread Chris Rebert

Changes by Chris Rebert :


--
nosy: +cvrebert

___
Python tracker 

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



[issue27591] multiprocessing: Possible uninitialized pointer use in Windows builds

2016-07-22 Thread Chris Angelico

Chris Angelico added the comment:

Cool cool! Then someone will need to notify the PVS-Studio people that we've 
fixed the two bugs that are actually our bugs :)

--

___
Python tracker 

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



[issue27591] multiprocessing: Possible uninitialized pointer use in Windows builds

2016-07-22 Thread Berker Peksag

Berker Peksag added the comment:

Yes, that's why I assigned it to myself :) Thanks for the patch!

--

___
Python tracker 

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



[issue27572] Support bytes-like objects when base is given to int()

2016-07-22 Thread R. David Murray

R. David Murray added the comment:

So less than a year means only some versions of 3.5?  So we could drop it in 
3.6 and hope we don't break anybody's code?  I'm not sure I like that...I think 
the real problem is the complexity of handling multiple bytes types, and that 
ought to have a more general solution.  I'm not volunteering to work on it, 
though, so I'm not voting against dropping it.

--

___
Python tracker 

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



[issue27590] tarfile module next() method hides exceptions

2016-07-22 Thread R. David Murray

R. David Murray added the comment:

That would be my guess.  If we are reading along and we hit garbage data, we 
assume we've reached the end of the tar.  That doesn't mean there isn't room 
for improvement, or perhaps issuing a warning message about why we think we hit 
the end of the tar.

What is the issue number of the other issue?  If it is still open we should 
consolidate the issues if appropriate.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue27588] Type (typing) objects are hashable and comparable for equality but this is not documented

2016-07-22 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

I am not sure that this feature will survive the resolution of 
https://github.com/python/typing/issues/136

Types in typing are primarily intended for use with static type checkers and 
similar tools, their runtime properties are still under some discussions.

--
nosy: +levkivskyi

___
Python tracker 

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



[issue8406] Make some setup.py paths exclude-able

2016-07-22 Thread Matthias Bussonnier

Matthias Bussonnier added the comment:

> [2 nice response]

Thanks for the nice responses, we all know it can be hard to find the right 
balance between making a concise comment, and being delicate enough.  

Thanks all for your hard work on CPython, and looking forward to have time to 
contribute more !

--

___
Python tracker 

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



[issue27591] multiprocessing: Possible uninitialized pointer use in Windows builds

2016-07-22 Thread Chris Angelico

Chris Angelico added the comment:

Berker, I don't push code to CPython (I have the commitbit for PEP editing), so 
do you want to push that?

--

___
Python tracker 

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



[issue27572] Support bytes-like objects when base is given to int()

2016-07-22 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

It looks to me that the support of bytes-like objects besides bytes and 
bytearray was added accidentally, as a side effect of supporting Unicode. Note, 
that this support had a bug until issue24802, thus correct support of other 
bytes-like objects exists less than a year. The option of deprecating other 
bytes-like objects support looks reasonable to me. Especially in the light of 
deprecating bytearray paths support (issue26800).

On other side, the need of copying a buffer can be considered as implementation 
detail, since low-level int parsing functions require NUL-terminated C strings. 
We can add alternative low-level functions that work with not-NUL-terminated 
strings. This needs more work.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue26559] logging.handlers.MemoryHandler flushes on shutdown but not removal

2016-07-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a399daacb591 by Vinay Sajip in branch 'default':
Closes #26559: Allow configuring flush-on-close behaviour of MemoryHandler.
https://hg.python.org/cpython/rev/a399daacb591

--
nosy: +python-dev
resolution:  -> fixed
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



[issue27591] multiprocessing: Possible uninitialized pointer use in Windows builds

2016-07-22 Thread Berker Peksag

Berker Peksag added the comment:

LGTM

--
assignee:  -> berker.peksag
components: +Extension Modules
nosy: +berker.peksag
stage:  -> patch review
type:  -> behavior
versions: +Python 3.5

___
Python tracker 

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



[issue27590] tarfile module next() method hides exceptions

2016-07-22 Thread Yujie Chen

New submission from Yujie Chen:

I have seen a similar ticket, however that was opened 2 years ago and has 
nothing more than a brief description. So I opened this new one here, hoping to 
get some answers.

tarfile.TarFile object is iterable and has a next() method. next() will parse 
the header and save parsed info. During parsing, a lot of checks are done, to 
make sure the header is valid. And if there is something wrong with the header, 
exceptions will be thrown. next() catches a lot of them but not reraise what it 
catches in all cases.

I have a tgz file, one of the headers is corrupted with a wrong checksum 
section. thus during parsing, InvalidHeaderError was thrown. next() catches 
that but hide it silently. From source code 
(https://hg.python.org/cpython/file/2.7/Lib/tarfile.py#l2335), we can see that 
InvalidHeaderError will ONLY be raised if it happens in the beginning of the 
tar file. Actually, a lot of exceptions are hidden by tarfile module. tarfile 
module simply thinks these exceptions mark the end of tarball.

Why does tarfile module hide so many exceptions? or in other words, why does 
tarfile treat these exceptions as the end marker of tarball but not errors?

Is it because of this from GNU doc:
"At the end of the archive file there are two 512-byte blocks filled with 
binary zeros as an end-of-file marker. A reasonable system should write such 
end-of-file marker at the end of an archive, but must not assume that such a 
block exists when reading an archive."?

Thanks!

--
components: Library (Lib)
messages: 270990
nosy: JieGhost
priority: normal
severity: normal
status: open
title: tarfile module next() method hides exceptions
type: behavior
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



[issue27591] multiprocessing: Possible uninitialized pointer use in Windows builds

2016-07-22 Thread Chris Angelico

New submission from Chris Angelico:

Originally reported (if you can call it "reported") here: 
http://www.viva64.com/en/b/0414/

AFAICT, this is an easy and inconsequential fix.

--
files: uninitialized-pointer.patch
keywords: patch
messages: 270991
nosy: Rosuav
priority: normal
severity: normal
status: open
title: multiprocessing: Possible uninitialized pointer use in Windows builds
versions: Python 3.6
Added file: http://bugs.python.org/file43832/uninitialized-pointer.patch

___
Python tracker 

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



[issue27588] Type (typing) objects are hashable and comparable for equality but this is not documented

2016-07-22 Thread R. David Murray

Changes by R. David Murray :


--
title: Type objects are hashable and comparable for equality but this is not 
documented -> Type (typing) objects are hashable and comparable for equality 
but this is not documented

___
Python tracker 

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



[issue27572] Support bytes-like objects when base is given to int()

2016-07-22 Thread R. David Murray

R. David Murray added the comment:

Since bytes are accepted in both cases, the inconsistency does seem odd.  
Looking at the history, I think the else statement that checks the types that 
can be handled was introduced during the initial py3k conversion, and I'm 
guessing that else was just forgotten in subsequent updates that added 
additional bytes-like types.  The non-base branch calls PyNumber_Long, where I 
presume it picked up the additional type support.

If a copy has to be done anyway, perhaps we can future proof the code by doing 
a bytes conversion internally in long_new?

Disallowing something that currently works without a good reason isn't good for 
backward compatibility, so I'd vote for making this work consistently one way 
or another.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue8406] Make some setup.py paths exclude-able

2016-07-22 Thread R. David Murray

R. David Murray added the comment:

No, no trouble.  We appreciate Carol's efforts!  As you say, any changes can be 
reversed; we prefer that people exercise triage privileges and make mistakes 
than that they feel too cautious to do anything.  If our tone came across as 
confrontational that was unintentional.  It is, rather, a matter, as you say, 
of communicating our community's style and standards.  The only time a problem 
arises is if someone ignores or flat out rejects the feedback instead of 
accepting the community conventions or engaging in civil discussion about them, 
and that is certainly not the case here!

There is also the possibility that our approach is not optimal, but that is a 
meta discussion that would take place on python-dev.

--

___
Python tracker 

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



[issue27582] Mispositioned SyntaxError caret for unknown code points

2016-07-22 Thread Adam Bartoš

Adam Bartoš added the comment:

Maybe this is related: http://bugs.python.org/issue26152.

--
nosy: +Drekin

___
Python tracker 

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



[issue27490] Do not run pgen when it is not going to be used (cross-compiling)

2016-07-22 Thread Martin Panter

Martin Panter added the comment:

This patch looks okay to me. I will commit it in a few days, unless anyone 
comes up with a better option.

--
stage:  -> patch review
versions: +Python 3.5

___
Python tracker 

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



[issue1521950] shlex.split() does not tokenize like the shell

2016-07-22 Thread Vinay Sajip

Changes by Vinay Sajip :


Added file: http://bugs.python.org/file43831/refresh-2016.diff

___
Python tracker 

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



[issue27472] add the 'unix_shell' attribute to test.support

2016-07-22 Thread Xavier de Gaye

Changes by Xavier de Gaye :


--
resolution:  -> fixed
stage: commit 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



[issue27472] add the 'unix_shell' attribute to test.support

2016-07-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 15835311b5e6 by Xavier de Gaye in branch 'default':
Issue #27472: Add test.support.unix_shell as the path to the default shell.
https://hg.python.org/cpython/rev/15835311b5e6

--
nosy: +python-dev

___
Python tracker 

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



[issue27490] Do not run pgen when it is not going to be used (cross-compiling)

2016-07-22 Thread Thomas Perl

Thomas Perl added the comment:

Repurposing this bug as "do not run pgen".

Documenting and using 'make PGEN_DEP=""' might also work; however, given that 
the configure script uses autoconf, and there's also code in place for 
PYTHON_FOR_BUILD, I've attached a patch that makes the PGEN dependency just a 
autoconf substitution -- this might make it clear and not depend on any make 
substitution features?

Patch attached against current Hg cpython default branch tip, a similar patch 
also applies against 2.7.

--
keywords: +patch
title: ARM cross-compile: pgen built without $(CFLAGS) as $(LIBRARY) dependency 
-> Do not run pgen when it is not going to be used (cross-compiling)
Added file: http://bugs.python.org/file43830/pgen_dependencies.patch

___
Python tracker 

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



[issue27589] asyncio doc: issue in as_completed() doc

2016-07-22 Thread STINNER Victor

New submission from STINNER Victor:

Remark on as_completed() doc by Hynek.

https://docs.python.org/dev/library/asyncio-task.html#asyncio.as_completed

Futures are yielded in an unexpected order: as soon as a future completes.

--
assignee: docs@python
components: Documentation, asyncio
messages: 270982
nosy: docs@python, gvanrossum, haypo, yselivanov
priority: normal
severity: normal
status: open
title: asyncio doc: issue in as_completed() doc
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



[issue27588] Type objects are hashable and comparable for equality but this is not documented

2016-07-22 Thread Gareth Rees

New submission from Gareth Rees:

The type objects constructed by the metaclasses in the typing module are 
hashable and comparable for equality:

>>> from typing import *
>>> {Mapping[str, int], Mapping[int, str]}
{typing.Mapping[int, str], typing.Mapping[str, int]}
>>> Union[str, int, float] == Union[float, int, str]
True
>>> List[int] == List[float]
False

but this is not clearly documented in the documentation for the typing module 
(there are a handful of examples using equality, but it's not explicit that 
these are runnable).

It would be nice if there were explicit documentation for these properties of 
type objects.

--
assignee: docs@python
components: Documentation
messages: 270981
nosy: Gareth.Rees, docs@python
priority: normal
severity: normal
status: open
title: Type objects are hashable and comparable for equality but this is not 
documented
type: enhancement
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



[issue26662] configure/Makefile doesn't check if "python" command works, needed to build Objects/typeslots.inc

2016-07-22 Thread Xavier de Gaye

Xavier de Gaye added the comment:

Patch with a new error message.

--
Added file: http://bugs.python.org/file43829/py_for_gen_26662_3.patch

___
Python tracker 

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



[issue27546] Integrate tkinter and asyncio (and async)

2016-07-22 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Using the callback loop from loop_tk.py, 3.6 repository IDLE runs with an 
asyncio loop.  See idle-async.diff.  So far, it seems about as snappy.  I need 
to do a more stressful (longer running) gui operation test to be sure: change 
syntax highlighting with 10 or 20 editor windows open.

--
keywords: +patch
Added file: http://bugs.python.org/file43828/idle-async.diff

___
Python tracker 

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



[issue27587] Issues, reported by PVS-Studio static analyzer

2016-07-22 Thread Martin Panter

Martin Panter added the comment:

Thanks for the report. You seem to have identified some code from Open SSL as 
being from Python (e.g. ASN1_PRINTABLE_type() function in a_print.c).

Here’s a quick copy of the details relevant to Python:

V547 Expression 's->sock_fd < 0' is always false. Unsigned type value is never 
< 0. Modules/socketmodule.c:655
V547 Expression 's->sock_fd < 0' is always false. Unsigned type value is never 
< 0. Modules/_ssl.c:1702
V547 Expression 'sock->sock_fd < 0' is always false. Unsigned type value is 
never < 0. Modules/_ssl.c:2018
Suggestion: compare with INVALID_SOCKET

V614 Potentially uninitialized pointer 'sigint_event' used. 
Modules/_multiprocessing/semaphore.c:120

V728 An excessive check can be simplified. The '||' operator is surrounded by 
opposite expressions 'quotetabs' and '!quotetabs'. Modules/binascii.c:1453

Null pointer check after use of “def” in _PyState_AddModule(), Python/pystate.c
V595 The 'self->extra' pointer was utilized before it was verified against 
nullptr. Check lines: 917, 923. Modules/_elementtree.c:917

The first two groups (sock_fd and sigint_event) look like Windows-specific 
code, and I suspect would be diagnosed with GCC (but building Python with GCC 
on Windows needs work).

--
components: +Windows
nosy: +martin.panter, paul.moore, steve.dower, tim.golden, zach.ware
type: enhancement -> compile error

___
Python tracker 

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



[issue1621] Do not assume signed integer overflow behavior

2016-07-22 Thread Xiang Zhang

Xiang Zhang added the comment:

@Martin, attach a patch to fix the overflow check you mentioned in tuple and 
list objects.

--
nosy: +xiang.zhang
Added file: http://bugs.python.org/file43827/tuple_and_list.patch

___
Python tracker 

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



[issue27546] Integrate tkinter and asyncio (and async)

2016-07-22 Thread Terry J. Reedy

Terry J. Reedy added the comment:

New file loop_tk.py solve the responsiveness problem, at least for this 
example, by using the asyncio loop as it is and doing tk updates in a callback 
loop. It works with both SelectorEventLoop and ProactorEventLoop.

I was inspired to try this, instead of my planned modification of _run_once, 
but Yury's post on uvloop 
http://magic.io/blog/uvloop-make-python-networking-great-again/.  I realized 
that any modification of asyncio.XyzLoop would only work for that class, where 
as a standard callback loop would work with any sufficiently compatible loop.

Yury, if you happen to read this, could you try loop_tk.py with the two uvloop 
lines added and get_event_loop uncommented?

--
Added file: http://bugs.python.org/file43826/loop_tk.py

___
Python tracker 

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



[issue27572] Support bytes-like objects when base is given to int()

2016-07-22 Thread Xiang Zhang

Xiang Zhang added the comment:

It's reasonable. My original intention is to make the behaviour consistent. If 
the single-argument behaviour is OK with bytes-like objects, why not others? So 
I think we'd better wait for other developers to see what their opinions are.

--
nosy: +rhettinger

___
Python tracker 

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



[issue27587] Issues, reported by PVS-Studio static analyzer

2016-07-22 Thread Pavel Belikov

New submission from Pavel Belikov:

To demonstrate the capabilities of our analyzer, we regularly perform analysis 
of open source projects. We had recently checked the CPython project.

Here is the link to the article about it: http://www.viva64.com/en/b/0414/
Official page of the analyzer: http://www.viva64.com/en/pvs-studio/

If you have any questions, or if you are interested in the evaluation of our 
static analyzer or in any other source code quality control services that our 
company provides, please contact us at supp...@viva64.com.

--
messages: 270974
nosy: pavel-belikov
priority: normal
severity: normal
status: open
title: Issues, reported by PVS-Studio static analyzer
type: enhancement

___
Python tracker 

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



  1   2   >