[issue17128] OS X system openssl deprecated - installer should build local libssl

2013-02-08 Thread Ned Deily

Ned Deily added the comment:

After spending some time on this, I'm downgrading this from release blocker 
status.  First, no one has yet identified any immediate need for openssl 1.0.x 
features to support possible PyPI enhancements, which was my original concern.  
Second, since the openssl build system does not support OS X universal builds 
or SDKs and is not autoconf-based, it does not fit well into the current OS X 
installer build process.  I have a working first cut of building the libs but 
there is more to do.  Third, there is the open issue of how to make root certs 
available.  Ronald, I'm probably missing something obvious here but I don't see 
which Apple patch you are referring to.  Can you elaborate?

There is also the issue of government export restrictions that seems to always 
come up with crypto software.  AFAICT, as of a couple of years ago, there is no 
longer any restriction on shipping openssl binaries with any encryption 
algorithm from the US to any other country.  There are still a few well-known 
patent issue which seem easy to avoid.  But I am not a lawyer.
 
Unless someone objects, I'm going to treat this as a new feature for now and, 
once ready, we can re-examine backporting.

--
priority: release blocker - high
versions:  -Python 2.7, Python 3.2, Python 3.3

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



[issue17156] Tools/i18n/pygettext.py doesn't parse unicode string.

2013-02-08 Thread Serhiy Storchaka

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


Removed file: http://bugs.python.org/file28992/pygettext.py.patch

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



[issue4331] Can't use _functools.partial() created function as method

2013-02-08 Thread Ramchandra Apte

Changes by Ramchandra Apte maniandra...@gmail.com:


--
versions: +Python 3.3, Python 3.4 -Python 3.0

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



[issue17128] OS X system openssl deprecated - installer should build local libssl

2013-02-08 Thread Ronald Oussoren

Ronald Oussoren added the comment:

See also: issue 15740


A version of OpenSSL as included in some versions of OSX can be downloaded from 
http://opensource.apple.com/tarballs/OpenSSL098/, as mentioned in issue 15740 
the versions as included in the most recent OS updates doesn't seem to be there.

I've downloaded OpenSSL098-35.1 and that includes files 
./src/crypto/x509/x509_vfy_apple.h and ./src/crypto/x509/x509_vfy_apple.c which 
implement the behavior I mentioned earlier: first try to verify using the 
default OpenSSL mechanism, then verify using the TrustEvaluationAgent. 

Now that I look at that code again: we can't extract that code and use it to 
patch upstream OpenSSL, the TrustEvaluationAgent framework is a private 
framework and hence off limits.

It is probably possible to reimplement the same feature using public APIs, but 
that's new development and should be off-limits for a bugfix release (and isn't 
something that can be done very soon without risking to introduce new bugs in 
security-related code).

Direct link to the source code I mentioned: 
http://opensource.apple.com/source/OpenSSL098/OpenSSL098-32/src/crypto/x509/x509_vfy_apple.c,
 
http://opensource.apple.com/source/OpenSSL098/OpenSSL098-32/src/crypto/x509/x509_vfy_apple.h


A blog about this feature by the one of the curl developers: 
http://daniel.haxx.se/blog/2011/11/05/apples-modified-ca-cert-handling-and-curl/


P.S. Apple doesn't exactly make it easy to find this information.

--

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



[issue11448] docs for HTTPConnection.set_tunnel are ambiguous

2013-02-08 Thread Michael Stahn

Michael Stahn added the comment:

I thought the same as Ryan when reading the API. The best way would have been 
to call set_tunnel - set_proxy and to implement the behaviour you expect 
on this: setting a proxy. There are some more places at this code which are not 
quite clear eg:

def putheader(self, header, *values):
  Send a request header line to the server.

Here the methodname putheader is ok but the documentation is misleading: this 
just adds a new header-line to the buffer, it won't send it directly. But 
that's the problem with naming in APIs: once it's in the code you won't get it 
changed that fast..

--
nosy: +m1kes

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



[issue17153] tarfile extract fails when Unicode in pathname

2013-02-08 Thread Hynek Schlawack

Changes by Hynek Schlawack h...@ox.cx:


--
nosy: +hynek

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



[issue17156] Tools/i18n/pygettext.py doesn't parse unicode string.

2013-02-08 Thread Serhiy Storchaka

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


--
assignee:  - serhiy.storchaka
nosy: +serhiy.storchaka

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



[issue17149] random.vonmisesvariate() results range is inconsistent for small and not small kappa

2013-02-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Sorry, I was wrong. I missed that z is in range -1..1. Original report is 
invalid, random.vonmisesvariate() always returns a value on the full circle.

However there is some inconsistency. For small kappa (= 1e-6) result range is 
0 to 2pi, for other kappa it is (mu%2pi)-pi to (mu%2pi)+pi. For consistency we 
should either shift a range for small kappa:

if kappa = 1e-6:
return (mu % TWOPI) - _pi + TWOPI * random()

or normalize a result in another case:

if u3  0.5:
theta = (mu + _acos(f)) % TWOPI
else:
theta = (mu - _acos(f)) % TWOPI

--
title: random.vonmisesvariate() returns a value only on the half-circle - 
random.vonmisesvariate() results range is inconsistent for small and not small 
kappa

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



[issue14516] test_tools assumes BUILDDIR=SRCDIR

