[issue13355] random.triangular error when low = high=mode

2013-04-13 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I haven't had a chance to look at this one yet and am reopening.

The triangular code was originally written so that low and high could be 
reversed and it would still work.  I don't want to break any code that might be 
relying on that.

Andrew Svetlov, this patch shouldn't be committed.  I'm the maintainer of the 
random module and the person who wrote the original code for triangular.  The 
bug report was assigned to me to take care of when I got a chance.  Please be 
less aggressive with the commits.

--
status: closed - open

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



[issue9253] argparse: optional subparsers

2013-04-13 Thread paul j3

paul j3 added the comment:

This patch addresses both issues raised here:
- throw an error when the subparser argument is missing
- allow the subparser argument to be optional

argparse.py:

_SubParsersAction -
   add 'required=True' keyword.

   name(self) method - creates a name of the form {cmd1,cmd2} for error 
messages.

_get_action_name() - try action.name() if it can't get a name from 
option_strings, dest or metavar.  Still can return None.

2 error cases do a join on a list of action_names.  If a name is None, this 
will choke.  Add a ['%s'%x for x in list] guard.

test_argparse.py: 
add cases to the subparser block to test the 'required' keyword, and to test 
the error message changes.

argparse.rst:
add a summary of the add_subparsers() arguments.

--
Added file: http://bugs.python.org/file29793/required.patch

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



[issue17707] Multiprocessing queue get method does not block for short timeouts

2013-04-13 Thread Charles-François Natali

Charles-François Natali added the comment:

Indeed, that's a regression introduced by fix for issue #10527.

Just a rounding error:

--- Lib/multiprocessing/connection.py.orig  2013-04-13 06:27:57.0 
+
+++ Lib/multiprocessing/connection.py   2013-04-13 06:25:23.0 +
@@ -862,7 +862,7 @@
 if hasattr(select, 'poll'):
 def _poll(fds, timeout):
 if timeout is not None:
-timeout = int(timeout) * 1000  # timeout is in milliseconds
+timeout = int(timeout * 1000)  # timeout is in milliseconds
 fd_map = {}
 pollster = select.poll()
 for fd in fds:


