[issue21579] Python 3.4: tempfile.close attribute does not work

2015-12-30 Thread Eryk Sun

Eryk Sun added the comment:

For anyone interested, this issue is solvable on Windows by working around how 
O_TEMPORARY is implemented. To do this the _winapi module would need a wrapper 
for SetFileInformationByHandle (available in Vista+), which would need to 
support at least FileDispositionInfo. 

That said, the use case of replacing a file is better supported by calling the 
Windows API function ReplaceFile anyway. It isn't atomic, however. I don't 
think that's possible in general on Windows. The problem is that, unlike on 
Unix, an open file on Windows can't be anonymous. So if the replaced file is 
already open, it has to first be renamed before the replacement file can take 
its place. That creates a small window for things to go wrong.

--

___
Python tracker 

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



[issue24505] shutil.which wrong result on Windows

2015-12-30 Thread Toby Tobkin

Toby Tobkin added the comment:

Patch incorporating Eryk Sun's feedback for various Windows-specific behavior 
attached.

--
Added file: http://bugs.python.org/file41459/issue-24505-proposed-patch-2.diff

___
Python tracker 

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



[issue25981] Intern namedtuple field names

2015-12-30 Thread Raymond Hettinger

Changes by Raymond Hettinger :


Added file: http://bugs.python.org/file41458/show_all_fieldnames_interned2.py

___
Python tracker 

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



[issue25981] Intern namedtuple field names

2015-12-30 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I don't see how the proposed patch would affect the result.  ISTM that the 
interning would have to happen after the template substitution and exec.  See 
the attached alternate patch.

That said, I'm not too concerned with the contents of _fields not being 
interned.  It isn't the performance sensitive part of the code.

--
Added file: http://bugs.python.org/file41457/alternate_namedtuple_intern.patch

___
Python tracker 

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



[issue25822] Add docstrings to fields of urllib.parse results

2015-12-30 Thread Swati Jaiswal

Changes by Swati Jaiswal :


Added file: http://bugs.python.org/file41456/iss_25822_4.patch

___
Python tracker 

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



[issue25981] Intern namedtuple field names

2015-12-30 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Indeed, keys of __dict__ are interned. But elements of _fields are not.

>>> A = namedtuple('A', 'abc123 def456')
>>> sorted(A.__dict__)[-1] == A._fields[-1]
True
>>> sorted(A.__dict__)[-1] is A._fields[-1]
False

--

___
Python tracker 

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



[issue25981] Intern namedtuple field names

2015-12-30 Thread Raymond Hettinger

Changes by Raymond Hettinger :


Added file: http://bugs.python.org/file41455/show_all_fieldnames_interned.py

___
Python tracker 

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



[issue25982] multiprocessing docs for Namespace lacks class definition

2015-12-30 Thread Davin Potts

New submission from Davin Potts:

In the docs, references to :class:`Namespace` can not be matched by Sphinx to 
any class definition because there isn't one in the doc.  It should be placed 
in the "Namespace objects" subsection and the initial descriptive para moved 
inside to describe it.

This is mostly a reminder to myself to make this quick fix.

--
assignee: davin
messages: 257245
nosy: davin
priority: low
severity: normal
stage: needs patch
status: open
title: multiprocessing docs for Namespace lacks class definition
type: enhancement
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue25981] Intern namedtuple field names

2015-12-30 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Doesn't interning happen already as a byproduct of the exec?

--

___
Python tracker 

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



[issue25746] test_unittest failure in leaks searching mode

2015-12-30 Thread Ezio Melotti

Changes by Ezio Melotti :


--
stage:  -> needs patch

___
Python tracker 

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



[issue25687] Error during test case and tearDown

2015-12-30 Thread Ezio Melotti

Ezio Melotti added the comment:

This happens because TestCase.run (Lib/unittest/case.py:595) runs 
setUp/test/tearDown in 3 separate testPartExecutor context manager  
(Lib/unittest/case.py:54).  testPartExecutor appends any error to self.errors 
(Lib/unittest/case.py:72) and TextTestRunner.run simply reports the total 
number of errors Lib/unittest/runner.py:204).
If an error happens in the setUp, the test and tearDown are not executed, but 
if it happens in the test, the tearDown is still executed, possibly appending a 
second error to self.errors.

I don't see any easy way to fix this, since both errors should stay in 
self.errors and be reported, so removing one is not an option.  Trying to 
determine if 2 errors are related to a single test/tearDown pair in the 
TestRunner might be possible, but probably not worth it.

Adding a sentence to the doc and possibly a comment in TestCase.run to document 
this corner case is probably enough.

--
keywords: +easy
stage:  -> needs patch
versions:  -Python 3.4

___
Python tracker 

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