2013-02-08 Thread Ronald Oussoren

Ronald Oussoren added the comment:

I've closed the issue because I can no longer reproduce the issue, the 
changesets mentioned by Ned have fixed the problem.

--
status: pending - closed

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



[issue17156] Tools/i18n/pygettext.py doesn't parse unicode string.

2013-02-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch for 3.x, which correctly detects input file encoding and 
correctly escapes non-ascii output files if -E specified (and only if it 
specified).

For 2.7 we should just negate an argument for make_escapes.

--
components: +Unicode
nosy: +ezio.melotti, loewis
stage:  - patch review
versions: +Python 3.3, Python 3.4
Added file: http://bugs.python.org/file29001/pygettext_unicode.patch

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



[issue17156] Tools/i18n/pygettext.py doesn't parse unicode string.

2013-02-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch for 2.7. pygettext doesn't try to detect input encoding and 
transparently works with bytes, but it no longer escapes non-ascii bytes if -E 
is not specified.

--
versions: +Python 2.7
Added file: http://bugs.python.org/file29002/pygettext_unicode-2.7.patch

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



[issue17116] xml.parsers.expat.(errors|model) don't set the __loader__ attribute

2013-02-08 Thread Brett Cannon

Changes by Brett Cannon br...@python.org:


--
dependencies: +__loader__ = None should be fine

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



[issue17157] issubclass should accept iterables

2013-02-08 Thread Ramchandra Apte

Changes by Ramchandra Apte maniandra...@gmail.com:


--
nosy: kushou, ramchandra.apte
priority: normal
severity: normal
status: open
title: issubclass should accept iterables
type: enhancement
versions: Python 3.3, Python 3.4

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



[issue17157] issubclass should accept iterables

2013-02-08 Thread Ramchandra Apte

Changes by Ramchandra Apte maniandra...@gmail.com:


--
components: +Interpreter Core

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



[issue17157] issubclass should accept iterables

2013-02-08 Thread Ramchandra Apte

New submission from Ramchandra Apte:

kushou pointed this out on #python-dev

--

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



[issue17157] issubclass() should accept iterables in 2nd arg

2013-02-08 Thread Ramchandra Apte

Changes by Ramchandra Apte maniandra...@gmail.com:


--
title: issubclass should accept iterables - issubclass() should accept 
iterables in 2nd arg

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



[issue17157] issubclass() should accept iterables in 2nd arg

2013-02-08 Thread Ramchandra Apte

Changes by Ramchandra Apte maniandra...@gmail.com:


--
status: open - languishing

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



[issue17157] issubclass() should accept iterables in 2nd arg

2013-02-08 Thread Ramchandra Apte

Changes by Ramchandra Apte maniandra...@gmail.com:


--
status: languishing - open

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



[issue17158] help() module searcher text improvement

2013-02-08 Thread Ramchandra Apte

New submission from Ramchandra Apte:

