[issue25596] regular files handled as directories in the glob module

2015-11-10 Thread Xavier de Gaye

Xavier de Gaye added the comment:

This second patch rewrites the conditionals that decide whether to call 
_iglob() recursively, in a more natural way and without changing the behavior 
from the first patch.
Note that when 'dirname == pathname', then basename is empty and glob2() or 
glob1() are not called.

The patch also refactors the code with a new _listdir() function.

--
Added file: http://bugs.python.org/file40999/glob_isdir_2.patch

___
Python tracker 

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



[issue25263] test_tkinter fails randomly on the buildbots "AMD64 Windows10" (3.4, 3.5, 3.x)

2015-11-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Tk bug looks fixed in next releases of Tk 8.5 and 8.6. Here is a patch that 
adds a workaround for the test.

--
keywords: +patch
stage:  -> patch review
type:  -> behavior
Added file: http://bugs.python.org/file41000/tkinter_test_use_workaround.patch

___
Python tracker 

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



[issue25596] regular files handled as directories in the glob module

2015-11-10 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
nosy: +serhiy.storchaka
priority: normal -> low
stage:  -> patch review

___
Python tracker 

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



[issue25594] enum docs outdated re attribute access

2015-11-10 Thread Ethan Furman

Ethan Furman added the comment:

Nope, that would be a bug.

--
assignee: docs@python -> ethan.furman
stage:  -> test needed
type:  -> behavior

___
Python tracker 

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



