[issue18383] test_warnings modifies warnings.filters when running with -W default

2015-04-04 Thread Berker Peksag

Berker Peksag added the comment:

issue18383_remove_dups.patch looks good to me. A test would be nice.

--
nosy: +berker.peksag

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



[issue23864] issubclass without registration only works for one-trick pony collections ABCs.

2015-04-04 Thread Jon Clements

Changes by Jon Clements jon...@googlemail.com:


--
nosy: +joncle

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



[issue23825] test_idle fails under -OO

2015-04-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 912719dd684f by Serhiy Storchaka in branch '2.7':
Issue #23825: Fixed test_idle under -OO.
https://hg.python.org/cpython/rev/912719dd684f

New changeset 657ebef5b291 by Serhiy Storchaka in branch '3.4':
Issue #23825: Fixed test_idle under -OO.
https://hg.python.org/cpython/rev/657ebef5b291

New changeset e6654af0fc93 by Serhiy Storchaka in branch 'default':
Issue #23825: Fixed test_idle under -OO.
https://hg.python.org/cpython/rev/e6654af0fc93

--
nosy: +python-dev

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



[issue23799] Join started threads in tests

2015-04-04 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
assignee:  - serhiy.storchaka
resolution:  - fixed
stage: patch review - resolved
status: open - closed

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



[issue23825] test_idle fails under -OO

2015-04-04 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
assignee:  - serhiy.storchaka
resolution:  - fixed
stage: commit review - resolved
status: open - closed

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



[issue22831] Use with to avoid possible fd leaks

2015-04-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ea94f6c87f5d by Serhiy Storchaka in branch 'default':
Issue #22831: Use with to avoid possible fd leaks.
https://hg.python.org/cpython/rev/ea94f6c87f5d

--
nosy: +python-dev

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



[issue15582] Enhance inspect.getdoc to follow inheritance chains

2015-04-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Changed test_enum to make buildbots green, but perhaps the docstring of Enum 
should be changed, because it now is used for all Enum subclasses that doesn't 
define a docstring explicitly. An alternative solution is to set __doc__ of 
Enum subclasses to an empty string if the docstring is not defined explicitly.

--

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



[issue23864] issubclass without registration only works for one-trick pony collections ABCs.

2015-04-04 Thread Martijn Pieters

New submission from Martijn Pieters:

The collections.abc documentation implies that *any* of the container ABCs can 
be used in an issubclass test against a class that implements all abstract 
methods:

 These ABCs allow us to ask classes or instances if they provide particular 
 functionality [...]

In reality this only applies to the One Trick Ponies (term from PEP 3119, 
things like Container and Iterable, those classes with one or two methods). It 
fails for the compound container ABCs:

 from collections.abc import Sequence, Container, Sized
 class MySequence(object):
... def __contains__(self, item): pass
... def __len__(self): pass
... def __iter__(self): pass
... def __getitem__(self, index): pass
... def __len__(self): pass
... 
 issubclass(MySequence, Container)
True
 issubclass(MySequence, Sized)
True
 issubclass(MySequence, Sequence)
False

That's because the One Trick Ponies implement a __subclasshook__ method that is 
locked to the specific class and returns NotImplemented for subclasses; for 
instance, the Iterable.__subclasshook__ implementation is:

@classmethod
def __subclasshook__(cls, C):
if cls is Iterable:
if any(__iter__ in B.__dict__ for B in C.__mro__):
return True
return NotImplemented

The compound container classes build on top of the One Trick Ponies, so the 
class test will fail, NotImplemented is returned and the normal ABC tests for 
base classes that have been explicitly registered continues, but this won't 
include unregistered complete implementations.

Either the compound classes need their own __subclasshook__ implementations, or 
the documentation needs to be updated to make it clear that without explicit 
registrations the issubclass() (and isinstance()) tests only apply to the One 
Trick Ponies.

--
assignee: docs@python
components: Documentation, Library (Lib)
messages: 240060
nosy: docs@python, mjpieters
priority: normal
severity: normal
status: open
title: issubclass without registration only works for one-trick pony 
collections ABCs.

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



[issue23338] PyErr_Format in ctypes uses invalid parameter

2015-04-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1f28c8cca671 by Serhiy Storchaka in branch '2.7':
Issue #23338: Fixed formatting ctypes error messages on Cygwin.
https://hg.python.org/cpython/rev/1f28c8cca671

New changeset 36eca0b259e2 by Serhiy Storchaka in branch '3.4':
Issue #23338: Fixed formatting ctypes error messages on Cygwin.
https://hg.python.org/cpython/rev/36eca0b259e2

New changeset 3eb3a6d45251 by Serhiy Storchaka in branch 'default':
Issue #23338: Fixed formatting ctypes error messages on Cygwin.
https://hg.python.org/cpython/rev/3eb3a6d45251

--
nosy: +python-dev

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



[issue23849] Leaks in test_deque

2015-04-04 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Thanks, I'll take a look.

--
assignee:  - rhettinger

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



[issue15582] Enhance inspect.getdoc to follow inheritance chains

2015-04-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 47a61a1c97b3 by Serhiy Storchaka in branch 'default':
Fixed test_enum for issue #15582.
https://hg.python.org/cpython/rev/47a61a1c97b3