help(modules spam) prints out Here is a list of matching modules.  Enter any 
module name to get more help. before it has even found the modules. This gives 
the impression that it has found the modules yet it hasn't printed the modules 
yet. I would suggest that it prints Searching for the matching modules... 
without the newline and then once the matching modules have been found prints 
done. (End result will have Searching for the matchine modules... done. 
Then it should print Here is a list of matching modules. Enter any ...

--
components: Interpreter Core
messages: 181671
nosy: ramchandra.apte
priority: normal
severity: normal
status: open
title: help() module searcher text improvement
type: enhancement
versions: Python 3.3, Python 3.4

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



[issue17158] help() module searcher text is misleading

2013-02-08 Thread Ramchandra Apte

Changes by Ramchandra Apte maniandra...@gmail.com:


--
title: help() module searcher text improvement - help() module searcher text 
is misleading

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



[issue17157] issubclass() should accept iterables in 2nd arg

2013-02-08 Thread Mark Dickinson

Mark Dickinson added the comment:

What's the use case for this?  issubclass already accept tuples, just like 
isinstance:

 issubclass(bool, (int, float))
True

--
nosy: +mark.dickinson
versions:  -Python 3.3

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



[issue17149] random.vonmisesvariate() results range is inconsistent for small and not small kappa

2013-02-08 Thread Mark Dickinson

Mark Dickinson added the comment:

Agreed that this seems inconsistent.  The current normalization for non-small 
kappa is a little odd:  e.g, if mu is small and negative (-0.01, say), then we 
get a range that goes roughly from pi to 3*pi, when a range from -pi to pi 
would have made more sense.

Any of (1) returning values in the range [mu - pi, mu+pi], (2) returning values 
in the range [-pi, pi], or (3) returning values in the range [0, 2*pi] would 
seem reasonable.

Unassigning (the original problem is solved by not being there!)

--
assignee: mark.dickinson - 

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



[issue17159] Remove explicit type check from inspect.Signature.from_function()

2013-02-08 Thread Stefan Behnel

New submission from Stefan Behnel:

I can't see a reason why Signature.from_function() should explicitly check the 
type of the object being passed in. As long as the object has all required 
attributes, it should be accepted.

This is specifically an issue with Cython compiled functions, which are not 
Python functions but look the same.

--
components: Library (Lib)
messages: 181674
nosy: scoder
priority: normal
severity: normal
status: open
title: Remove explicit type check from inspect.Signature.from_function()
type: behavior
versions: Python 3.3, Python 3.4

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



[issue15580] fix True/False/None reST markup

2013-02-08 Thread Zearin

Zearin added the comment:

I agree that globally linking all occurrences of True/False/None is overkill. 

Perhaps linking the first occurrence per webpage would be a good standard?



However, I *strongly* believe that:

1. The words be capitalized
2. The words should be marked up as ``True``, ``False``, or ``None``

Of course, these two items only apply when appropriate.  But after attempting 
this myself in #17074, I can say with certainty that this is the case *most of 
the time*.

--

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



[issue17159] Remove explicit type check from inspect.Signature.from_function()

2013-02-08 Thread Stefan Behnel

Stefan Behnel added the comment:

This patch removes the type check from Signature.from_function() and cleans up 
the type tests in signature() to use whatever the inspect module defines as 
isfunction() and isbuiltin(), so that it becomes properly monkey-patchable.

It also adds a test that makes sure the signature relies only on the four 
relevant special attributes, not on the type of the object being inspected.

--
keywords: +patch
nosy: +benjamin.peterson, ncoghlan
Added file: http://bugs.python.org/file29003/inspect_sig.patch

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



[issue17159] Remove explicit type check from inspect.Signature.from_function()

2013-02-08 Thread Éric Araujo

Éric Araujo added the comment:

Patch looks good, but I’m worried about the change from TypeError to 
AttributeError in a stable version.

Could you also make clear that all function-like objects are accepted in the 
doc?

--
nosy: +eric.araujo

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



[issue17159] Remove explicit type check from inspect.Signature.from_function()

2013-02-08 Thread Stefan Behnel

Stefan Behnel added the comment:

The method doesn't seem to be documented, and I'm not sure if the docstring 
really benefits from this lengthy addition. Anyway, here's a patch that 
includes the docstring update.

The exception could be kept the same if we catch an AttributeError and 
explicitly raise a TypeError instead.

--
Added file: http://bugs.python.org/file29004/inspect_sig_with_docstring.patch

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



[issue4483] Error to build _dbm module during make

2013-02-08 Thread ddve...@ucar.edu

ddve...@ucar.edu added the comment:

This is still an issue in Python 2.7.3 but there is a quick manual workaround. 
I know it's trivial and one can easily develop it from what is said in the 
thread or maybe looking at the patches, but for reference this is a nice recipe 
as oppose to digging through many messages

1) build as usual, but redirect the output/error stream in a file, for example 
if your shell is bash (I find this to always be a good idea):

make  make.log 21

2) Towards the end of make.log there will be the following message. If you 
don't see this message, you don't have this problem, but possibly a different 
one:

Failed to build these modules:
dbm


3) execute
grep \-o .*/dbmmodule.o make.log

This will find a compiler line. Cut, paste and and execute that command

4) grep \-o .*/dbm.so make.log

This will find another compiler line. Cut, paste and and execute that command, 
ADDING (this is essential) -lgdbm_compat

5) (optional) you may want to remove dbm_failed.so (in the same directory where 
the previous bullet creates dbm.so)

--
nosy: +ddve...@ucar.edu

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



[issue15580] fix True/False/None reST markup

2013-02-08 Thread R. David Murray

R. David Murray added the comment:

They should be capitalized and marked up as code if they refer to the objects.  
If they refer only to (to use bad english) the truthiness or falsiness of the 
value in question, then they should be lower case and not marked up as code.  
Quickly scanning the start of the patch in 17074, about half the changes to 
true/false markup were incorrect.

Ideally we should never have True unless it is marked up as ``True`` (same for 
False), but there are *many* cases in the docs where true or false is correct.  
My guess would be that those cases outnumber the cases where ``True`` or 
``False`` is correct, but I haven't tried to measure :)

--

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



[issue17047] Fix double double words words

2013-02-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

 I cannot find python-gdb.py.

This is a copy of Tools/gdb/libpython.py.

--

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



[issue17160] test_urllib2net fails

2013-02-08 Thread ddve...@ucar.edu

New submission from ddve...@ucar.edu:

test_urllib2net fails as follows. Looking at test_urllib2net.py line 165 does 
not reveal anything interesting to me

./python Lib/test/regrtest.py -uall -v test_urllib2net
== CPython 2.7.3 (default, Feb 8 2013, 08:28:21) [GCC 4.7.2]
==   Linux-2.6.32-220.13.1.el6.x86_64-x86_64-with-redhat-6.2-Santiago 
little-endian
==   /glade/scratch/ddvento/build/Python-2.7.3-westmere/build/test_python_7544
Testing with flags: sys.flags(debug=0, py3k_warning=0, division_warning=0, 
division_new=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, 
no_user_site=0, no_site=0, ignore_environment=0, tabcheck=0, verbose=0, 
unicode=0, bytes_warning=0, hash_randomization=0)
test_urllib2net
test_custom_headers (test.test_urllib2net.OtherNetworkTests) ... ok
test_file (test.test_urllib2net.OtherNetworkTests) ... ok
test_fileno (test.test_urllib2net.OtherNetworkTests) ... ok
test_ftp (test.test_urllib2net.OtherNetworkTests) ... ok
test_sites_no_connection_close (test.test_urllib2net.OtherNetworkTests) ... ok
test_urlwithfrag (test.test_urllib2net.OtherNetworkTests) ... FAIL
test_close (test.test_urllib2net.CloseSocketTest) ... ok
test_ftp_basic (test.test_urllib2net.TimeoutTest) ... ok
test_ftp_default_timeout (test.test_urllib2net.TimeoutTest) ... ok
test_ftp_no_timeout (test.test_urllib2net.TimeoutTest) ... ok
test_ftp_timeout (test.test_urllib2net.TimeoutTest) ... ok
test_http_basic (test.test_urllib2net.TimeoutTest) ... ok
test_http_default_timeout (test.test_urllib2net.TimeoutTest) ... ok
test_http_no_timeout (test.test_urllib2net.TimeoutTest) ... ok
test_http_timeout (test.test_urllib2net.TimeoutTest) ... ok