(the original patch really wasn't reviewed properly...)

--
nosy: +neologix, sbt

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



[issue17707] Multiprocessing queue get method does not block for short timeouts

2013-04-13 Thread Charles-François Natali

Changes by Charles-François Natali cf.nat...@gmail.com:


--
priority: normal - high

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



[issue17709] http://docs.python.org/2.7/objects.inv doesn't support :func:`repr` or :exc:`Exception`

2013-04-13 Thread Russell Stuart

New submission from Russell Stuart:

.. topic:: http://docs.python.org/2.7/objects.inv doesn't support :func:`repr` 
or :exc:`Exception`

  A bug report for Python 2.7's docs.

.. _intro:

Bug
===

Running::

  sphinx-build -c conf2.7 -n -b html -E . html

Produces::

  Running Sphinx v1.1.3
  loading intersphinx inventory from http://docs.python.org/2.7/objects.inv...
  building [html]: targets for 1 source files that are out of date
  updating environment: 1 added, 0 changed, 0 removed
  reading sources... [100%] bug 

  looking for now-outdated files... none found
  pickling environment... done
  checking consistency... done
  preparing documents... done
  writing output... [100%] bug  

  /home/rstuart/zzz/bug.rst:1: WARNING: py:exc reference target not found: 
Exception
  /home/rstuart/zzz/bug.rst:1: WARNING: py:func reference target not found: repr
  writing additional files... genindex search
  copying static files... done
  dumping search index... done
  dumping object inventory... done
  build succeeded, 2 warnings.

Note the ``WARNING`` lines.  They should not be there.

Running::

  sphinx-build -c conf3.2 -b html -n -E . html

Produces::

  Running Sphinx v1.1.3
  loading intersphinx inventory from http://docs.python.org/3.2/objects.inv...
  building [html]: targets for 1 source files that are out of date
  updating environment: 1 added, 0 changed, 0 removed
  reading sources... [100%] bug 

  looking for now-outdated files... none found
  pickling environment... done
  checking consistency... done
  preparing documents... done
  writing output... [100%] bug  

  writing additional files... genindex search
  copying static files... done
  dumping search index... done
  dumping object inventory... done
  build succeeded.

I presume this means something is wrong with 
http://docs.python.org/2.7/objects.inv it downloads.

``conf2.7.py``:

  .. include:: conf2.7/conf.py
:literal:

``conf3.2.py``:

  .. include:: conf3.2/conf.py
:literal:

--
assignee: docs@python
components: Documentation
files: bug.rst
messages: 186697
nosy: docs@python, ras
priority: normal
severity: normal
status: open
title: http://docs.python.org/2.7/objects.inv doesn't support :func:`repr` or 
:exc:`Exception`
versions: Python 2.7
Added file: http://bugs.python.org/file29794/bug.rst

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



[issue17709] http://docs.python.org/2.7/objects.inv doesn't support :func:`repr` or :exc:`Exception`

2013-04-13 Thread Russell Stuart

Changes by Russell Stuart russell+pyt...@stuart.id.au:


Added file: http://bugs.python.org/file29795/conf.py

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



[issue17709] http://docs.python.org/2.7/objects.inv doesn't support :func:`repr` or :exc:`Exception`

2013-04-13 Thread Russell Stuart

Changes by Russell Stuart russell+pyt...@stuart.id.au:


Added file: http://bugs.python.org/file29796/conf.py

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



[issue17659] no way to determine First weekday (based on locale)

2013-04-13 Thread Izidor Matušov

Izidor Matušov added the comment:

Yes, I need to find out calendar-week-start-day information based on the 
current locale.

Or in the other words, I need to find out what the correct parameter for 
calendar.Calendar([firstweekday]) object is. With locale en_US it should be 
Sunday, with locale sk_SK it should be Monday, and so on.

I guess it could be find out from LC_TIME locale.

There is already API for such small bits of information:

documentation
locale.localeconv()
Returns the database of the local conventions as a dictionary. This dictionary 
has the following strings as keys:
/documentation

However, there is no category for LC_TIME so far.

--

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



[issue17709] http://docs.python.org/2.7/objects.inv doesn't support :func:`repr` or :exc:`Exception`

2013-04-13 Thread Éric Araujo

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


--
nosy: +eric.araujo, georg.brandl

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



[issue13355] random.triangular error when low = high=mode

2013-04-13 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Andrew Svetlov, please revert the commit.  It breaks code that may have been 
working before the commit.   Also, I don't want to change the exceptions being 
raised in old versions of Python.

--
resolution: fixed - 

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



[issue16309] PYTHONPATH= different from no PYTHONPATH at all

2013-04-13 Thread Armin Rigo

Armin Rigo added the comment:

Grrr, ok, I have an alias ls='/bin/ls'.  It seems that both PATH= and 
unset PATH are equivalent to PATH=..  This is behavior that we cannot add 
to PYTHONPATH, I fear, because so far . is not implicitly included if 
PYTHONPATH is not set.  Or if we do it's a big change, not just an internal 
fix...

--

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



[issue17665] convert test_wsgiref to idiomatic unittest code

2013-04-13 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

I don't think the second change is correct.

See also issue16510.

--
nosy: +serhiy.storchaka
type: performance - enhancement

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



[issue14735] Version 3.2.3 IDLE CTRL-Z plus Carriage Return to end does not work

2013-04-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM.

--
nosy: +serhiy.storchaka

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



[issue17656] Python 2.7.4 breaks ZipFile extraction of zip files with unicode member paths

2013-04-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d02507c9f973 by Serhiy Storchaka in branch '2.7':
Issue #17656: Fix extraction of zip files with unicode member paths.
http://hg.python.org/cpython/rev/d02507c9f973

--

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



[issue17710] SystemError in cPickle for incorrect input

2013-04-13 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

 import cPickle
 cPickle.loads(bS' \np0\n.)
Traceback (most recent call last):
  File stdin, line 1, in module
SystemError: Negative size passed to PyString_FromStringAndSize
 pickle.loads(bS' \np0\n.)
Traceback (most recent call last):
  File stdin, line 1, in module
  File /home/serhiy/py/cpython2.7/Lib/pickle.py, line 1382, in loads
return Unpickler(file).load()
  File /home/serhiy/py/cpython2.7/Lib/pickle.py, line 858, in load
dispatch[key](self)
  File /home/serhiy/py/cpython2.7/Lib/pickle.py, line 966, in load_string
raise ValueError, insecure string pickle
ValueError: insecure string pickle
 cPickle.loads(bS'\np0\n.)
Traceback (most recent call last):
  File stdin, line 1, in module
SystemError: Negative size passed to PyString_FromStringAndSize
 pickle.loads(bS'\np0\n.)
''

Python 3 has the same behavior except C implementation raises UnpicklingError 
for bS'\np0\n..

--
components: Extension Modules
messages: 186704
nosy: alexandre.vassalotti, pitrou, serhiy.storchaka
priority: normal
severity: normal
stage: needs patch
status: open
title: SystemError in cPickle for incorrect input
type: behavior
versions: Python 2.7, Python 3.3, Python 3.4

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



[issue17710] SystemError in cPickle for incorrect input

2013-04-13 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
nosy: +haypo

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



[issue17711] Persistent id in pickle with protocol version 0

2013-04-13 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Python 2 allows pickling and unpickling non-ascii persistent ids. In Python 3 C 
implementation of pickle saves persistent ids with protocol version 0 as 
utf8-encoded strings and loads as bytes.

 import pickle, io
 class MyPickler(pickle.Pickler):
... def persistent_id(self, obj):
... if isinstance(obj, str):
... return obj
... return None
... 
 class MyUnpickler(pickle.Unpickler):
... def persistent_load(self, pid):
... return pid
... 
 f = io.BytesIO(); MyPickler(f).dump('\u20ac'); data = f.getvalue()
 MyUnpickler(io.BytesIO(data)).load()
'€'
 f = io.BytesIO(); MyPickler(f, 0).dump('\u20ac'); data = f.getvalue()
 MyUnpickler(io.BytesIO(data)).load()
b'\xe2\x82\xac'
 f = io.BytesIO(); MyPickler(f, 0).dump('a'); data = f.getvalue()
 MyUnpickler(io.BytesIO(data)).load()
b'a'

Python implementation in Python 3 doesn't works with non-ascii persistant ids 
at all.

--
components: Extension Modules, Library (Lib)
messages: 186705
nosy: alexandre.vassalotti, pitrou, serhiy.storchaka
priority: normal
severity: normal
stage: needs patch
status: open
title: Persistent id in pickle with protocol version 0
type: behavior
versions: Python 3.3, Python 3.4

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



[issue17706] Segfault in PyErr_SetObject

2013-04-13 Thread Antoine Pitrou

Antoine Pitrou added the comment:

What is xerbla? PyThreadState_GET() returning NULL means the GIL has been 
released, sounds like a bug in a third-party C extension.

--
nosy: +pitrou

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



[issue17707] Multiprocessing queue get method does not block for short timeouts

2013-04-13 Thread Antoine Pitrou

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


--
nosy: +benjamin.peterson, georg.brandl, giampaolo.rodola, larry
priority: high - release blocker
stage:  - patch review
versions: +Python 2.7, Python 3.2, Python 3.4

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



[issue17707] Multiprocessing queue get method does not block for short timeouts

2013-04-13 Thread Georg Brandl

Georg Brandl added the comment:

Very good, regression #2 for 3.3.2. Keep them coming right now :)

--

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



[issue17712] test_gdb failures

2013-04-13 Thread Antoine Pitrou

New submission from Antoine Pitrou:

I'm getting multiple test_gdb failures on a new (XUbuntu 13.04) system:

==
FAIL: test_basic_command (test.test_gdb.PyLocalsTests)
--
Traceback (most recent call last):
  File /home/antoine/cpython/33/Lib/test/test_gdb.py, line 822, in 
test_basic_command
cmds_after_breakpoint=['py-locals'])
  File /home/antoine/cpython/33/Lib/test/test_gdb.py, line 170, in 
get_stack_trace
self.assertEqual(err, '')
AssertionError: 'warning: no loadable sections found in added symbol-file 
system-supplied DSO at [truncated]... != ''
- warning: no loadable sections found in added symbol-file system-supplied DSO 
at 0x77ffa000


(all test methods produce the same error)

--
components: Tests
messages: 186708
nosy: dmalcolm, pitrou
priority: normal
severity: normal
status: open
title: test_gdb failures
type: behavior
versions: Python 3.1, Python 3.3, Python 3.4

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



[issue17707] Multiprocessing queue get method does not block for short timeouts

2013-04-13 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

My patch, my fault. I'm very sorry.

--

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



[issue17707] Multiprocessing queue get method does not block for short timeouts

2013-04-13 Thread Georg Brandl

Georg Brandl added the comment:

Don't worry, mistakes happen.  My message was actually positive: it's better to 
catch the problems now than two weeks after the regression fix release...

--

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



[issue17712] test_gdb failures

2013-04-13 Thread Georg Brandl

Georg Brandl added the comment:

I guess that warning needs to be added to all the others in test_gdb around 
line 150...

--
nosy: +georg.brandl

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



[issue17712] test_gdb failures

2013-04-13 Thread Antoine Pitrou

Antoine Pitrou added the comment:

(if anyone knows why that warning appears, by the way, I'll be glad to hear 
about it :-))

--

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



[issue16510] Using appropriate checks in tests

2013-04-13 Thread Tshepang Lekhonkhobe

Changes by Tshepang Lekhonkhobe tshep...@gmail.com:


--
nosy: +tshepang

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



[issue16510] Using appropriate checks in tests

2013-04-13 Thread Tshepang Lekhonkhobe

Tshepang Lekhonkhobe added the comment:

@David is that policy documented in the devguide? If not, should it be?

--

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



[issue17706] Segfault in PyErr_SetObject

2013-04-13 Thread Pauli Virtanen

Pauli Virtanen added the comment:

Yes, this is a bug in numpy.linalg --- the GIL is released but the error 
handling code assumes it's not. The error doesn't appear with in typical LAPACK 
installations, so this code branch was missed.

--
nosy: +pv

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



[issue17706] Segfault in PyErr_SetObject

2013-04-13 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Thank you, closing then.

--
resolution:  - invalid
status: open - closed

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



[issue16551] Cleanup the pure Python pickle implementation

2013-04-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Patch updated in response to Alexandre's comments. In additional to his 
suggestions some other minor things simplified. _batch_appends and 
_batch_setitems now use islice instead range. Some bugs found and new issues 
created (issue17710, issue17711).

--
Added file: http://bugs.python.org/file29797/pickle_cleanup_3.patch

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



[issue17713] test_logging fails in test_compute_rollover_weekly_attime

2013-04-13 Thread Ned Batchelder

New submission from Ned Batchelder:

I just pulled down the tip of CPython, built it, and ran the tests, and got 
this failure:

```
==
FAIL: test_compute_rollover_weekly_attime 
(test.test_logging.TimedRotatingFileHandlerTest)
--
Traceback (most recent call last):
  File /home/ned/python/cpython/Lib/test/test_logging.py, line 3972, in 
test_compute_rollover_weekly_attime
wday = datetime.datetime.fromtimestamp(currentTime).weekday()
AssertionError: 388800 != 475200

--
Ran 149 tests in 17.142s

FAILED (failures=1, skipped=1)
test test_logging failed
1 test failed:
test_logging
sys:1: ResourceWarning: unclosed file _io.TextIOWrapper 
name='/tmp/test_logging-2-gimdv3.log' mode='a' encoding='UTF-8'
```

Others preparing for today's sprint in Boston also had the same problem.  
Something to do with timezones?

--
messages: 186717
nosy: nedbat
priority: normal
severity: normal
status: open
title: test_logging fails in test_compute_rollover_weekly_attime

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



[issue17713] test_logging fails in test_compute_rollover_weekly_attime

2013-04-13 Thread Antoine Pitrou

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


--
nosy: +vinay.sajip

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



[issue16447] SEGFAULT when setting type.__name__

2013-04-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d5e5017309b1 by Mark Dickinson in branch '2.7':
Issue #16447: Fix potential segfault when setting __name__ on a class.
http://hg.python.org/cpython/rev/d5e5017309b1

--
nosy: +python-dev

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



[issue16447] SEGFAULT when setting type.__name__

2013-04-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e6d1328412c8 by Mark Dickinson in branch '3.3':
Issue #16447: Fix potential segfault when setting __name__ on a class.
http://hg.python.org/cpython/rev/e6d1328412c8

New changeset c8d771f10022 by Mark Dickinson in branch 'default':
Issue #16447: Merge fix from 3.3.
http://hg.python.org/cpython/rev/c8d771f10022

--

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



[issue16447] SEGFAULT when setting type.__name__

2013-04-13 Thread Mark Dickinson

Changes by Mark Dickinson dicki...@gmail.com:


--
status: open - closed

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



[issue16447] SEGFAULT when setting type.__name__

2013-04-13 Thread Mark Dickinson

Mark Dickinson added the comment:

Fixed.

--
resolution:  - fixed

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



[issue16447] SEGFAULT when setting type.__name__

2013-04-13 Thread Mark Dickinson

Changes by Mark Dickinson dicki...@gmail.com:


--
stage: commit review - committed/rejected

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



[issue13355] random.triangular error when low = high=mode

2013-04-13 Thread Mark Dickinson

Mark Dickinson added the comment:

I agree that the issue_13355.patch commit should be reverted: the code used to 
work fine in the case high  mode  low, and now does not.  (Similarly, a call 
to random.uniform(2.0, 1.0) works as expected at the moment.)

Really, I think all that's needed here is Terry's suggested one-line fix.

--

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



[issue17643] Expose weakref callback for introspection purposes.

2013-04-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9e7d31b04d78 by Mark Dickinson in branch 'default':
Issue #17643: Add __callback__ attribute to weakref.ref.
http://hg.python.org/cpython/rev/9e7d31b04d78

--
nosy: +python-dev

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



[issue17643] Expose weakref callback for introspection purposes.

2013-04-13 Thread Mark Dickinson

Mark Dickinson added the comment:

Committed, using support.gc_collect for the test that requires garbage 
collection.  Thanks for the reviews!

--
assignee:  - mark.dickinson
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

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



[issue17705] Fill Character cannot be \0

2013-04-13 Thread Stefan Krah

Stefan Krah added the comment:

Unsurprisingly (libmpdec is a C library) this also does not work in _decimal. I 
could add a special case in _decimal.c at the cost of
two additional if statements for all regular use cases.


Is padding with NUL a legitimate use case? IOW, is the slowdown justified?

--
nosy: +skrah

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



[issue12181] SIGBUS error on OpenBSD (sparc64)

2013-04-13 Thread Federico Schwindt

Federico Schwindt added the comment:

Trent, would be possible to update the OpenBSD slaves to 5.3 (or -current)? 
There has been too many changes since 5.1 that affect python (for example the 
threads implementation).

--

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



[issue17705] Fill Character cannot be \0

2013-04-13 Thread Mark Dickinson

Mark Dickinson added the comment:

 Is padding with NUL a legitimate use case?

I don't see a good reason to disallow it, and it seems like a fairly plausible 
need.  Numpy, for example, pads strings will NUL bytes when placing a short 
string in long fixed-width field.

--
nosy: +mark.dickinson

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



[issue17671] io.BufferedRWPair can use uninitialized members

2013-04-13 Thread Serhiy Storchaka

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


--
nosy: +serhiy.storchaka
stage:  - needs patch

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



[issue17536] update browser list with additional browser names

2013-04-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5a1429e9b621 by doko in branch '2.7':
- Issue #17536: Add to webbrowser's browser list: xdg-open, gvfs-open,
http://hg.python.org/cpython/rev/5a1429e9b621

--

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



[issue13355] random.triangular error when low = high=mode

2013-04-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e948154af406 by Andrew Svetlov in branch '3.3':
Revert changes for #13355 by request from Raymond Hettinger
http://hg.python.org/cpython/rev/e948154af406

New changeset 39bbbf5d7b01 by Andrew Svetlov in branch 'default':
Revert changes for #13355 by request from Raymond Hettinger
http://hg.python.org/cpython/rev/39bbbf5d7b01

New changeset 620c691c12c5 by Andrew Svetlov in branch '2.7':
Revert changes for #13355 by request from Raymond Hettinger
http://hg.python.org/cpython/rev/620c691c12c5

--

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



[issue17536] update browser list with additional browser names

2013-04-13 Thread Matthias Klose

Matthias Klose added the comment:

now in 2.7

--
resolution:  - fixed
stage:  - committed/rejected
status: open - closed

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



[issue13355] random.triangular error when low = high=mode

2013-04-13 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Reverted. Sorry.

--

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



[issue17705] Fill Character cannot be \0

2013-04-13 Thread Stefan Krah

Stefan Krah added the comment:

Mark Dickinson rep...@bugs.python.org wrote:
 Numpy, for example, pads strings will NUL bytes when placing a short
 string in long fixed-width field.

I was hoping to escape the work, but that's quite convincing. ;)

Changing libmpdec doesn't look very appealing, so probably I'll use
{ as a placeholder for NUL and then rewrite the result.

--

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



[issue17707] Multiprocessing queue get method does not block for short timeouts

2013-04-13 Thread Charles-François Natali

Charles-François Natali added the comment:

As they say, s*** happens (one of my first patches caused a regression
with thread-local storage in multiple interpreters setup, so...)

Note that it's a strong case for selectors inclusion (issue #16853) :-)

BTW, this would probably need a test, and since I'm abroad, I won't be
able to commit it, so if someone could pick it up...

--

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



[issue17628] str==str: compare the first and last character before calling memcmp()

2013-04-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Some crazy ideas.

Try something like this:

#define BLOCK unsigned long
if (size = sizeof(BLOCK)) {
if (*(BLOCK*)data1 != *(BLOCK*)data2)
return 0;
return (memcmp((unsigned char*)data1 + sizeof(BLOCK),
   (unsigned char*)data2 + sizeof(BLOCK), size) == 0);
}
if (*(unsigned char*)data1 != *(unsigned char*)data2)
return 0;
return (memcmp(data1, data2, size) == 0);

Or may be unroll memcmp for small size:

switch (size) {
#if SIZEOF_LONG == 8
case 7:
...
#endif
case 3:
...
case 2:
if (((unsigned char*)data1)[1] != ((unsigned char*)data2)[1])
return 0;
case 1:
if (((unsigned char*)data1)[0] != ((unsigned char*)data2)[0])
return 0;
case 0:
return 1;
default:
// case for size = sizeof(BLOCK)
}

--

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



[issue17714] str.encode('base64') add trailing new line character is not documented

2013-04-13 Thread Alessandro Piccione

New submission from Alessandro Piccione:

str.encode() with 'base64' as argument add a trailing new line character to the 
returned string. This is the difference from base64.b64encode(str) (that is 
used internally).

This is not documented in str.encode()
http://docs.python.org/2/library/stdtypes.html?highlight=encode#str.encode

Instead it is perfectly documented for base64.encodestring()
http://docs.python.org/2/library/base64.html#base64.encodestring

--
messages: 186734
nosy: alex.75
priority: normal
severity: normal
status: open
title: str.encode('base64') add trailing new line character is not documented
versions: Python 2.7

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



[issue17714] str.encode('base64') add trailing new line character. It is not documented.

2013-04-13 Thread Alessandro Piccione

Changes by Alessandro Piccione alessandro.piccione...@gmail.com:


--
title: str.encode('base64') add trailing new line character is not documented 
- str.encode('base64') add trailing new line character. It is not documented.

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



[issue17715] Raising an exception in __trunc__ gives a segmentation fault.

2013-04-13 Thread Mark Dickinson

New submission from Mark Dickinson:

Python 3.4.0a0 (default:838fdf3bb0c6, Apr 13 2013, 16:54:22) 
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin
Type help, copyright, credits or license for more information.
 class A:
... def __trunc__(self): 1/0
... 
 int(A())
Segmentation fault

It looks as though the problem is in PyNumber_Long, where there's an unchecked 
return value for PyEval_CallObject.

--
assignee: mark.dickinson
components: Interpreter Core
messages: 186735
nosy: mark.dickinson
priority: high
severity: normal
status: open
title: Raising an exception in __trunc__ gives a segmentation fault.
type: crash
versions: Python 3.4

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



[issue8865] select.poll is not thread safe

2013-04-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Gregory?

--

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



[issue16812] os.symlink can return wrong FileExistsError/WindowsError information

2013-04-13 Thread Sijin Joseph

Sijin Joseph added the comment:

This looks to work correctly in default branch,

 os.link('non-existent-name', 'new-name')
Traceback (most recent call last):
  File stdin, line 1, in module
FileNotFoundError: [WinError 2] The system cannot find the file specified: 
'non-existent-name'

--
nosy: +sijinjoseph

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



[issue17716] IMPORTANT - Process corruption on partly failed imports

2013-04-13 Thread Pascal Chambon

New submission from Pascal Chambon:

Hello,

we've encountered several times a very nasty bug on our framework, several 
times tests or even production code (served by mod_wsgi) ended up in a broken 
state, where imports like from . import processing_exceptions, which were NOT 
in circular imports and were 100% existing submodules, raised exceptions like 
ImportError: cannot import name processing_exceptions. Restarting the 
test/server fixed it, and we never knew what happened.

I've crossed several forum threads on similar issues, only recently did I find 
one which gave a way to reproduce the bug:
http://stackoverflow.com/questions/12830901/why-does-import-error-change-to-cannot-import-name-on-the-second-import

So here attached is a python2 sample (python3 has the same pb), showing the bug 
(just run their test_import.py)

What happens here, is that a package mypkg fails to get imported due to an 
exception (eg. temporarily failuure of DB), but only AFTER successfully 
importing a submodule mypkg.module_a.
Thus, mypkg.module_a IS loaded and stays in sys.modules, but mypkg is 
erased from sys.modules (like the doc on python imports describes it).

The next time we try, from within the same application, to import mypkg, and 
we cross from mypkg import module_a in the mypkg's __init__.py code, it SEEMS 
that the import system checks sys.modules, and seeing mypkg.module_a in it, 
it THINKS that necessarily mypkg is already initialized and contains a name 
module_a in its global namespace. Thus the cannot import name 
processing_exceptions error.

Importing module_a as an absolute or relative import changes nothing, however 
doing import mypkg.module_a solves the problem (dunno why).

Another workaround is to cleanup sys.modules in mypkg/__init__.py, to ensure 
that a previously failed attempt at importing the package modules doesn't 
hinder us.

# on top of mypkg/__init__.py
exceeding_modules = [k for k in sys.modules.keys() if 
k.startswith(mypkg.)]
for k in exceeding_modules:
del sys.modules[k]

Anyway, I don't know enough python's import internals to understand why, 
exactly, on second import attempt, the system tries a kind of faulty 
getattr(mypkg, module_a), instead of simply returning 
sys.modules[mypkg.module_a] which exists.
Could anyone help with that ? 
That's a very damaging issue, imo, since webserver workers can reach a 
completely broken state because of that.

PS: more generally, I guess python users lack insight on the behaviour of from 
xxx import yyy, especially when yyy is both a real submodule of xxx and a 
variable initialized in xxx/__init__.py (it seems the real module overrides the 
variable), or when the __all__ list of xxx could prevent the import of a 
submodule of xxx by not including it.
Provided I better understand the workflow of all these stuffs - that have quite 
moved recently I heard - I'd be willing to summarize it for the python docs.

--
components: Interpreter Core
files: ImportFailPy2.zip
messages: 186738
nosy: Pascal.Chambon
priority: normal
severity: normal
status: open
title: IMPORTANT - Process corruption on partly failed imports
type: behavior
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5
Added file: http://bugs.python.org/file29798/ImportFailPy2.zip

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



[issue14012] Misc tarfile fixes

2013-04-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Éric, can you please update your patch?

--

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



[issue17715] Raising an exception in __trunc__ gives a segmentation fault.

2013-04-13 Thread Mark Dickinson

Mark Dickinson added the comment:

Also affects 3.3.  2.7 seems to be okay.

--
versions: +Python 3.3

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



[issue17665] convert test_wsgiref to idiomatic unittest code

2013-04-13 Thread Ezio Melotti

Ezio Melotti added the comment:

In this case I don't think it matters much.  The value is either True or False, 
so both assertTrue(...) and assertIs(..., True) work, even though the latter is 
technically more accurate.

--
nosy: +ezio.melotti

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



[issue17716] IMPORTANT - Process corruption on partly failed imports

2013-04-13 Thread Antoine Pitrou

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


--
nosy: +brett.cannon, eric.snow, ncoghlan

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



[issue16812] os.symlink can return wrong FileExistsError/WindowsError information

2013-04-13 Thread Sijin Joseph

Sijin Joseph added the comment:

Behavior for symlink is as follows

 os.symlink('non-existent-name', 'existing-name')
Traceback (most recent call last):
  File stdin, line 1, in module
PermissionError: [WinError 5] Access is denied: 'non-existent-name'

The error message is misleading, but can be fixed using the patch attached to 
issue13775

 os.symlink('non-existent-name1', 'non-existent-name2')
No error. This behavior is same on Windows and Linux. Seems odd, but can be 
justified as ok behavior.

--

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



[issue16510] Using appropriate checks in tests

2013-04-13 Thread R. David Murray

R. David Murray added the comment:

If it isn't documented it should be, and you could open an issue for it.

--

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



[issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError

2013-04-13 Thread Ned Jackson Lovely

Ned Jackson Lovely added the comment:

Attaching a patch to make SMTPException an IOError, with corresponding update 
to docs to point out that __init__ on the SMTP object will raise IOErrors in 
general, and some SMTPExceptions in particular.

Boston Python Sprint Apr 2013

--
nosy: +n
Added file: http://bugs.python.org/file29799/issue2118.diff

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



[issue17715] Raising an exception in __trunc__ gives a segmentation fault.

2013-04-13 Thread Mark Dickinson

Changes by Mark Dickinson dicki...@gmail.com:


--
stage:  - patch review

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



[issue17661] documentation of '%r' links to the wrong repr

2013-04-13 Thread Dan Riti

Dan Riti added the comment:

Reproduced the issue and generated a patch following Kyle's documented 
approach. 

Please note that this patch addresses the link problem, but does not address 
the style issue. Thanks.

--
keywords: +patch
nosy: +Dan.Riti
Added file: http://bugs.python.org/file29801/using-ref.patch

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



[issue17715] Raising an exception in __trunc__ gives a segmentation fault.

2013-04-13 Thread Mark Dickinson

Mark Dickinson added the comment:

Here's a patch.

--
keywords: +patch
Added file: http://bugs.python.org/file29800/issue17715.patch

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



[issue17670] Improve str.expandtabs() doc

2013-04-13 Thread Ezio Melotti

Ezio Melotti added the comment:

This doesn’t understand other non-printing characters or escape sequences.

This might also be improved.  Does it mean that all characters are considered 
having len(c) == 1, even if they are not printable or escape sequence (and 
which escape sequences? \f, \v?)?

Adding an example with tabsize=8 might also help, but it might not be necessary 
if the wording is improved as Eli suggested.

--
nosy: +ezio.melotti
type:  - enhancement

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



[issue17341] Poor error message when compiling invalid regex

2013-04-13 Thread Jason Michalski

Changes by Jason Michalski arm...@armooo.net:


--
keywords: +patch
Added file: http://bugs.python.org/file29802/cpython-3.3-17341.patch

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



[issue17341] Poor error message when compiling invalid regex

2013-04-13 Thread Jason Michalski

Changes by Jason Michalski arm...@armooo.net:


Added file: http://bugs.python.org/file29803/cpython-2.7-17341.patch

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



[issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError

2013-04-13 Thread R. David Murray

R. David Murray added the comment:

This looks good for 3.4.  Ned, would you also be willing to prepare a doc patch 
for 3.3 that mentions that IOError may be raised?  (I think the 3.3 patch will 
also apply to 2.7.)

--
versions: +Python 2.7, Python 3.3, Python 3.4 -Python 3.2

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



[issue16812] os.symlink can return wrong FileExistsError/WindowsError information

2013-04-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

issue13775, issue16074, and issue16812 all are virtually about the same bug. 
There is no working patch in any issue, but the discussion in issue16074 is 
longer.

--
resolution:  - duplicate
stage:  - committed/rejected
status: open - closed
superseder:  - bad error message in os.rename

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



[issue13775] Access Denied message on symlink creation misleading for an existing file/directory target.

2013-04-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

issue13775, issue16074, and issue16812 all are virtually about the same bug. 
There is no working patch in any issue, but the discussion in issue16074 is 
longer.

--
resolution:  - duplicate
stage:  - committed/rejected
status: open - closed
superseder:  - bad error message in os.rename

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



[issue17390] display python version on idle title bar

2013-04-13 Thread Kent Johnson

Kent Johnson added the comment:

issue17390_editor_title.patch is not correct, it changes the title on any 
window that inherits from EditorWindow, including the shell window. Here is a 
new patch that changes short_title() instead of saved_change_hook(), so it can 
be overridden by derived classes. This is the same method used to change the 
title of the shell window.

Derived classes of EditorWindow are PyShellEditorWindow and OutputWindow. 
OutputWindow overrides short_title() and IIUC PyShellEditorWindow should use 
the same title as a normal editor window.

--
nosy: +kjohnson
Added file: http://bugs.python.org/file29804/issue17390_editor_title_rev2.patch

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



[issue17717] Set up nasm from external.bat

2013-04-13 Thread John Ehresman

New submission from John Ehresman:

It would be nice for Tools\buildbot\external.bat to set a copy of nasm up to 
use.  Is there a reason this is not done?

--
components: Windows
messages: 186752
nosy: jpe
priority: normal
severity: normal
status: open
title: Set up nasm from external.bat
type: enhancement
versions: Python 3.4

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



[issue17713] test_logging fails in test_compute_rollover_weekly_attime

2013-04-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 185ae0c95e5b by Vinay Sajip in branch 'default':
Issue #17713: Test temporarily skipped while failure investigated.
http://hg.python.org/cpython/rev/185ae0c95e5b

--
nosy: +python-dev

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



[issue17640] from distutils.util import byte_compile hangs

2013-04-13 Thread Giles Hall

Giles Hall added the comment:

I was unable to replicate this bug with clean builds of either Python3.3.0 and 
Python3.3.1rc1 on either Linux or OSX. I assume you also meant Ctrl-C, since 
there is no reading from standard input occurring in this script.  Without 
further data such as platform/vendor information, an strace, or a secondary 
confirmation of this behavior, I would suggest closing this bug.

My test environment on Linux was Ubuntu 12.10, Linux 3.2.0-34-generic, 
2.15glibc.  On OSX, I'm running 10.7.5 with the latest command line build tools.

--
nosy: +vishnubob

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



[issue17715] Raising an exception in __trunc__ gives a segmentation fault.

2013-04-13 Thread Benjamin Peterson

Benjamin Peterson added the comment:

LGTM

--
nosy: +benjamin.peterson

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



[issue17700] Update Curses HOWTO for 3.4

2013-04-13 Thread Ezio Melotti

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


--
nosy: +ezio.melotti
versions: +Python 3.3

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



[issue16074] bad error message in os.rename

2013-04-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I just closed two almost identical issues in favour of this issue. I believe 
that in order to avoid ambiguity, there are three possible solutions of such 
issues:

1. Do not display any filename (as in Python 2.7).
2. Display both filenames (this can also be slightly ambiguous).
3. Depending on the errno display the first filename or the second filename, or 
neither, or both.

--
versions: +Python 3.4

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



[issue17715] Raising an exception in __trunc__ gives a segmentation fault.

2013-04-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 52bd2035e70a by Mark Dickinson in branch '3.3':
Issue #17715: Add missing NULL Check to PyNumber_Long.
http://hg.python.org/cpython/rev/52bd2035e70a

New changeset 5358ee70f831 by Mark Dickinson in branch 'default':
Issue #17715: Merge fix from 3.3.
http://hg.python.org/cpython/rev/5358ee70f831

--
nosy: +python-dev

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



[issue17715] Raising an exception in __trunc__ gives a segmentation fault.

2013-04-13 Thread Mark Dickinson

Changes by Mark Dickinson dicki...@gmail.com:


--
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

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



[issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError

2013-04-13 Thread Ned Jackson Lovely

Ned Jackson Lovely added the comment:

...and the 3.3 doc patch.

--
Added file: http://bugs.python.org/file29805/issue2118-doc-patch-3.3.diff

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



[issue17656] Python 2.7.4 breaks ZipFile extraction of zip files with unicode member paths

2013-04-13 Thread Serhiy Storchaka

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


--
stage: patch review - committed/rejected

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



[issue17640] from distutils.util import byte_compile hangs

2013-04-13 Thread Dmitry Sivachenko

Dmitry Sivachenko added the comment:

No, I meant Ctrl+D.
I use FreeBSD-10.

--

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



[issue17716] From ... import fails when parent package failed but child module succeeded, yet works in std import case

2013-04-13 Thread Brett Cannon

Brett Cannon added the comment:

TL;DR: don't do anything involving side-effects as part of an import that can 
fail like connecting to a database. Another bug that proposes tweaking the 
IMPORT_FROM bytecode semantics will more than likely solve your problem 
regardless.


First question: what versions of Python did you test this against? You didn't 
specify the version when you filed the bug.

Second, if you want to see how it all works, import is implemented in pure 
Python in Python 3.3 so you can actually read the code if you want: 
http://hg.python.org/cpython/file/185ae0c95e5b/Lib/importlib/_bootstrap.py. I 
also gave a talk at PyCon US 2013 (and PyCon Argentina) on how import works if 
you are curious: http://pyvideo.org/video/1707/how-import-works.

Third, performing operations as a side-effect of import which could cause a 
failure is a dodgy practice, as you have found out. I would advise looking for 
a way to not trying to connect to your database as part of an import so that 
the import will succeed consistently and you won't have this problem.

Fourth, everything is working as intended. We can't roll back imports because 
of possible side-effects you do during import, so we can't have pkg.module_a 
successfully import but then toss it aside just because pkg succeeds. And the 
from ... import format fails as it does on the second import because as you 
pointed out, pkg.module_a is not an attribute on pkg. The attempted import 
succeeds internally since pkg.module_a is just sitting there in sys.modules, 
but it isn't explicitly re-attached to pkg as that's not expected if the first 
import failed thanks to pkg failing but you choose to attempt to ignore that 
fact (so it should honestly fail). The bytecode uses getattr() on the module so 
there is no specific reason for it to think it should work. But when you do a 
straight import that succeeds as that will do the necessary binding to pkg.

Fifth, http://bugs.python.org/issue17636 will probably make all of this a moot 
point. =) That issue is tracking a proposed change which will cause from ... 
import to pull from sys.modules if a module is in sys.modules but not attached 
on a module to deal with circular imports. But I think as a side-effect it will 
also help deal with your problem based on what you have described.

Sixth, if you want to help clarify the docs for Python 3.3 and 2.7 that would 
be great! Just open a new bug with a patch for the doc changes and I would be 
happy to review it.

--
dependencies: +Modify IMPORT_FROM to fallback on sys.modules
title: IMPORTANT - Process corruption on partly failed imports - From ... 
import fails when parent package failed but child module succeeded, yet works 
in std import case

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



[issue17640] from distutils.util import byte_compile hangs

2013-04-13 Thread Giles Hall

Giles Hall added the comment:

Hi Dmitry, since I can't replicate your issue, can you provide any more context 
from GDB and/or strace/ktrace?  Thanks!

--

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



[issue17686] Doc using/unix broken link (http://linuxmafia.com/)

2013-04-13 Thread Dan Riti

Dan Riti added the comment:

I second akuchling's link suggestion, as it seems to be the most up to date 
openSUSE packaging resource.

I have generated a patch to update the link.

Also, it seems this link is also broken in the 2.7 documentation:

http://docs.python.org/2/using/unix.html

--
keywords: +patch
nosy: +dan.riti
Added file: http://bugs.python.org/file29806/update-link.patch

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



[issue1243730] Big speedup in email message parsing

2013-04-13 Thread Serhiy Storchaka

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


--
stage: patch review - needs patch

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



[issue17686] Doc using/unix broken link (http://linuxmafia.com/)

2013-04-13 Thread Ezio Melotti

Ezio Melotti added the comment:

Fixed, thanks for the patch!

--
assignee: docs@python - ezio.melotti
nosy: +ezio.melotti
resolution:  - fixed
stage:  - committed/rejected
status: open - closed
type:  - enhancement
versions: +Python 2.7

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



[issue17686] Doc using/unix broken link (http://linuxmafia.com/)

2013-04-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2ed694679b81 by Ezio Melotti in branch '3.3':
#17686: fix broken link in Doc/using/unix.rst.  Patch by Dan Riti.
http://hg.python.org/cpython/rev/2ed694679b81

New changeset 86a95813e5c3 by Ezio Melotti in branch 'default':
#17686: merge with 3.3.
http://hg.python.org/cpython/rev/86a95813e5c3

New changeset 0f31f38e8a17 by Ezio Melotti in branch '2.7':
#17686: fix broken link in Doc/using/unix.rst.  Patch by Dan Riti.
http://hg.python.org/cpython/rev/0f31f38e8a17

--
nosy: +python-dev

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



[issue1727418] xmlrpclib waits indefinately

2013-04-13 Thread Adam Duston

Adam Duston added the comment:

We used the xmlrpc++0.7 library to set up a test server, consistent with what 
Arno reported in the original ticket. We weren’t able to reproduce the problem 
with 2.7.2 or 3.4. Furthermore, xmlrpclib.Server (or xmlrpc.client.Server in 
Python 3) connects with HTTP 1.1 as of http://bugs.python.org/issue1767370, 
making the original issue irrelevant. 

There is already a test for this issue: the xmlrpc server used in 
test_python_builders in test_xmlrpc_net.py has an HTTP 1.1 reply.

--
nosy: +Adam.Duston
versions: +Python 3.4 -Python 2.6

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



[issue17571] broken links on Lib/datetime.py docstring

2013-04-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 70f9f6752d28 by Ezio Melotti in branch '3.3':
#17571: remove broken links in datetime.py docstring.
http://hg.python.org/cpython/rev/70f9f6752d28

New changeset 0d2c364c7e5d by Ezio Melotti in branch 'default':
#17571: merge with 3.3.
http://hg.python.org/cpython/rev/0d2c364c7e5d

--
nosy: +python-dev

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



[issue17713] test_logging fails in test_compute_rollover_weekly_attime

2013-04-13 Thread Vinay Sajip

Changes by Vinay Sajip vinay_sa...@yahoo.co.uk:


--
assignee:  - vinay.sajip
components: +Library (Lib)
type:  - behavior
versions: +Python 3.4

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



[issue17571] broken links on Lib/datetime.py docstring

2013-04-13 Thread Ezio Melotti

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


--
assignee: docs@python - ezio.melotti
resolution:  - fixed
stage: commit review - committed/rejected
status: open - closed
versions: +Python 3.3

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



[issue17718] boolop constant checking for if/while

2013-04-13 Thread Stephen Tu

New submission from Stephen Tu:

Here's a simple patch to optimize away constant boolean 
conjunctions/disjunctions. for example:

def foo():
if 1 and 0:
print(hi)

now disassembles into:
  7   0 LOAD_CONST   0 (None) 
  3 RETURN_VALUE 

while I realize more general techniques for achieving this have been proposed 
(ie http://bugs.python.org/issue1346238), this is a very simple, self-contained 
patch.

--
components: Interpreter Core
files: constcheck.patch
keywords: patch
messages: 186767
nosy: Stephen.Tu
priority: normal
severity: normal
status: open
title: boolop constant checking for if/while
type: performance
versions: Python 3.4
Added file: http://bugs.python.org/file29807/constcheck.patch

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



[issue17386] Bring Doc/make.bat as close to Doc/Makefile as possible

2013-04-13 Thread Ezio Melotti

Ezio Melotti added the comment:

Terry, do you want to test and commit this?
Should it be backported to 3.3 (and possibly 2.7) too?

--
stage: patch review - commit review

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



[issue17719] IDLE help text refers to incorrect Python version

2013-04-13 Thread Kent Johnson

New submission from Kent Johnson:

The IDLE help text says, Running without a subprocess: (DEPRECATED in Python 
3.5 see Issue 16123). According to the referenced issue, this feature is 
scheduled to be deprecated in *3.4* and *removed* in 3.5. The attached patch 
corrects the help text.

--
assignee: docs@python
components: Documentation
files: deprecated_in_3.4.patch
keywords: patch
messages: 186769
nosy: docs@python, kjohnson
priority: normal
severity: normal
status: open
title: IDLE help text refers to incorrect Python version
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file29808/deprecated_in_3.4.patch

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



[issue9682] socket.create_connection error message for domain subpart with invalid length is very confusing

2013-04-13 Thread Mike Milkin

Mike Milkin added the comment:

This patch adds better exception messages.  
If any label other then  the last is empty or is too long the request is added 
to the exception message.
If the last label is over 64, the label is added to the exception message

--
keywords: +patch
nosy: +mmilkin
Added file: http://bugs.python.org/file29809/Issue9682.patch

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



[issue17719] IDLE help text refers to incorrect Python version

2013-04-13 Thread Ezio Melotti

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


--
nosy: +asvetlov
stage:  - patch review

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



  1   2   3   >