--

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



[issue15133] tkinter.BooleanVar.get() behavior and docstring disagree

2015-04-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset dedf481ec2be by Serhiy Storchaka in branch '2.7':
Issue #15133: _tkinter.tkapp.getboolean() now supports long and Tcl_Obj and
https://hg.python.org/cpython/rev/dedf481ec2be

New changeset 117f45749359 by Serhiy Storchaka in branch '3.4':
Issue #15133: _tkinter.tkapp.getboolean() now supports Tcl_Obj and always
https://hg.python.org/cpython/rev/117f45749359

New changeset 38747f32fa7b by Serhiy Storchaka in branch 'default':
Issue #15133: _tkinter.tkapp.getboolean() now supports Tcl_Obj and always
https://hg.python.org/cpython/rev/38747f32fa7b

--
nosy: +python-dev

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



[issue18383] test_warnings modifies warnings.filters when running with -W default

2015-04-04 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
assignee:  - berker.peksag
stage: patch review - commit review

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



[issue23865] Fix possible leaks in close methods

2015-04-04 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Proposed patch fixes two related issues in a number of modules.

1. close() methods sometimes release multiple resources. Every closing 
operation can fail, but it shouldn't prevent releasing other resources. See for 
example issue21802.

2. close() should be idempotent. I.e. calling close() second times shouldn't 
have any effect. Even if close() failed, repeated call of close() (usually in 
__exit__(), in __del__(), or in finally block) shouldn't raise an exception.

Many close() methods already satisfy these conditions, but not all.

--
components: Library (Lib)
files: close.patch
keywords: patch
messages: 240063
nosy: serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Fix possible leaks in close methods
type: resource usage
versions: Python 2.7, Python 3.4, Python 3.5
Added file: http://bugs.python.org/file38829/close.patch

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



[issue23866] array module broken

2015-04-04 Thread Antoine Pitrou

New submission from Antoine Pitrou:

The array.array constructor has stopped working. I feel like this may be due to 
the latest Argument Clinic changes.

==
ERROR: test_create_from_bytes (test.test_array.ByteTest)
--
Traceback (most recent call last):
  File /home/antoine/cpython/default/Lib/test/test_array.py, line 1016, in 
test_create_from_bytes
a = array.array('H', b1234)
TypeError: a bytes-like object is required, not 'tuple'

--
components: Library (Lib)
messages: 240067
nosy: pitrou, serhiy.storchaka
priority: release blocker
severity: normal
status: open
title: array module broken
type: behavior
versions: Python 3.5

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



[issue23860] Failure to check return value from lseek() in Modules/mmapmodule.c

2015-04-04 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the patch, Bill. If you want to work on similar issues see also 
issue 15948.

--
components: +Extension Modules -Interpreter Core
nosy: +berker.peksag, haypo, serhiy.storchaka
stage:  - patch review
versions: +Python 3.5

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



[issue15948] Unchecked return value of I/O functions

2015-04-04 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
dependencies: +Failure to check return value from lseek() in 
Modules/mmapmodule.c

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



[issue23852] Wrong computation of max_fd on OpenBSD

2015-04-04 Thread Cédric Krier

Changes by Cédric Krier cedric.kr...@b2ck.com:


Removed file: http://bugs.python.org/file38828/max_fd.patch

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



[issue23640] Enum.from_bytes() is broken

2015-04-04 Thread Antoine Pitrou

Antoine Pitrou added the comment:

The fact that derived_int.from_bytes() doesn't call the derived constructor 
clearly sounds like a bug to me, regardless of whether IntEnum also has its own 
bugs.

--
nosy: +pitrou

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



[issue23861] Make stdprinter use DebugOutputString when no stdout/stderr available

2015-04-04 Thread Tim Golden

Tim Golden added the comment:

Are we talking about re-implementing StdPrinter in terms of 
OutputDebugString? (Either always, on Windows, or as a fallback?)

--

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



[issue23852] Wrong computation of max_fd on OpenBSD

2015-04-04 Thread Cédric Krier

Changes by Cédric Krier cedric.kr...@b2ck.com:


--
title: Wrong FD_DIR file name on OpenBSD - Wrong computation of max_fd on 
OpenBSD
Added file: http://bugs.python.org/file38828/max_fd.patch

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



[issue23864] issubclass without registration only works for one-trick pony collections ABCs.

2015-04-04 Thread Martijn Pieters

Martijn Pieters added the comment:

I should have added the mixin methods for the Sequence implementation; the more 
complete demonstration is:

 from collections.abc import Sequence, Container, Sized
 class MySequence(object):
... def __contains__(self, item): pass
... def __len__(self): pass
... def __iter__(self): pass
... def __getitem__(self, index): pass
... def __len__(self): pass
... def __reversed__(self): pass
... def index(self, item): pass
... def count(self, item): pass
... 
 issubclass(MySequence, Container)
True
 issubclass(MySequence, Sized)
True
 issubclass(MySequence, Sequence)
False

--

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



[issue23338] PyErr_Format in ctypes uses invalid parameter

2015-04-04 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
assignee:  - serhiy.storchaka
nosy: +serhiy.storchaka
versions: +Python 2.7

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