==
FAIL: test_urlwithfrag (test.test_urllib2net.OtherNetworkTests)
--
Traceback (most recent call last):
  File 
/glade/scratch/ddvento/build/Python-2.7.3-westmere/Lib/test/test_urllib2net.py,
 line 165, in test_urlwithfrag
http://docs.python.org/glossary.html#glossary;)
AssertionError: 'http://docs.python.org/2/glossary.html' != 
'http://docs.python.org/glossary.html#glossary'

--
Ran 15 tests in 14.684s

FAILED (failures=1)
test test_urllib2net failed -- Traceback (most recent call last):
  File 
/glade/scratch/ddvento/build/Python-2.7.3-westmere/Lib/test/test_urllib2net.py,
 line 165, in test_urlwithfrag
http://docs.python.org/glossary.html#glossary;)
AssertionError: 'http://docs.python.org/2/glossary.html' != 
'http://docs.python.org/glossary.html#glossary'

1 test failed:
test_urllib2net

--
components: Tests
messages: 181682
nosy: ddve...@ucar.edu
priority: normal
severity: normal
status: open
title: test_urllib2net fails
versions: Python 2.7

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



[issue17160] test_urllib2net fails

2013-02-08 Thread R. David Murray

R. David Murray added the comment:

It passes on all our buildbots, and for me locally.  Is it possible there is a 
proxy server between you and python.org that is changing the url returned?

--
nosy: +r.david.murray

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



[issue17161] make install misses the man and the static library

2013-02-08 Thread ddve...@ucar.edu

New submission from ddve...@ucar.edu:

This is for python 2.7.3 built with 

0) ./configure --enable-shared --with-system-expat

1) I need both static and shared object, however libpython2.7.a is not copied 
in the installation target lib. Is this on purpose, or am I missing a flag in 
configure?

2) In share/man/man1/ there are two issues:
2a) the manual is for 2.7.1 instead of 2.7.3
2b) the man command looks for a python.1 file, therefore one must issue:
ln -s python2.7.1 python.1

--
components: Installation
messages: 181684
nosy: ddve...@ucar.edu
priority: normal
severity: normal
status: open
title: make install misses the man and the static library
versions: Python 2.7

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



[issue17160] test_urllib2net fails

2013-02-08 Thread ddve...@ucar.edu

ddve...@ucar.edu added the comment:

Yes, it is possible, do you want me to investigate more with my network 
people?

--

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



[issue17161] make install misses the man and the static library

2013-02-08 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
nosy: +eric.araujo

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



[issue17160] test_urllib2net fails

2013-02-08 Thread R. David Murray

R. David Murray added the comment:

I think only if you want to.  As far as we are concerned the test is correct 
and passing.  (And this kind of thing is the reason that that test set is only 
run when -uall is specified.)

I'm going to close the issue.  If you do investigate, and feel that you've 
found a real bug, please reopen it.

--
resolution:  - works for me
stage:  - committed/rejected
status: open - closed

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



[issue17108] import silently prefers package over module when both available

2013-02-08 Thread Éric Araujo

Éric Araujo added the comment:

I knew that a package would win over a module, but an initless package does 
not?  Yuck :(

--
nosy: +eric.araujo

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



[issue17108] import silently prefers package over module when both available

2013-02-08 Thread R. David Murray

R. David Murray added the comment:

It has to be that way to preserve backward compatibility, since IIUC before the 
PEP there was no such thing as an initless package, it was just a directory 
that was ignored by import.

--

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



[issue17162] Py_LIMITED_API needs a PyType_GenericDealloc

2013-02-08 Thread Bradley Froehle

New submission from Bradley Froehle:

I tried to implement a custom extension type using PyType_FromSpec and 
Py_LIMITED_API but couldn't implement tp_dealloc:

static void mytype_dealloc(mytypeobject *self)
{
// free some fields in mytypeobject
Py_TYPE(self)-tp_free((PyObject *) self); // XXX
}

The line marked XXX will not compile in Py_LIMITED_API because there is no 
access to the fields of PyTypeObject.  There doesn't seem to be any function in 
the API which just calls tp_free.

I suggest the addition of an API function (to be included in Py_LIMITED_API):

void
PyType_GenericDealloc(PyObject *self)
{
Py_TYPE(self)-tp_free(self);
}

--
messages: 181689
nosy: bfroehle
priority: normal
severity: normal
status: open
title: Py_LIMITED_API needs a PyType_GenericDealloc
type: enhancement
versions: Python 3.4, Python 3.5

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



[issue17162] Py_LIMITED_API needs a PyType_GenericDealloc

2013-02-08 Thread Bradley Froehle

Bradley Froehle added the comment:

I should mention that essentially what I'm advocating is renaming and exposing 
`object_dealloc` in Objects/typeobject.c.

The proper name is not obvious to me... should it be PyObject_GenericDealloc 
since it acts on objects? Or PyType_GenericDealloc since it will be stuck into 
one of the PyTypeObject slots?

--

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



[issue17160] test_urllib2net fails

2013-02-08 Thread Ned Deily

Ned Deily added the comment:

The test is failing because of a restructuring of the docs.python.org website.  
The test was changed on 2012-10-28 to use the new URL (923ca6d73bad and 
friends).  That change will be in the next set of maintenance releases 
including 2.7.4 real soon now.

--
nosy: +ned.deily
resolution: works for me - out of date

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



[issue17162] Py_LIMITED_API needs a PyType_GenericDealloc

2013-02-08 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +loewis

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



[issue17108] import silently prefers package over module when both available

2013-02-08 Thread Eric Snow

Eric Snow added the comment:

Deprecating pkg/__init__.py and having pkg.py coexist with pkg/ was on the 
table in an earlier proposal (PEP 402).  In that case pkg/__init__.py would 
have been tried first for backward compatbility (until eliminated in Python 4 
or whenever).  PEP 420 (namespace packages) took a more conservative approach, 
leaving the question of pkg.py coexisting with pkg/ on the table.

I still find the idea appealing of replacing pkg/__init__.py with simply pkg.py 
+ pkg/.  PEP 402 outlines the rationale pretty well.  Considering that PEP 420 
made __init__.py-less packages legal, deprecating __init__.py isn't a huge 
leap.  The challenge of deciding if a directory is a package is tricky when 
there is not marker (like __init__.py is), but PEP 420 already tackled that for 
the most part.

Regardless, it would definitely require a new PEP (likely derived from 402) and 
some caution, especially since you could argue that people may be relying on 
the current precedence policy.  It would also take a little bit of work for the 
implementation, and a bunch of work to make sure the stdlib is happy.

--

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



[issue17163] Fix test discovery for test_file.py

2013-02-08 Thread Zachary Ware

Changes by Zachary Ware zachary.w...@gmail.com:


--
components: Tests
files: test_file_discovery.diff
keywords: patch
nosy: brett.cannon, ezio.melotti, zach.ware
priority: normal
severity: normal
status: open
title: Fix test discovery for test_file.py
type: behavior
versions: Python 3.3, Python 3.4
Added file: http://bugs.python.org/file29005/test_file_discovery.diff

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



[issue6972] zipfile.ZipFile overwrites files outside destination path

2013-02-08 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
stage: needs patch - committed/rejected

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



[issue17032] Misleading error message: global name 'X' is not defined

2013-02-08 Thread Ram Rachum

Ram Rachum added the comment:

I made a patch. Is it okay? (I don't normally use Mercurial nor work with 
patches.)

--
keywords: +patch
Added file: 
http://bugs.python.org/file29006/cpython_patch1of1_8e9346e7ae87.patch

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



[issue17032] Misleading error message: global name 'X' is not defined

2013-02-08 Thread Éric Araujo

Éric Araujo added the comment:

Patch looks good.  Does the test suite still pass?

--

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



[issue17032] Misleading error message: global name 'X' is not defined

2013-02-08 Thread Ram Rachum

Ram Rachum added the comment:

I don't program C at all. I have no idea how to compile Python or run the test 
suite. It took me half an hour just to produce this patch.

--

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



[issue17032] Misleading error message: global name 'X' is not defined

2013-02-08 Thread Éric Araujo

Éric Araujo added the comment:

If you’re using a programmer-friendly OS compiling is not hard.  See 
http://docs.python.org/devguide for instructions.  Otherwise somebody else will 
test the patch.  Thanks for your contribution!

--

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



[issue17032] Misleading error message: global name 'X' is not defined

2013-02-08 Thread Ram Rachum

Ram Rachum added the comment:

I think I'll go for option 2, thanks.

--

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



[issue17130] Add runcall() function to profile.py and cProfile.py

2013-02-08 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
keywords: +easy
nosy: +eric.araujo

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



[issue17143] trace.py uses _warn without importing it

2013-02-08 Thread Éric Araujo

Éric Araujo added the comment:

Great patch with tests.

--
nosy: +eric.araujo

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



[issue17147] BytesIO should be mentioned in SpooledTemporaryFile documentation

2013-02-08 Thread Éric Araujo

Éric Araujo added the comment:

Typos: whenewer → whether and has specified → was specified

Otherwise good to commit.

--
nosy: +eric.araujo
type: compile error - enhancement

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



[issue17155] logging can raise UnicodeEncodeError

2013-02-08 Thread Éric Araujo

Éric Araujo added the comment:

Hm the correct way to use exception is:

except Something:
logger.exception('problem while doing X')

i.e. this is a generic unicode-to-str-with-default-encoding problem, not 
something specific to logging.

Vinay, do you think logging should do something smarter than calling str when 
passed non-str objects?

--
nosy: +eric.araujo, vinay.sajip
title: Logging throwing UnicodeEncodeError exception - logging can raise 
UnicodeEncodeError

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



[issue17161] make install misses the man and the static library

2013-02-08 Thread Ned Deily

Ned Deily added the comment:

It would be helpful in the future if you would open separate issues for each 
problem you report.  To address your points:

1) For unix-y builds, the static library along with other files needed for 
embedding Python are installed in the standard Python library directory in the 
config subdirectory (e.g. /usr/lib/python2.7/config).