[issue25598] Fix memory_hex (#9951) for non-contiguous buffers

2015-11-10 Thread Stefan Krah

New submission from Stefan Krah:

memory_hex from #9951 fails for non-contiguous buffers.

--
assignee: skrah
files: memhex.diff
keywords: patch
messages: 254454
nosy: skrah
priority: normal
severity: normal
status: open
title: Fix memory_hex (#9951) for non-contiguous buffers
type: crash
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file41002/memhex.diff

___
Python tracker 

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



[issue25597] unittest.mock does not wrap dict objects correctly

2015-11-10 Thread Darragh Bailey

New submission from Darragh Bailey:

Both unittest.mock and the backported release for earlier pythons don't appear 
to support mocking of dictionary objects.

Specifically I'm expecting that any of the methods used to test for membership, 
or get items from a mock object wrapping a dictionary should succeed. However 
it appears that MagicMock doesn't appear to support this.

Attached file shows an attempt to use different methods with a wrapped 
dictionary object where only the '.get()' method appears to work as expected.

--
files: test-mock-wraps-dict.py
messages: 254453
nosy: Darragh Bailey
priority: normal
severity: normal
status: open
title: unittest.mock does not wrap dict objects correctly
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file41001/test-mock-wraps-dict.py

___
Python tracker 

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



[issue25589] test_ascii_formatd fails on Mac when built with Intel compiler

2015-11-10 Thread R. David Murray

R. David Murray added the comment:

Someone can correct me if I'm wrong, but my expectation would be that since we 
use ICC for the main compile on the ICC buildbots, we also compile the bundled 
ctypes using it.  It is hard to see how any of the other modules would affect 
this.

--

___
Python tracker 

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



[issue25589] test_ascii_formatd fails on Mac when built with Intel compiler

2015-11-10 Thread Chris Hogan

Chris Hogan added the comment:

I guess since no one can reproduce the error, it must be a problem with how I'm 
building it.  We build our own dependencies (zlib, bzip, sqlite3, openssl, 
etc.) with the Intel compiler, so it could be any number of things causing the 
issue. Closing as not a bug.

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

___
Python tracker 

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



[issue25599] asyncio.iscoroutinefunction returns unexpected results when presented with unittest.mock.Mock

2015-11-10 Thread Guido van Rossum

Guido van Rossum added the comment:

Hm... I don't know what answer you would expect. Who says your mock shouldn't 
behave like a coroutine? In general, passing mocks to functions is likely to 
return a mock -- even boolean functions.

Can you provide more context?

--

___
Python tracker 

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



[issue6598] calling email.utils.make_msgid frequently has a non-trivial probability of generating colliding ids

2015-11-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3c0a817ab616 by Serhiy Storchaka in branch '3.4':
Issue #6598: Avoid clock wrapping around in test_make_msgid_collisions.
https://hg.python.org/cpython/rev/3c0a817ab616

New changeset e259c0ab7a69 by Serhiy Storchaka in branch '3.5':
Issue #6598: Avoid clock wrapping around in test_make_msgid_collisions.
https://hg.python.org/cpython/rev/e259c0ab7a69

New changeset d1c11a78b43a by Serhiy Storchaka in branch 'default':
Issue #6598: Avoid clock wrapping around in test_make_msgid_collisions.
https://hg.python.org/cpython/rev/d1c11a78b43a

New changeset bdd257d60da2 by Serhiy Storchaka in branch '2.7':
Issue #6598: Avoid clock wrapping around in test_make_msgid_collisions.
https://hg.python.org/cpython/rev/bdd257d60da2

--

___
Python tracker 

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



[issue25594] enum docs outdated re attribute access

2015-11-10 Thread SilentGhost

SilentGhost added the comment:

Here is the test, it seems to have been 2545bfe0d273 that caused it 
(issue23486): test passes prior to it and fails on it (and I assume uniformly 
after).

--
keywords: +patch
Added file: http://bugs.python.org/file41003/test_issue25594.diff

___
Python tracker 

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



[issue25598] Fix memory_hex (#9951) for non-contiguous buffers

2015-11-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f3d8bb3ffa98 by Stefan Krah in branch '3.5':
Iaaue #25598: Fix memory_hex from #9951 for non-contiguous buffers.
https://hg.python.org/cpython/rev/f3d8bb3ffa98

--
nosy: +python-dev

___
Python tracker 

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



[issue9951] introduce bytes.hex method (also for bytearray and memoryview)

2015-11-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f3d8bb3ffa98 by Stefan Krah in branch '3.5':
Iaaue #25598: Fix memory_hex from #9951 for non-contiguous buffers.
https://hg.python.org/cpython/rev/f3d8bb3ffa98

--

___
Python tracker 

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



[issue25599] asyncio.iscoroutinefunction returns unexpected results when presented with unittest.mock.Mock

2015-11-10 Thread Theron Luhn

New submission from Theron Luhn:

>>> asyncio.iscoroutinefunction(unittest.mock.Mock())


This is an unexpected response, both in type (Mock rather than boolean) and 
value (truthy).

inspect.iscoroutinefunction behaves as expected.

Workaround:

>>> m = unittest.mock.Mock()
>>> m._is_coroutine = False
>>> asyncio.iscoroutinefunction(m)
False

--
components: asyncio
messages: 254457
nosy: Theron Luhn, gvanrossum, haypo, yselivanov
priority: normal
severity: normal
status: open
title: asyncio.iscoroutinefunction returns unexpected results when presented 
with unittest.mock.Mock
type: behavior
versions: Python 3.2, Python 3.3, 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



[issue6598] calling email.utils.make_msgid frequently has a non-trivial probability of generating colliding ids

2015-11-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

http://buildbot.python.org/all/builders/x86%20Tiger%202.7/builds/3246/steps/test/logs/stdio
==
FAIL: test_make_msgid_collisions (email.test.test_email.TestMiscellaneous)
--
Traceback (most recent call last):
  File 
"/Users/db3l/buildarea/2.7.bolen-tiger/build/Lib/email/test/test_email.py", 
line 2434, in test_make_msgid_collisions
pass
  File "/Users/db3l/buildarea/2.7.bolen-tiger/build/Lib/contextlib.py", line 
24, in __exit__
self.gen.next()
  File "/Users/db3l/buildarea/2.7.bolen-tiger/build/Lib/test/test_support.py", 
line 1570, in start_threads
raise AssertionError('Unable to join %d threads' % len(started))
AssertionError: Unable to join 5 threads

--

Threads that should be finished for 3 seconds can't be finished for 15 minutes. 
It looks as clock() wrapped around. From clock (3) manpage:

Note that the time can wrap around.  On a 32-bit system where 
CLOCKS_PER_SEC equals 100 this function will return the same value 
approximately every 72 minutes.

The solution is to use monotonic() (time() on older releases) instead of 
clock().

--

___
Python tracker 

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



[issue25593] _sock_connect_cb can be called twice resulting in InvalidStateError

2015-11-10 Thread Guido van Rossum

Guido van Rossum added the comment:

Please show us how to repro -- there's no way we can figure out how this 
"impossible" event could happen in your code without understanding your code. 
Is it possible that multiprocessing forked your event loop or something 
similarly esoteric?

--

___
Python tracker 

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



[issue25599] asyncio.iscoroutinefunction returns unexpected results when presented with unittest.mock.Mock

2015-11-10 Thread STINNER Victor

STINNER Victor added the comment:

>>> asyncio.iscoroutinefunction(unittest.mock.Mock())


Yeah, I already had this issue when I wrote unit tests using mock :-/ I didn't 
find an obvious fix for this issue, and it's quite easy to workaround it.

It looks like the "m._is_coroutine = False" is not used in asyncio tests. I 
don't recall how I worked around the issue in asyncio tests...

--

___
Python tracker 

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



[issue24848] Warts in UTF-7 error handling

2015-11-10 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
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



[issue25339] sys.stdout.errors is set to "surrogateescape"

2015-11-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The default encoding of sys.stdio and sys.stdout is determined by (in order of 
increasing precedence):

1. locale
2. PYTHONIOENCODING
3. Py_SetStandardStreamEncoding()

The default error handler before 3.5 was determined by:

1. 'strict'
2. PYTHONIOENCODING
3. Py_SetStandardStreamEncoding()

The default error handler since 3.5 (issue19977) is determined by:

1. PYTHONIOENCODING
2. locale
3. Py_SetStandardStreamEncoding()

Even if you explicitly specified the error handler by PYTHONIOENCODING, it 
doesn't have effect in POSIX locale. This doesn't look right to me. I think the 
order should be the same as for encoding.

Proposed patch makes PYTHONIOENCODING to override locale default for error 
handler.

--
keywords: +patch
stage:  -> patch review
Added file: http://bugs.python.org/file41004/default_io_error_handle.patch

___
Python tracker 

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



[issue25594] enum instance attribute access possible

2015-11-10 Thread SilentGhost

Changes by SilentGhost :


--
components:  -Documentation
stage: test needed -> needs patch
title: enum docs outdated re attribute access -> enum instance attribute access 
possible

___
Python tracker 

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



[issue25595] test_deleted_cwd in test_importlib is failed on AIX

2015-11-10 Thread Martin Panter

Martin Panter added the comment:

Wow this is tricky to get right. Victor, you are right to not trust 
TemporaryDirectory, because when cleanup() fails you don’t get a second chance, 
and it will leave the directory behind.

According to the Microsoft _mkdir() web page 
, Windows would raise 
ENOTEMPTY for removing the current directory. Maybe it is time to drop the 
win32 skip check as well?

Here is a patch based on aix_2.patch, but also removing the redundant win32 
skip. And “import errno” was no longer needed. I only tested it on Linux 
though, which supports removing the cwd.

--
Added file: http://bugs.python.org/file41005/test_deleted_cwd_aix_3.patch

___
Python tracker 

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



[issue25437] Issue with ftplib.FTP_TLS and server forcing SSL connection reuse

2015-11-10 Thread Stephen Ash

Changes by Stephen Ash :


--
nosy: +Stephen Ash

___
Python tracker 

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



[issue25558] Use static asserts in C code

2015-11-10 Thread STINNER Victor

STINNER Victor added the comment:

This issue can now be closed, no?

(I don't think that it's worth to add a new macro and make the existing macro 
more strict.)

--

___
Python tracker 

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



[issue25597] unittest.mock does not wrap dict objects correctly

2015-11-10 Thread R. David Murray

R. David Murray added the comment:

Looking at the source, it's not clear that wraps is supported for __ methods, 
despite what the documentation implies.  That is, MagicProxy doesn't seem to 
look at the wraps information.  I suspect it is doable, but it may be an 
enhancement request rather than a bug fix, I'm not sure.

--
nosy: +michael.foord, r.david.murray, rbcollins

___
Python tracker 

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



[issue25594] enum docs outdated re attribute access

2015-11-10 Thread SilentGhost

New submission from SilentGhost:

In enum docs[0], there is a suggestion that the attribute access on members 
should raise an AttributeError:

>>> Color.red.blue
Traceback (most recent call last):
...
AttributeError: 'Color' object has no attribute 'blue'

which is demonstrably wrong in either 3.5 or 3.6. I presume that's a doc issue 
and I'd be glad to propose the patch as soon as someone more familiar with the 
module could confirm that.

[0] https://docs.python.org/3.6/library/enum.html#finer-points

--
assignee: docs@python
components: Documentation, Library (Lib)
messages: 254436
nosy: SilentGhost, barry, docs@python, eli.bendersky, ethan.furman
priority: normal
severity: normal
status: open
title: enum docs outdated re attribute access
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



[issue25586] socket.sendall broken when a socket has a timeout

2015-11-10 Thread Jakub Stasiak

Jakub Stasiak added the comment:

That's fair and thanks for the links.

Please find a quick patch attached, feel free to use that or any modification 
of it. While I believe the documentation is technically correct right now it 
won't hurt to clarify this I think.

--
keywords: +patch
Added file: http://bugs.python.org/file40994/socket-docs.patch

___
Python tracker 

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



[issue25595] test_deleted_cwd in test_importlib is failed on AIX

2015-11-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Victor for your review. Here is fixed patch that implements your 
suggestions.

--
Added file: http://bugs.python.org/file40997/test_deleted_cwd_aix_2.patch

___
Python tracker 

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



[issue25595] test_deleted_cwd in test_importlib is failed on AIX

2015-11-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

And here is simple alternative patch based on Martin's original suggestion in 
msg236122.

--
Added file: http://bugs.python.org/file40998/test_deleted_cwd_aix_alt.patch

___
Python tracker 

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



[issue25590] tab-completition on instances repeatedly accesses attribute/descriptors values

2015-11-10 Thread Martin Panter

Martin Panter added the comment:

getattr-once.patch handles my first two points. It backports the set() change, 
and avoids the hasattr() check. I guess we apply this to 3.4+; expect merge 
conflicts with 3.6.

As for the last point, I will make another patch to include special attributes 
that don’t actually exist yet, where they are currently omitted. Would we 
consider this a new feature for 3.6? Going by Serhiy’s logic in 
 I would say yes.

--
keywords: +patch
stage: needs patch -> patch review
Added file: http://bugs.python.org/file41006/getattr-once.patch

___
Python tracker 

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



[issue25586] socket.sendall broken when a socket has a timeout

2015-11-10 Thread Martin Panter

Martin Panter added the comment:

That was kind of what I had in mind. The only change I would make is to restore 
the comma to “On error (including socket timeout), an exception . . .”. I’ll 
try to commit this in a few days if nobody has anything else to say.

--
stage:  -> patch review

___
Python tracker 

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



[issue25595] test_deleted_cwd in test_importlib is failed on AIX

2015-11-10 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

test_deleted_cwd in test_importlib is failed on AIX.

http://buildbot.python.org/all/builders/PPC64%20AIX%203.x/builds/4318/steps/test/logs/stdio
==
ERROR: test_deleted_cwd 
(test.test_importlib.import_.test_path.Source_FinderTests)
--
Traceback (most recent call last):
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/test_importlib/import_/test_path.py",
 line 169, in test_deleted_cwd
os.chdir(path)
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/tempfile.py", 
line 807, in __exit__
self.cleanup()
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/tempfile.py", 
line 811, in cleanup
_shutil.rmtree(self.name)
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/shutil.py", 
line 478, in rmtree
onerror(os.rmdir, path, sys.exc_info())
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/shutil.py", 
line 476, in rmtree
os.rmdir(path)
OSError: [Errno 16] Device busy: '/tmp/tmp2xdxtq6x'

--

Proposed patch fixes the test. It also uses more verbose wording to create and 
remove temporary directory to be sure that caught exception was written by 
removing the directory, not by creating or changing CWD.

See also issue22834.

--
components: Tests
files: test_deleted_cwd_aix.patch
keywords: patch
messages: 254438
nosy: David.Edelsohn, brett.cannon, martin.panter, serhiy.storchaka, zach.ware
priority: normal
severity: normal
stage: patch review
status: open
title: test_deleted_cwd in test_importlib is failed on AIX
type: behavior
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file40995/test_deleted_cwd_aix.patch

___
Python tracker 

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



[issue25596] regular files handled as directories in the glob module

2015-11-10 Thread Xavier de Gaye

New submission from Xavier de Gaye:

The glob module happily joins names of regular files together with 
os.path.join() or attempts to list the files contained into a regular file 
(sic). The same 'except os.error' statement is used to handle both these cases 
and the case of a non readable directory.

The attached patch makes the code more correct and easier to understand.

--
components: Library (Lib)
files: glob_isdir.patch
keywords: patch
messages: 254440
nosy: xdegaye
priority: normal
severity: normal
status: open
title: regular files handled as directories in the glob module
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file40996/glob_isdir.patch

___
Python tracker 

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



[issue25584] a recursive glob pattern fails to list files in the current directory

2015-11-10 Thread Xavier de Gaye

Xavier de Gaye added the comment:

New issue 25596 entered: regular files handled as directories in the glob 
module.

Thanks for fixing this Serhiy.

--

___
Python tracker 

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



[issue25595] test_deleted_cwd in test_importlib is failed on AIX

2015-11-10 Thread STINNER Victor

STINNER Victor added the comment:

-1, review on Rietveld.

--
nosy: +haypo

___
Python tracker 

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



[issue25600] argparse, argument_default=argparse.SUPPRESS seems to have no effect

2015-11-10 Thread mcer45

New submission from mcer45:

The parameter argument_default=argparse.SUPPRESS seems to have no effect.
Example:

=

help_dirs='ahoy

parser = argparse.ArgumentParser(
   formatter_class=argparse.RawDescriptionHelpFormatter,
   description='Makes the calendar for the "year"',
   epilog=textwrap.dedent(help_dirs))
parser.add_argument("user",  help='the user directory with the required
structure in ./')
parser.add_argument("year",  type=int,  help='the year for this calendar
and also the directory for the output')
parser.add_argument("-acc","--acc",
default='no',nargs='?',choices=['yes','no'],const='yes',
help='accomodate ratio according to the
cover photo, default=no')
parser.add_argument("--color",default='gold', choices=['gold'],
help='default color: gold')
args = parser.parse_args(['mc', '2015'])
print(args)
del parser
del args



parser = argparse.ArgumentParser(argument_default=argparse.SUPPRESS,
   formatter_class=argparse.RawDescriptionHelpFormatter,
   description='Makes the calendar for the "year"',
   epilog=textwrap.dedent(help_dirs))
parser.add_argument("user",  help='the user directory with the required
structure in ./')
parser.add_argument("year",  type=int,  help='the year for this calendar
and also the directory for the output')
parser.add_argument("-acc","--acc",
default='no',nargs='?',choices=['yes','no'],const='yes',
help='accomodate ratio according to the
cover photo, default=no')
parser.add_argument("--color",default='gold', choices=['gold'],
help='default color: gold')
args = parser.parse_args(['mc', '2015'])


===

The results in both cases are the  same:
Namespace(acc='no', color='gold', user='mc', year=2015)

I hoped the defaults will be suppressed.

--
components: Library (Lib)
messages: 254478
nosy: bethard, mcer45
priority: normal
severity: normal
status: open
title: argparse, argument_default=argparse.SUPPRESS seems to have no effect
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



[issue25590] tab-completition on instances repeatedly accesses attribute/descriptors values

2015-11-10 Thread Martin Panter

Martin Panter added the comment:

uncreated-attr.patch is against the 3.6 branch, and includes the excessive 
getattr() test, and new code to include uncreated attribute names. I added a 
paragraph to What’s New describing the new completion behaviour.

--
Added file: http://bugs.python.org/file41007/uncreated-attr.patch

___
Python tracker 

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



[issue25590] tab-completition on instances repeatedly accesses attribute/descriptors values

2015-11-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Both patches LGTM. Thank you Martin.

> Would we consider this a new feature for 3.6?

We can consider this a fix of the regression in issue449227. But this behavior 
here is so long. I agree with applying it to 3.6 only.

For nicer Mercurial history, it would be better to apply both patches 
separately in 3.6.

Would not be simpler to use uninitialized slot attribute in test_uncreated_attr?

--
assignee:  -> martin.panter
stage: patch review -> commit review

___
Python tracker 

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



[issue25595] test_deleted_cwd in test_importlib is failed on AIX

2015-11-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Martin's original code looked nicer to me. It' a pity we can't use it.

test_deleted_cwd_aix_3.patch LGTM. Thanks Martin!

--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[issue25595] test_deleted_cwd in test_importlib is failed on AIX

2015-11-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d4dc36586f24 by Serhiy Storchaka in branch '3.5':
Issue #25595: Fixed test_deleted_cwd in test_importlib on AIX.
https://hg.python.org/cpython/rev/d4dc36586f24

New changeset 3f392050d519 by Serhiy Storchaka in branch 'default':
Issue #25595: Fixed test_deleted_cwd in test_importlib on AIX.
https://hg.python.org/cpython/rev/3f392050d519

--
nosy: +python-dev

___
Python tracker 

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



[issue25595] test_deleted_cwd in test_importlib is failed on AIX

2015-11-10 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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



[issue25498] Python 3.4.3 core dump with simple sample code

2015-11-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Added new comments on Rietveld. Would be nice to add tests for read-only and 
non-contiguous buffers.

eryksun, what is your real name? What we have to add in the Misc/ACKS file?

--

___
Python tracker 

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



[issue24661] CGIHTTPServer: premature unescaping of query string

2015-11-10 Thread Martin Panter

Martin Panter added the comment:

The CGI server no longer unquotes the query string thanks to the fix for Issue 
24657. The fix should be in the next (2.7.11) release.

--
nosy: +martin.panter
resolution:  -> out of date
stage:  -> resolved
status: open -> closed
superseder:  -> CGIHTTPServer module discard continuous '/' letters from params 
given by GET method.
type:  -> behavior
versions: +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



[issue25583] os.makedirs with exist_ok=True raises PermissionError on Windows 7^

2015-11-10 Thread Daniel Plachotich

Daniel Plachotich added the comment:

Yes, it's probably a better solution. If had been more careful, I wouldn't have 
scribbled so much text here :) .

But is there any sense in adding Windows-specific test with EACCES since the 
problem with errno may affect other platforms as well (at least in theory)? 
It's not a Windows-only issue.

--

___
Python tracker 

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



[issue25263] test_tkinter fails randomly on the buildbots "AMD64 Windows10" (3.4, 3.5, 3.x)

2015-11-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 385b3aaf8401 by Serhiy Storchaka in branch '3.4':
Issue #25263: Fixed the tkinter.test.test_tkinter.test_font.FontTest test
https://hg.python.org/cpython/rev/385b3aaf8401

New changeset db168611c6c8 by Serhiy Storchaka in branch '3.5':
Issue #25263: Fixed the tkinter.test.test_tkinter.test_font.FontTest test
https://hg.python.org/cpython/rev/db168611c6c8

New changeset 0632642c30dd by Serhiy Storchaka in branch 'default':
Issue #25263: Fixed the tkinter.test.test_tkinter.test_font.FontTest test
https://hg.python.org/cpython/rev/0632642c30dd

New changeset f81e357b2318 by Serhiy Storchaka in branch '2.7':
Issue #25263: Fixed the tkinter.test.test_tkinter.test_font.FontTest test
https://hg.python.org/cpython/rev/f81e357b2318

--

___
Python tracker 

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



[issue25595] test_deleted_cwd in test_importlib is failed on AIX

2015-11-10 Thread STINNER Victor

STINNER Victor added the comment:

test_deleted_cwd_aix_alt.patch: I don't trust tempfile.TemporaryDirectory(), I 
prefer your patch.

test_deleted_cwd_aix_2.patch looks good to me.

--

___
Python tracker 

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



[issue25263] test_tkinter fails randomly on the buildbots "AMD64 Windows10" (3.4, 3.5, 3.x)

2015-11-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The other failure is not Windows specific. It can be reproduced if run test_tk 
twice. FontTest.setUpClass() incorrectly call parent's method and the root 
attribute is set in parent class. tearDownClass() sets the root attribute to 
None in child class, and this overrides parent's attribute. The test in the 
second run passes self.root (is None) to font.Font constructor, and this is 
interpreted as no the root argument passed.

--

___
Python tracker 

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



[issue25583] os.makedirs with exist_ok=True raises PermissionError on Windows 7^

2015-11-10 Thread Martin Panter

Martin Panter added the comment:

It is good to add a regression test for any bug if it’s not too hard. Yes this 
is not a Windows-only issue, but I understand it is much simpler to produce 
with Windows. Otherwise you need a special file system setup and a more obscure 
OS.

Please review my patch. It would be good to confirm that the test fails on 
Windows if the fix is not applied. I have only tested this on Linux, and 
indirectly via Wine.

--
keywords: +patch
stage: needs patch -> patch review
Added file: http://bugs.python.org/file41008/makedirs-exist.patch

___
Python tracker 

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



[issue25498] Python 3.4.3 core dump with simple sample code

2015-11-10 Thread Martin Panter

Martin Panter added the comment:

I propose this patch, based on Eryksun’s patch (thanks Eryksun). New changes:

* Added test case
* Applied Serhiy’s review suggestion
* Changed the new BufferError exceptions back to TypeError to match previous 
behaviour and test cases

--
nosy: +eryksun
Added file: http://bugs.python.org/file41009/ctypes_from_buffer_3.patch

___
Python tracker 

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



[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2015-11-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The new buildbot edelsohn-sles-z is red from its setting at 19 Aug 2015. 
test_mhlib is the only failed test.

http://buildbot.python.org/all/builders/s390x%20SLES%202.7/builds/114/steps/test/logs/stdio
==
FAIL: test_listfolders (test.test_mhlib.MhlibTests)
--
Traceback (most recent call last):
  File 
"/home/dje/cpython-buildarea/2.7.edelsohn-sles-z/build/Lib/test/test_mhlib.py", 
line 185, in test_listfolders
eq(folders, tfolders)
AssertionError: Lists differ: [] != ['deep', 'deep/f1', 'deep/f2',...

Second list contains 6 additional elements.
First extra element 0:
deep

- []
+ ['deep', 'deep/f1', 'deep/f2', 'deep/f2/f3', 'inbox', 'wide']

--

I think we should fix this issue. Proposed patch adds a test that we can use 
nlinks for count a number of subdirectories.

--
keywords: +patch
nosy: +David.Edelsohn, serhiy.storchaka
status: closed -> open
versions:  -Python 2.6
Added file: http://bugs.python.org/file41010/mhlib_nlinks_2.patch

___
Python tracker 

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