[issue10590] Parameter type error for xml.sax.parseString(string, ...)

2015-04-04 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


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

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



[issue23338] PyErr_Format in ctypes uses invalid parameter

2015-04-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you for your contribution Makoto.

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

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



[issue10590] Parameter type error for xml.sax.parseString(string, ...)

2015-04-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fca669149d8a by Serhiy Storchaka in branch 'default':
Issue #10590: xml.sax.parseString() now supports string argument.
https://hg.python.org/cpython/rev/fca669149d8a

--

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



[issue23640] Enum.from_bytes() is broken

2015-04-04 Thread Ethan Furman

Ethan Furman added the comment:

With the patch:

  -- import enum
  -- class Huh(enum.IntEnum):
  ...   blah = 2
  ...
  -- Huh.blah.from_bytes(b'\04', 'big')
  Traceback (most recent call last):
File stdin, line 1, in module
File /home/ethan/source/python/issue23640/Lib/enum.py, line 222, in 
__call__
  return cls.__new__(cls, value)
File /home/ethan/source/python/issue23640/Lib/enum.py, line 457, in 
__new__
  raise ValueError(%r is not a valid %s % (value, cls.__name__))
  ValueError: 4 is not a valid Huh

This is not the correct behavior.  An IntEnum should act like an int, and in 
cases where it can't and still be an IntEnum, it becomes an int.  But this 
behavior is Enum specific, and I would not expect other int subclasses to need 
or want that behavior.

Also, in cases where class methods are alternate constructors there is no 
requirement that they go through the main __new__/__init__ constructors to do 
their job.

In other words, if IntEnum.from_bytes (which is inherited) is not behaving 
correctly, it is up to IntEnum to fix it -- it is not the job of int, and this 
is not a bug in int.

--
assignee:  - ethan.furman

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



[issue23027] test_warnings fails with -Werror

2015-04-04 Thread Berker Peksag

Berker Peksag added the comment:

Here is a patch.

--
assignee:  - berker.peksag
keywords: +patch
stage: needs patch - patch review
Added file: http://bugs.python.org/file38827/issue23027.diff

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



[issue23027] test_warnings fails with -Werror

2015-04-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The patch fixes an error, but produces a warning about changed filters. The 
patch in issue18383 should fix it.

The patch LGTM, but I left one question on Rietveld.

--
dependencies: +test_warnings modifies warnings.filters when running with -W 
default
stage: patch review - commit review

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



[issue23857] Make default HTTPS certificate verification setting configurable via global ini file

2015-04-04 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I agree with Donald on all points. This shouldn't be done at the language level 
at all (why should it apply only to Python-written tools?). Having a 
centralized setting saying I relinquish security on HTTPS accesses sounds 
like a bad idea. And if this is solely for the support legacy systems 
business of some vendors, then it sounds like it may be close to Alex's post 
here :-)
https://alexgaynor.net/2015/mar/30/red-hat-open-source-community/

It's already possible to disable HTTPS certificate checking by using the right 
SSLContext options, at least with urllib and http.client.

--

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



[issue23864] issubclass without registration only works for one-trick pony collections ABCs.

2015-04-04 Thread Antti Haapala

Antti Haapala added the comment:

This does apply to all versions of Python from 2.6 up. Registering does work of 
course.

I believe the reason for not having the __subclasshook__ is the following 
sentence in PEP 3119: ABCs are intended to solve problems that don't have a 
good solution at all in Python 2, such as distinguishing between mappings and 
sequences.

This used to be worse in 3.3 because there if you ever inherit from `Sequence` 
you will always end up having `__dict__`, even if you just want `__slots__`.

(By the way, if Py2 documentation is fixed, it should also say that these ABCs 
are new as of 2.6, not since 2.4 like the rest of the collections module).

--
nosy: +ztane

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



[issue23866] array module broken

2015-04-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 973c9ec53bbb by Serhiy Storchaka in branch 'default':
Fixed the array module broken in issue #23492.
https://hg.python.org/cpython/rev/973c9ec53bbb

--
nosy: +python-dev

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



[issue23866] array module broken

2015-04-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Antoine. Fixed.

--
assignee:  - serhiy.storchaka
resolution:  - fixed
stage:  - resolved
status: open - closed

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



[issue23867] Argument Clinic: inline parsing code for 1-argument functions

2015-04-04 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Proposed patch makes Argument Clinic to inline parsing code for most popular 
formats in functions with single positional argument. This makes parsing faster.

--
components: Argument Clinic
files: clinic_meth_o_inline.patch
keywords: patch
messages: 240074
nosy: larry, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Argument Clinic: inline parsing code for 1-argument functions
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file38830/clinic_meth_o_inline.patch

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



[issue23852] Wrong computation of max_fd on OpenBSD

2015-04-04 Thread Cédric Krier

Cédric Krier added the comment:

But sysconf(_SC_OPEN_MAX) uses rlim_cur which is too low instead of rlim_max. 
My proposal is indeed describe in msg219477, it is not prefect but at least 
better than the current one for OpenBSD.

--

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



[issue23869] Initialization is being done in PyType_GenericAlloc

2015-04-04 Thread Hristo Venev

Changes by Hristo Venev hri...@venev.name:


--
components: +Interpreter Core
versions: +Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6

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



Re: How to set request module logging to certain level (python 3.4.2)

2015-04-04 Thread Ian Kelly
On Sat, Apr 4, 2015 at 9:21 AM, Dennis Lee Bieber wlfr...@ix.netcom.com wrote:
 On Sat, 4 Apr 2015 06:07:12 -0700 (PDT), zljubisic...@gmail.com declaimed
 the following:
 From requests module, I would like to log from error level above.


 Unless the requests module documents that is uses a logger named
 requests, you are likely stuck with having to adjust the level of the
 root (unnamed) logger.

You can include %(name)s in the format string to see the name of the
logger that was used.

 http://docs.python-requests.org/en/latest/api/?highlight=log

 implies the correct name to use for the logger is
 requests.packages.urllib3.

If that's the case, then configuring the requests logger should
work, since it's a hierarchical ancestor of
requests.packages.urllib3.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue23849] Leaks in test_deque

2015-04-04 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Looks like Benjamin had fixed this earlier today:
https://mail.python.org/pipermail/python-checkins/2015-April/135444.html

--
resolution:  - fixed
status: open - closed

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



[issue23852] Wrong computation of max_fd on OpenBSD

2015-04-04 Thread Stefan Krah

Stefan Krah added the comment:

Unfortunately I don't have an OpenBSD install either.  From the
sysconf.c source ...

  
http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/lib/libc/gen/sysconf.c?rev=1.22content-type=text/plain


... it seems that sysconf(_SC_OPEN_MAX) also calls getrlimit().

--

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



[issue23861] Make stdprinter use DebugOutputString when no stdout/stderr available

2015-04-04 Thread Steve Dower

Steve Dower added the comment:

There's just a couple of places to add calls to OutputDebugString, plus we need 
to make creation always succeed on Windows. Not a huge change - it'll still 
write to the standard stream if it's there.

--

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



[issue23869] Initialization is being done in PyType_GenericAlloc

2015-04-04 Thread Hristo Venev

New submission from Hristo Venev:

In PyType_GenericAlloc, the initialization is being done. Namely, the PyObject 
part of the object is initialized and it is tracked by the garbage collector.

In the documentation it is stated that tp_alloc should do no initialization.

--
messages: 240080
nosy: h.venev
priority: normal
severity: normal
status: open
title: Initialization is being done in PyType_GenericAlloc

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



[issue23849] Leaks in test_deque

2015-04-04 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Hmm, I don't see this on my build (Mac OS/X 10.10.2 clang-600.0.57):

$ ./python.exe -m test.regrtest -R 3:3:reflog test_deque
[1/1] test_deque
beginning 6 repetitions
123456
..
1 test OK.


Nor do I see any flux using the test_deque's down repeat loop:
$ ./python.exe Lib/test/test_deque.py
[178999, 178999, 178999, 178999, 178999] 
doctest (test.test_deque) ... 32 tests with zero failures

--

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



How to set request module logging to certain level (python 3.4.2)

2015-04-04 Thread zljubisicmob
Hi,

if I execute:

import logging, requests
logging.basicConfig(filename=obrisi.log, level=10, format='%(asctime)s 
%(levelname)s %(message)s',datefmt='%d.%m.%Y %H:%M:%S')
logging.getLogger('requests').setLevel(logging.ERROR)
url = 'http://radio.hrt.hr/prvi-program/arhiva/povijest-cetvrtkom/126/'
wpage = requests.get(url)

the obrisi.log has the following contents:

04.04.2015 13:40:23 INFO Starting new HTTP connection (1): radio.hrt.hr
04.04.2015 13:40:23 DEBUG GET /prvi-program/arhiva/povijest-cetvrtkom/126/ 
HTTP/1.1 200 None

From requests module, I would like to log from error level above.

How to achieve that (raspberry pi 2, osmc, python 3.4.2?

Regards.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue23492] Argument Clinic: improve generated parser for 1-argument functions

2015-04-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 973c9ec53bbb by Serhiy Storchaka in branch 'default':
Fixed the array module broken in issue #23492.
https://hg.python.org/cpython/rev/973c9ec53bbb

--

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



[issue23466] PEP 461: Inconsistency between str and bytes formatting of integers

2015-04-04 Thread Wolfgang Maier

Wolfgang Maier added the comment:

the new test:

test_exc('%x', '1', TypeError, %x format: a number is required, not str)

expects the wrong error message.

python -m unittest -v test.test_format

...
'%x' % '1' works? ... no
Unexpected  class 'TypeError' : '%x format: an integer is required, not str'
...

- it's an integer, not a number

--
nosy: +wolma

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



[issue23868] Uninitialized objects are tracked by the garbage collector

2015-04-04 Thread Hristo Venev

New submission from Hristo Venev:

An object starts being tracked by the GC after being allocated, but before 
being initialized. If during initialization the GC runs, this may lead to 
tp_traverse being called on an uninitialized object.

--
components: Interpreter Core
messages: 240079
nosy: h.venev
priority: normal
severity: normal
status: open
title: Uninitialized objects are tracked by the garbage collector
versions: Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6

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



[issue23863] Fix EINTR Socket Module issues in 2.7

2015-04-04 Thread Jeff McNeil

Jeff McNeil added the comment:

Whoops. Accidentally attached the wrong patch that I generated during testing.

--
Added file: http://bugs.python.org/file38832/socket_eintr.1.patch

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



[issue23466] PEP 461: Inconsistency between str and bytes formatting of integers

2015-04-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 11e6986c794d by Serhiy Storchaka in branch 'default':
Issue #23466: Fixed expected error message in test_format.
https://hg.python.org/cpython/rev/11e6986c794d

--

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



[issue23466] PEP 461: Inconsistency between str and bytes formatting of integers

2015-04-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Good catch, Wolfgang!

Definitely we should make test_format more unittest compatible.

--

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



[issue23852] Wrong computation of max_fd on OpenBSD

2015-04-04 Thread Cédric Krier

Cédric Krier added the comment:

Correctly cast to long instead of int.

--
Added file: http://bugs.python.org/file38831/max_fd.patch

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



Re: beautifulSoup 4.1

2015-04-04 Thread Joe Farro
Could use zip:

tds = iter(soup('td'))
for abbr, defn in zip(tds, tds):
print abbr.get_text(), defn.get_text()
-- 
https://mail.python.org/mailman/listinfo/python-list


OOP for System Administrator

2015-04-04 Thread pankaj sharma
Hi,

I'm a Linux system administrator and my work requires me to write bash scripts 
(100-500 lines) for process monitoring, server health check and automate some 
manual processes. Now I've started to learn python as I want to write scripts 
in python rather than bash or any shell.

My questions is Do I need to learn Object oriented Python in order to be good 
at python scripting. I know basics of OOP but personally didn't like it much.

Thanks
Pankaj
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue23874] Encrypted MSI fails to install with code 2755