2a) I don't see any indication of point version number in the currently 
generated man page: it simply refers to 2.7.  The file name .1 in the file 
name refers to what man section the man page belongs in, e.g. man 1 python2.7.

2b) The Python makefile was changed (c208f5c1e4fe) between the 2.6 and 2.7 
releases to install the versioned man page.  I am guessing that it was an 
oversight that the unversioned man page install was dropped.  Perhaps Matthias 
can shed some light on this.  The man page installs should likely follow the 
alt scheme, meaning there should be both altmaninstall and maninstall 
targets called respectively from altinstall and install, with the latter 
installing the unversioned link.

--
nosy: +doko, ned.deily

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



[issue17159] Remove explicit type check from inspect.Signature.from_function()

2013-02-08 Thread Terry J. Reedy

Terry J. Reedy added the comment:

My first concern is whether this is a behavior issue that can be fixed in the 
next 3.3 release or an enhancement request that should wait for 3.4.

If Signature.from_function were documented in the manual with the current 
limitation, this issue would definitely be an enhancement request. But it is 
not even mentioned in the manual. I presume this is intentional as it is pretty 
clearly not meant to be called directly but only from signature(). Perhaps its 
should have been given a leading underscore to mark it as private.

The docstring does say 'python function'. However, its type check is redundant 
with the guard in signature before its call. So in normal usage, it can never 
fail. Moreover, the limitation is completely unnecessary even for pure Python 
code, as shown the the ease of creating a funclike class for the test. It is 
contrary to Python policy and stdlib practice. So in a sense, it is a bug.

My conclusion: the proposed change is an enhancement bugfix (or bugfix 
enhancement?) for an undocumented private function. So I think it ok for 3.3, 
but would not blame anyone who disagreed.

---
I agree with Éric that the exception should not be changed, not just because it 
would be a change, but because is would be a wrong change. 
Signature.from_function(42) *is* a type error. The fact that the type error is 
detected by attribute rather than by class is not relevant to external callers. 
So please wrap the
   # Parameter information.
section of the code with try: except AttributeError, as a substitute for the 
current too-narrow type check. Leave the message as it, except possibly add the 
object that fails:
 {} is not a function.format(func)

---
The change to signature has no effect on .from_function but makes it consistent 
with the rest of the module.

--
nosy: +terry.reedy

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



[issue17164] MozillaCookieJar does not handle session cookies

2013-02-08 Thread Piotr Dobrogost

New submission from Piotr Dobrogost:

It seems there's no information on how should session cookies be stored in the 
Netscape/Mozilla's cookies.txt file with regard to expiry time - see 
http://www.cookiecentral.com/faq/#3.5 Maybe Netscape has not been saving such 
cookies at all thus this lack of specification? Nevertheless, both wget and 
curl use 0 as expiry time to denote session cookies; it works both when reading 
cookies from file and writing to file. However Python's MozillaCookieJar's 
class uses empty string for the same purpose which makes it incompatible both 
with wget and curl - see 
http://hg.python.org/cpython/file/bd8afb90ebf2/Lib/http/cookiejar.py#l2027

I propose to make a change in implementation of MozillaCookieJar class and 
treat cookies with 0 set as expiry time as session cookies both when reading 
from a file and writing to a file.

Motivation for this bug report comes from the following question on Stack 
Overflow - http://stackoverflow.com/q/14742899/95735

--
components: Library (Lib)
messages: 181703
nosy: piotr.dobrogost
priority: normal
severity: normal
status: open
title: MozillaCookieJar does not handle session cookies
type: behavior
versions: Python 3.4, Python 3.5

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



[issue17159] Remove explicit type check from inspect.Signature.from_function()

2013-02-08 Thread Stefan Behnel

Stefan Behnel added the comment:

Fine with me. Updated patch attached.

--
Added file: http://bugs.python.org/file29007/inspect_sig_2.patch

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



[issue17155] logging can raise UnicodeEncodeError

2013-02-08 Thread Vinay Sajip

Vinay Sajip added the comment:

It is by design that logging accepts arbitrary objects, rather than just 
strings, see

docs.python.org/howto/logging.html#arbitrary-object-messages

and, as documented, the instance's __str__ will be called by logging calling 
str() on the instance. If people are being lazy and doing 
logging.exception(exc) where exc is an exception instance, then they need to 
change their code. Recall that on Python 2.x, just doing a + b can trigger a 
UnicodeError because of implicit bytes-Unicode conversions which use ASCII as 
a default (this is just how Python 2.x works - nothing to do with logging). An 
arbitrary exception's str() method may or may not be smart with respect to this 
sort of behaviour. I think the answer is for people to be more aware of Unicode 
issues and how Python 2.x deals with mixed Unicode and byte data. If the _fmt 
string you are referring to is the Formatter instance attribute, you can 
control that by passing whatever you want to the Formatter - a Unicode string, 
if you wish.