[issue25463] 2.7.10 glibc double free detected

2015-12-30 Thread William D Colburn

William D Colburn added the comment:

I tried the test with Python 2.7.11, and it still crashes.

--
Added file: http://bugs.python.org/file41454/debug.sh

___
Python tracker 

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



[issue21815] imaplib truncates some untagged responses

2015-12-30 Thread Maciej Szulik

Maciej Szulik added the comment:

I was looking for that but I missed the Stage field, thanks David will remember 
for the future :)

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



[issue25813] co_flags section of inspect module docs out of date

2015-12-30 Thread Mark Lawrence

Mark Lawrence added the comment:

Anybody?

--

___
Python tracker 

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



[issue25802] Finish deprecating load_module()

2015-12-30 Thread Brett Cannon

Brett Cannon added the comment:

Here is my attempt at adding an Examples section to the importlib docs. I cover 
importlib.util.find_spec(), importlib.import_module(), how to import a module 
by file path, and give an approximate import implementation for illustrative 
purposes.

--
keywords: +patch
Added file: http://bugs.python.org/file41453/issue25802.diff

___
Python tracker 

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



[issue25981] Intern namedtuple field names

2015-12-30 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

If intern field names in namedtuple, this will speed up the access to them, 
because names could be compared just by identity in dict lookup. This can also 
make pickles containing namedtuples more compact.

--
assignee: rhettinger
components: Library (Lib)
files: namedtuple_intern_field_names.patch
keywords: patch
messages: 257238
nosy: rhettinger, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Intern namedtuple field names
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file41452/namedtuple_intern_field_names.patch

___
Python tracker 

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



[issue25822] Add docstrings to fields of urllib.parse results

2015-12-30 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Could you please also add docstrings for _DefragResultBase?

I agree that there is no need to write tests.

--

___
Python tracker 

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



[issue25961] Disallow the null character in type name

2015-12-30 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



[issue25961] Disallow the null character in type name

2015-12-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 29cc6b2f9d28 by Serhiy Storchaka in branch '2.7':
Issue #25961: Disallowed null characters in the type name.
https://hg.python.org/cpython/rev/29cc6b2f9d28

New changeset d2417971c934 by Serhiy Storchaka in branch '3.5':
Issue #25961: Disallowed null characters in the type name.
https://hg.python.org/cpython/rev/d2417971c934

New changeset 1ab7bcd4e176 by Serhiy Storchaka in branch 'default':
Issue #25961: Disallowed null characters in the type name.
https://hg.python.org/cpython/rev/1ab7bcd4e176

--
nosy: +python-dev

___
Python tracker 

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



[issue22995] Restrict default pickleability

2015-12-30 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

That's all with this issue.

Analyzing the signature of __new__ is not such easy and perhaps will be done in 
separate issue.

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



[issue22995] Restrict default pickleability

2015-12-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 92172d7372dd by Serhiy Storchaka in branch '2.7':
Issue #22995: Instances of extension types with a state that aren't
https://hg.python.org/cpython/rev/92172d7372dd

--

___
Python tracker 

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



[issue21579] Python 3.4: tempfile.close attribute does not work

2015-12-30 Thread Марк Коренберг

Changes by Марк Коренберг :


--
resolution:  -> wont fix
status: open -> closed

___
Python tracker 

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



[issue25980] not able to find module request in lib urllib - Python35-32

2015-12-30 Thread Brett Cannon

Brett Cannon added the comment:

You need to use the line `import urllib.request` to make the import work as you 
didn't import the urllib.request module, only the urllib package.

--
nosy: +brett.cannon
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



[issue25980] not able to find module request in lib urllib - Python35-32

2015-12-30 Thread R. David Murray

R. David Murray added the comment:

Can you provide a link to the documentation you find to be in error?

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



[issue16731] xxlimited/xxmodule docstrings ambiguous

2015-12-30 Thread Daniel Shahaf

Daniel Shahaf added the comment:

I don't mind at all.  Go ahead :)

--

___
Python tracker 

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



[issue25980] not able to find module request in lib urllib - Python35-32

2015-12-30 Thread Kiran Kotari

New submission from Kiran Kotari:

Python 3.5.1 documentation code giving following error:

Error: 
Traceback (most recent call last):
  File ".\urllib1.py", line 5, in 
with urllib.request.urlopen('http://www.py4inf.com/code/romeo.txt') as f:
AttributeError: module 'urllib' has no attribute 'request'

Python Code:

import urllib
with urllib.request.urlopen('http://www.py4inf.com/code/romeo.txt') as f:
print(f.read())

--
components: Library (Lib)
messages: 257230
nosy: Kiran Kotari
priority: normal
severity: normal
status: open
title: not able to find module request in lib urllib - Python35-32
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