2015-04-04 Thread Jason R. Coombs

Jason R. Coombs added the comment:

A search for EFS error code 2755 reveals others who have encountered this 
issue with other packages, so it's not unique to Python, though it may be 
something that Python might be able to address or may be unable to solve due to 
the required operations.

--

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



[issue23872] Typo in response in smtpd

2015-04-04 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
stage:  - commit review
versions: +Python 2.7, Python 3.4, Python 3.5

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



[issue20353] Hanging bug with multiprocessing + sqlite3 + tkinter (OS X 10.9 only)

2015-04-04 Thread Ned Deily

Ned Deily added the comment:

Arnon, what version of sqlite3 is the Python linked with?  Try:

python3.4 -c import sqlite3;print(sqlite3.sqlite_version)

What kind of database access is happening in your program, i.e. strictly 
multi-read, one writer many reads, multiple-writers?

Also, regarding the workaround, if you do call sqlite3.connect in the main 
process, check that you keep a reference to it (by assigning the result to a 
variable) so that the open connection doesn't get garbage-collected.

--

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



emacs for python web development

2015-04-04 Thread Sayth
Has anyone got a good configuration or advice for setting up a good python web 
development environment in emacs?

Sayth
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue23874] Encrypted MSI fails to install with code 2755

2015-04-04 Thread Jason R. Coombs

New submission from Jason R. Coombs:

When installing Python (3.4.3 or 2.7.9) from an EFS encrypted installer file, 
the installation proceeds normally through the target selection and feature 
selection, but then immediately reports /!\ The system cannot open the device 
or file specified, and aborts the installation with The installer has 
encountered an unexpected error installing this package. This may indicate a 
problem with the package. The error code is 2755.

Other MSI products install fine when the MSI is encrypted (pandoc, MongoDB), so 
there appears to be something unique about the Python installer that's failing 
when the Trusted Installer cannot read the MSI itself. Decrypting the MSI 
before installing works around the issue.

Environment: Windows 8.1 64-bit with Python 64-bit

--
components: Installation, Windows
messages: 240099
nosy: jason.coombs, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Encrypted MSI fails to install with code 2755
versions: Python 2.7, Python 3.4

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



Re: Python regex exercise

2015-04-04 Thread Vincent Davis
On Sat, Apr 4, 2015 at 5:51 PM, Thomas 'PointedEars' Lahn 
pointede...@web.de wrote:

  Do anyone have good links to python regex or other python problems for
  beginners but with solution.
 
  Please mail me.


​I recently found​ this
https://regex101.com/#python


Vincent Davis
720-301-3003
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue23873] Removal of dead code in smtpd

2015-04-04 Thread Hoolean

New submission from Hoolean:

Code was present that checked conditions that had previous been checked and had 
returned the function prematurely if the condition was true. As the condition 
has not changed before the check is made again, the condition will always be 
false and the code inside the if-statement will never be evaluated.

The attached patch removes unnecessary code.

--
components: Library (Lib)
files: correction.patch
keywords: patch
messages: 240098
nosy: Hoolean
priority: normal
severity: normal
status: open
title: Removal of dead code in smtpd
type: performance
Added file: http://bugs.python.org/file38836/correction.patch

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



[issue23841] py34 OrderedDict is using weakref for root reference

2015-04-04 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Antoine, I could use a second pair of eyes to see what is going on there.  It 
looks like an upstream __del__() method is trying to iterate over an 
OrderedDict that was already being shutdown (the hardroot link no longer 
exists).  That said, I don't see how the OD can be partially shutdown if the 
upstream code still has a reference to the OD in the adapters.