The normal logging exception handling is as per Éric's example (though of 
course you can have placeholders and arguments passed to the exception call, as 
in

logger.exception('Problem with %r', 'specific data')

I'm closing as invalid, because the example you quoted as working is how people 
are supposed to use it.

--
resolution:  - invalid
status: open - closed

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



[issue17161] make install misses the man and the static library

2013-02-08 Thread Ned Deily

Ned Deily added the comment:

Here's a patch for 2.7 that separates the maninstall target into a 
altmaninstall target (which installs just the python2.7 man page as before) 
and a maninstall target (which adds symlinks from python2 and python).  
Patches for 3x to follow.

--
keywords: +patch
stage:  - patch review
versions: +Python 3.2, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file29008/issue17161_27.patch

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



[issue17130] Add runcall() function to profile.py and cProfile.py

2013-02-08 Thread Guido van Rossum

Guido van Rossum added the comment:

While we're on profile convenience features, how about adding two context 
managers:

- one that just profiles a block and prints the profile (or dumps the data to a 
file)

- one that takes a Profile instance and enables profiling to that instance

E.g. (1)

with cProfile.runblock([file]):
your code here

or (2)

p = cProfile.Profile()
with p:
your code here

Also a decorator corresponding to (1):

@cProfile.runfunc([filename])
def myfunc(args):
stuff

--

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



[issue17156] Tools/i18n/pygettext.py doesn't parse unicode string.

2013-02-08 Thread umedoblock

umedoblock added the comment:

thanks serhiy.storchaka.
I try to use Shift_JIS, UTF-8, ISO-2022-JP and EUC-JP.

your patch detects UTF-8.

However it doesn't detect Shift_JIS, ISO-2022-JP and EUC-JP.
it misunderstand ISO-2022-JP charset is UTF-8.
it raised UnicodeDecodeError when Shift_JIS, EUC-JP.

Please check my test to use konnichiha.sh.

--
Added file: http://bugs.python.org/file29009/konnichiha.tar.gz

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



[issue17156] Tools/i18n/pygettext.py doesn't parse unicode string.

2013-02-08 Thread umedoblock

umedoblock added the comment:

I use just a pygettext_unicode.patch.
don't use a pygettext_unicode-2.7.patch.

--

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



[issue17108] import silently prefers package over module when both available

2013-02-08 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I looked through both the old 2.7 import statement doc and the new 3.3 import 
statement doc and import system chapter (5. The import system) and could not 
find anything about what a Path Based Finder path entry finder does when a 
particular path entry has multiple candidates (a directory, a file.pyx, and 
__pycache__/*.pyc entries are all possible).

I also notices that there is no (longer a) description of the simple default 
search for default installations: sys.modules, builtin modules, and sys.path 
directories. Up to here, first found rules. If there were such a simplified 
description, it could be followed by a description of resolution of conflicts 
within a sys.path directory.

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

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



[issue17161] make install misses the man and the static library

2013-02-08 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


Added file: http://bugs.python.org/file29010/issue17161_32.patch

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



[issue17161] make install misses the man and the static library

2013-02-08 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


Added file: http://bugs.python.org/file29011/issue17161_33.patch

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



[issue6478] time.tzset does not reset _strptime's locale time cache

2013-02-08 Thread Berker Peksag

Berker Peksag added the comment:

 There is a long line in _strptime.py which I will fix before
 committing.

Ops, fixed.

Also, I've found a better place for the test in Lib/test/test_strptime.py
and moved it to the test_strptime.CacheTests.

When I applied the patch, test_bad_timezone test failed because of
this code in Lib/_strptime.py:

@staticmethod
def _get_timezone():
try:
time.tzset()
except AttributeError:
pass
# ...

time.tzset() always resets time.tzname[1], so this part of the code
in test_bad_timezone[2] didn't work.

tzname = time.tzname[0]
time.tzname = (tzname, tzname)

I've fixed test_bad_timezone test by mocking the new
_strptime._TimeRE_cache.locale_time._get_timezone method.

[1] http://hg.python.org/cpython/file/default/Modules/timemodule.c#l827
[2] http://hg.python.org/cpython/file/default/Lib/test/test_strptime.py#l320

--
Added file: http://bugs.python.org/file29012/issue6478_v3.diff

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



[issue17161] make install misses the man and the static library

2013-02-08 Thread Éric Araujo

Éric Araujo added the comment:

3.3 patch looks fine.

For 2.7, I notice python2.7.1 is linked to python.1 and python2.1; do we 
install python as python2?

--

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



[issue17152] Array module should support boolean natively

2013-02-08 Thread Terry J. Reedy

Terry J. Reedy added the comment:

You are proposing a bit array. Whether the bits are interpreted or displayed as 
0/1 or f/t or False/True is secondary. The problem is that bit arrays do not 
fit the array model, with its minimum byte size per element of 1. There are 
other aspects of arrays that do not fit either. What would .itemsize() return? 
fractions. Fraction(1,8)? In any case, the internal implementation will be 
substantially different.

So I suggest that the proposal be to add an array.bitarray class. The bit 
representation strings '0'/'1', 'f'/'t', 'False'/'True' could be parameters. 
Omit typecode, typecodes, amd itemsize attributes and byteswap and (to or 
from)string methods. The buffer_info method would need redefinition. Should 
(to/from)(bytes/file) use 1 byte per bit (is so, which ones) or pack 8 bits per 
byte? It would be sensible to add bitwise operators (~, , |, ^) on bit arrays 
of the same length. An implementation decision is the granularity of the 
internal storage (1, 2, 4, or possibly 8 bytes on 64 bit systems -- or just use 
3.x ints).  The insert/delete methods might be omitted, but implementation of 
such should be similar to the shift methods for integers, which have the same 
problem of moving bits between internal implementation chunks.

I suspect that many have implemented versions of this in Python (as well as 
other languages) using bytes or ints with masks. I suggest you present the idea 
on python-ideas list to garner more support -- and be prepred to write a PEP 
for a new class.

I suspect that the relative ease of using ints as bit arrays will be an 
argument against such an addition. That is why they have the bit operations. On 
the other hand, one might argue that the inclusion of bit operations 
acknowledges the need for bit arrays.

--
nosy: +terry.reedy

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



[issue17157] issubclass() should accept iterables in 2nd arg

2013-02-08 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Given isxxx(src, target_s), the proposal would seem to be to change the 
internal test type(target_s) is tuple to hasattr(type(target_s), 
'__iter__'). This depends on metaclasses not having .__iter__ methods, just as 
type does not. However, a subclass of type that added .__iter__, for instance 
to iterate through all its instances (classes defined with that metaclass), 
would break that test. So the proposal needs a better test, that cannot become 
ambiguous, to be practical.

A virtue of the 'class or tuple of classes' interface is that a tuple instance 
is clearly not a class in itself, so there is no possible ambiguity.

It is a positive feature that isinstance and issubclass have the same 
signature: both or neither should be changed. The use of tuple for multiple 
items in 'item or items' interfaces is historical and also used elsewhere, as 
in exception clauses.

The meaning of
  except target_exception_s [as name]: body
is 
  if issubclass(raised_exception, target_exception_s)
  or isinstance(raised_exception, target_exception_s):
[name = raised_exception]
body

So to remain consistent, I think changing exception statements to allow 
iterables of exceptions should also be part of the proposal.

There might be something else that I am forgetting about at the moment.

While iterables might be used if Python were being written fresh today and the 
ambiguity problem were solved, I agree that more than esthetic satisfaction is 
needed to make a change.

--
nosy: +terry.reedy

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



[issue17158] help() module searcher text is misleading

2013-02-08 Thread Terry J. Reedy

Terry J. Reedy added the comment:

You are asking that help(modules spam) act more like help(modules), which 
sensibly prints Enter ... after the list. A minor but reasonable request, but 
since the current behavior is not a bug and some code might possible depend on 
it, only for 3.4. Here is a simple but untested patch.

--
components: +Library (Lib) -Interpreter Core
keywords: +patch
nosy: +terry.reedy
stage:  - patch review
versions:  -Python 3.3
Added file: http://bugs.python.org/file29013/Issue17158.diff

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



[issue12768] docstrings for the threading module

2013-02-08 Thread Eli Bendersky

Eli Bendersky added the comment:

moijes,

Yes, it's open. You can examine the comments for the previous patch by clicking 
on the review link near the patch. You need to be logged in to the issue 
tracker to see that.

--

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



[issue17161] make install misses the man and the static library

2013-02-08 Thread Ned Deily

Ned Deily added the comment:

do we install python as python2?

Yes, PEP 394 support was added in 2.7.3 (issue12627).

--

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



[issue17161] make install misses the man and the static library

2013-02-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 29826cb3f12e by Ned Deily in branch '2.7':
Issue #17161: make install now also installs a python2 and python man page.
http://hg.python.org/cpython/rev/29826cb3f12e

New changeset b0d9b273c029 by Ned Deily in branch '3.2':
Issue #17161: make install now also installs a python3 man page.
http://hg.python.org/cpython/rev/b0d9b273c029

New changeset 9828c4ffb401 by Ned Deily in branch '3.3':
Issue #17161: make install now also installs a python3 man page.
http://hg.python.org/cpython/rev/9828c4ffb401

New changeset 5e874b2a0469 by Ned Deily in branch 'default':
Issue #17161: merge from 3.3
http://hg.python.org/cpython/rev/5e874b2a0469

--
nosy: +python-dev

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



[issue17161] make install misses the man and the static library

2013-02-08 Thread Ned Deily

Ned Deily added the comment:

As of 2.7.4, 3.2.4, 3.3.1 and 3.4.0, make install will now install the missing 
symlinks for the missing man pages, python/python2 or python3.

--
assignee:  - ned.deily
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

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



[issue17165] Use except ImportError instead of bare except in _strptime.py

2013-02-08 Thread Berker Peksag

New submission from Berker Peksag:

See for the source: 
http://hg.python.org/cpython/file/default/Lib/_strptime.py#l24

and for the reference: 
http://docs.python.org/dev/library/_dummy_thread.html#module-_dummy_thread

--
components: Library (Lib)
files: _strptime_importerror.diff
keywords: patch
messages: 181720
nosy: berker.peksag
priority: normal
severity: normal
status: open
title: Use except ImportError instead of bare except in _strptime.py
versions: Python 3.4
Added file: http://bugs.python.org/file29014/_strptime_importerror.diff

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