--
nosy: +eric.snow, pitrou

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



[issue20353] Hanging bug with multiprocessing + sqlite3 + tkinter (OS X 10.9 only)

2015-04-04 Thread Arnon Sela

Arnon Sela added the comment:

I ran into similar issue on OSX.  Multiprocessing system where processes issue 
sqlite3.connect().  Periodically it hangs.  
System is using Python 3.4.3 and sqlite3; it doesn't use tkinter 

Noticed the following:
1. This doesn't happen on Ubuntu
2. It happens even if URL is invalid - which means that it happens before 
referring to URL as DB.

Workaround didn't solve the problem. But it seems to reduce the frequency.  And 
unfortunately, the system is too large and complex for it to be sent.

I tried to set my environment to debug, but with no luck yet :)

Thanks,

--
nosy: +PyAcrisel

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



[issue19105] pprint doesn't use all width

2015-04-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6d9520e2223f by Serhiy Storchaka in branch 'default':
Updated pprint examples in according to issue #19105.
https://hg.python.org/cpython/rev/6d9520e2223f

--

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



Re: emacs for python web development

2015-04-04 Thread Ben Finney
Sayth flebber.c...@gmail.com writes:

 Has anyone got a good configuration or advice for setting up a good
 python web development environment in emacs?

You can start at the Python Wiki page on Emacs as an editor
URL:https://wiki.python.org/moin/EmacsEditor.

-- 
 \  “… a Microsoft Certified System Engineer is to information |
  `\ technology as a McDonalds Certified Food Specialist is to the |
_o__)   culinary arts.” —Michael Bacarella |
Ben Finney

-- 
https://mail.python.org/mailman/listinfo/python-list


[issue23640] Enum.from_bytes() is broken

2015-04-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This bug allows to create new bool instances.

 false = bool.from_bytes(b'\0', 'big')
 true = bool.from_bytes(b'\1', 'big')
 bool(false)
False
 bool(true)
True
 false is False
False
 true is True
False
 false
False
 true
False

--
priority: normal - high

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



[issue20192] pprint chokes on set containing frozenset

2015-04-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is reproducible on 2.7 example:

 import pprint, datetime, test.test_datetime
 naive = datetime.datetime.utcnow()
 aware = 
 datetime.datetime.utcnow().replace(tzinfo=test.test_datetime.FixedOffset(-300,
  EST, 1))
 pprint.pprint({naive, aware})
set([Traceback (most recent call last):
  File stdin, line 1, in module
  File /home/serhiy/py/cpython2.7/Lib/pprint.py, line 59, in pprint
printer.pprint(object)
  File /home/serhiy/py/cpython2.7/Lib/pprint.py, line 117, in pprint
self._format(object, self._stream, 0, 0, {}, 0)
  File /home/serhiy/py/cpython2.7/Lib/pprint.py, line 199, in _format
object = _sorted(object)
  File /home/serhiy/py/cpython2.7/Lib/pprint.py, line 82, in _sorted
return sorted(iterable)
TypeError: can't compare offset-naive and offset-aware datetimes
 pprint.pprint({naive: 'naive', aware: 'aware'})
Traceback (most recent call last):
  File stdin, line 1, in module
  File /home/serhiy/py/cpython2.7/Lib/pprint.py, line 59, in pprint
printer.pprint(object)
  File /home/serhiy/py/cpython2.7/Lib/pprint.py, line 117, in pprint
self._format(object, self._stream, 0, 0, {}, 0)
  File /home/serhiy/py/cpython2.7/Lib/pprint.py, line 140, in _format
rep = self._repr(object, context, level - 1)
  File /home/serhiy/py/cpython2.7/Lib/pprint.py, line 226, in _repr
self._depth, level)
  File /home/serhiy/py/cpython2.7/Lib/pprint.py, line 238, in format
return _safe_repr(object, context, maxlevels, level)
  File /home/serhiy/py/cpython2.7/Lib/pprint.py, line 280, in _safe_repr
for k, v in _sorted(object.items()):
  File /home/serhiy/py/cpython2.7/Lib/pprint.py, line 82, in _sorted
return sorted(iterable)
TypeError: can't compare offset-naive and offset-aware datetimes

--

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



[issue23870] pprint collections classes

2015-04-04 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Proposed patch adds support of all collections classes (except namedtuple) in 
pprint. It uses undocumented unstable private API. After implementing issue7434 
the code could be rewritten with using public stable well-designed API. One day 
in the womb of time.

But for now this patch allows to grope requirements to future API.

--
components: Library (Lib)
files: pprint_collections.patch
keywords: patch
messages: 240084
nosy: rhettinger, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: pprint collections classes
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file38833/pprint_collections.patch

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



Re: OOP for System Administrator

2015-04-04 Thread Michael Torrie
On 04/04/2015 09:56 AM, pankaj sharma wrote:
 I'm a Linux system administrator and my work requires me to write
 bash scripts (100-500 lines) for process monitoring, server health
 check and automate some manual processes. Now I've started to learn
 python as I want to write scripts in python rather than bash or any
 shell.
 
 My questions is Do I need to learn Object oriented Python in order to
 be good at python scripting. I know basics of OOP but personally
 didn't like it much.

Let me guess.  Your exposure to OOP comes from Java or C#?  Python's use
of OOP is very natural and powerful.  But you don't have to use OO
design in your programs.  So no you don't need to learn oo Python, just
learn and use Python, period.  As needed you can benefit from the strong
OO capabilities of Python without having to use that paradigm for your
own programs.

From a system programmer's point of view, other features of Python, like
generators are going to give you far more utility.  I recommend you take
a look at this presentation for how Python can fit in your work:

http://www.dabeaz.com/generators/

Note that while Python is a scripting language, it's not a shell
language. To interface with other processes, you'll have to use popen()
and connect to the standard pipes (in, out, err). It's not like bash
where any reference to a program in the path is executed and piped
automatically.  A long time  ago I wrote a little wrapper around popen()
to make it easier and faster to interact with unix commands.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue23790] When xdrlib.Packer().pack_string() fails, the Packer is corrupted

2015-04-04 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
status: open - pending

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



[issue23728] binascii.crc_hqx() can return negative integer

2015-04-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Nobody proposed a patch, so I do this.

--

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



[issue23728] binascii.crc_hqx() can return negative integer

2015-04-04 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
assignee:  - serhiy.storchaka
keywords: +patch
stage: needs patch - patch review
versions: +Python 3.4
Added file: http://bugs.python.org/file38834/binascii_crc_hqx_empty_data.patch

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



Re: How to set request module logging to certain level (python 3.4.2)

2015-04-04 Thread zljubisicmob
On Saturday, April 4, 2015 at 5:23:02 PM UTC+2, Dennis Lee Bieber wrote:

 implies the correct name to use for the logger is
 requests.packages.urllib3.

I have changed a script log_test.py. Now it looks like this:

#!/usr/bin/python3

import logging, requests
logging.basicConfig(filename=obrisi.log, level=10, format='%(asctime)s 
%(levelname)s %(message)s',datefmt='%d.%m.%Y %H:%M:%S')

logging.getLogger('requests.packages.urllib3').setLevel(logging.ERROR)

url = 'http://radio.hrt.hr/prvi-program/arhiva/povijest-cetvrtkom/126/'

def abc():
wpage = requests.get(url)


wpage = requests.get(url)
abc()

from linux shell I am running it as:

rm obrisi.log; ./log_test.py; cat obrisi.log

the output is:

04.04.2015 20:29:05 INFO Starting new HTTP connection (1): radio.hrt.hr
04.04.2015 20:29:05 DEBUG GET /prvi-program/arhiva/povijest-cetvrtkom/126/ 
HTTP/1.1 200 None
04.04.2015 20:29:05 INFO Starting new HTTP connection (1): radio.hrt.hr
04.04.2015 20:29:05 DEBUG GET /prvi-program/arhiva/povijest-cetvrtkom/126/ 
HTTP/1.1 200 None
o

As you can see, it still doesn't work.
I really don't get it. I am confused. :(

Regards.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue15133] tkinter.BooleanVar.get() behavior and docstring disagree

2015-04-04 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


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

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



[issue23863] Fix EINTR Socket Module issues in 2.7

2015-04-04 Thread Gregory P. Smith

Gregory P. Smith added the comment:

You may not be, but I am. :). Jeff is aware of PEP 475.

Thanks for the awesome work on the real cleanup of this stuff in 3.5.
Sanity at last.

--

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



[issue18383] test_warnings modifies warnings.filters when running with -W default

2015-04-04 Thread Martin Panter

Changes by Martin Panter vadmium...@gmail.com:


--
nosy: +vadmium

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



[issue23864] issubclass without registration only works for one-trick pony collections ABCs.

2015-04-04 Thread eryksun

eryksun added the comment:

Probably I'm overlooking something, but why isn't this hook defined 
cooperatively, with a terminating base class method that returns True? If the 
call chain progresses to the base, then all of the interfaces have been 
satisfied. Otherwise one of the bases returns NotImplemented. If it's 
implemented cooperatively, then the `cls is Iterable` check can be removed, 
because it returns super().__subclasshook__(C) instead of True.

--
nosy: +eryksun

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



[issue23860] Failure to check return value from lseek() in Modules/mmapmodule.c

2015-04-04 Thread Bill Parker

Bill Parker added the comment:

I would check 23855 as well, since the malloc() missing a sanity check,
which could be a more serious issue ..

On Sat, Apr 4, 2015 at 1:32 AM, Berker Peksag rep...@bugs.python.org
wrote:


 Berker Peksag added the comment:

 Thanks for the patch, Bill. If you want to work on similar issues see also
 issue 15948.

 --
 components: +Extension Modules -Interpreter Core
 nosy: +berker.peksag, haypo, serhiy.storchaka
 stage:  - patch review
 versions: +Python 3.5

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue23860
 ___


--

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



[issue23501] Argument Clinic: generate code into separate files by default

2015-04-04 Thread Mark Lawrence

Mark Lawrence added the comment:

I think this change in association with that in #23500 is causing builds to 
fail on Windows.

error C2065: 'OS_STAT_METHODDEF' : undeclared identifier
C:\cpython\Modules\posixmodule.c line 12083

--
nosy: +BreamoreBoy

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



[issue23501] Argument Clinic: generate code into separate files by default

2015-04-04 Thread Mark Lawrence

Mark Lawrence added the comment:

Serhiy, thank you for the quick fix :)

--

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



[issue23871] turning itertools.{repeat, count} into indexable iterables

2015-04-04 Thread Antony Lee

New submission from Antony Lee:

itertools.repeat and itertools.count could be made into indexable iterables 
(rather than iterators), rather than iterators, like range is right now.

--
components: Library (Lib)
messages: 240096
nosy: Antony.Lee
priority: normal
severity: normal
status: open
title: turning itertools.{repeat,count} into indexable iterables
versions: Python 3.5

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



[issue23501] Argument Clinic: generate code into separate files by default

2015-04-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Mark.

--

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



[issue23501] Argument Clinic: generate code into separate files by default

2015-04-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 17eb29faebde by Serhiy Storchaka in branch 'default':
Issue #23501: #include clinic/posixmodule.c.h was in the section skipped on 
Windows.
https://hg.python.org/cpython/rev/17eb29faebde

--

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



Re: How to set request module logging to certain level (python 3.4.2)

2015-04-04 Thread zljubisicmob
Looks like I have found (with your help) a solution.
Instead of:

logging.getLogger('requests.packages.urllib3').setLevel(logging.ERROR) 

the line should look like:

logging.getLogger('urllib3').setLevel(logging.ERROR) 

After changing the line, everything is OK.

Thank you all.

Regards.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: OOP for System Administrator

2015-04-04 Thread Emile van Sebille

On 4/4/2015 8:56 AM, pankaj sharma wrote:

Hi,

I'm a Linux system administrator and my work requires me to write bash scripts 
(100-500 lines) for process monitoring, server health check and automate some 
manual processes. Now I've started to learn python as I want to write scripts 
in python rather than bash or any shell.

My questions is Do I need to learn Object oriented Python in order to be good 
at python scripting. I know basics of OOP but personally didn't like it much.


Michael already responded to the oo question.  You might also find this 
helpful:


http://docs.linuxtone.org/ebooks/Python/OReilly.Python.for.Unix.and.Linux.System.Administration.Sep.2008.pdf

Emile


--
https://mail.python.org/mailman/listinfo/python-list


[issue23330] h2py.py regular expression missing

2015-04-04 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
assignee:  - serhiy.storchaka

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



[issue23863] Fix EINTR Socket Module issues in 2.7

2015-04-04 Thread STINNER Victor

STINNER Victor added the comment:

I have a very good news for you: this issue and more generally all EINTR
issues will be solved in Python 3.5. See the PEP 475.

I'm not really interested to fix Python 2.7.

--

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



MicroPython 1.4.1 released

2015-04-04 Thread Damien George
Hello everyone,

We are pleased to announce the release of MicroPython version 1.4.1!

MicroPython is an implementation of Python 3.4 which is optimised for
systems with minimal resources, including microcontrollers.

Since our last announcement, this release is both more micro and
more Python.

Code size of the bare Thumb2 architecture version has dropped to under
71k (without reduction of features), the RAM usage has been further
optimised, and support for 16-bit microcontrollers has been proven via
the port to a PIC microcontroller with just 8k RAM.

On the Python side of things, there is now a stackless mode with
both strict and non-strict behaviour.  Strict will always use the heap
to allocate a call frame, where non-strict will fall back to the C
stack if the heap is exhausted.  More special methods have been
implemented, along with proper descriptors, OrderedDict class, basic
frozen module support and the ability to override builtins, among
other things.

The test suite has grown and coverage of the code is now beyond 91%.

Many other features have been implemented for the ports to various
microcontroller platforms, bugs have been fixed and the docs have been
improved.  A full change log is available at
https://micropython.org/resources/micropython-ChangeLog.txt .

For more information about the project please visit
http://micropython.org/
https://github.com/micropython/micropython

Best regards,
Damien George.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue23872] Typo in response in smtpd

2015-04-04 Thread Hoolean

New submission from Hoolean:

A spelling mistake is present: in all other instances in the class, the string 
is ' [SP mail-parameters]', yet at this line it is [incorrectly] ' [SP mail 
parameters]', missing a '-' and a '' character.

I have attached a patch correcting this.

--
components: Library (Lib)
files: correction.patch
keywords: patch
messages: 240097
nosy: Hoolean
priority: normal
severity: normal
status: open
title: Typo in response in smtpd
type: behavior
Added file: http://bugs.python.org/file38835/correction.patch

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



Re: Python regex exercise

2015-04-04 Thread Thomas 'PointedEars' Lahn
Robert Clove wrote:

 Do anyone have good links to python regex or other python problems for
 beginners but with solution.
 
 Please mail me.

http://www.catb.org/~esr/faqs/smart-questions.html#writewell
http://www.catb.org/~esr/faqs/smart-questions.html#prune
http://www.catb.org/~esr/faqs/smart-questions.html#noprivate

-- 
PointedEars

Twitter: @PointedEars2
Please do not cc me. / Bitte keine Kopien per E-Mail.
-- 
https://mail.python.org/mailman/listinfo/python-list