[issue6632] Include more chars in the decimal codec

2013-06-11 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

[In the light of the current discussion on python-ideas regarding adding 
support for the Unicode minus sign]

I'm +1 on adding support for the minus code point, since
it's the correct correspondent to the plus code point in Unicode.
The traditional ASCII - is a compromise between a mathematical
minus and a hyphen.

https://en.wikipedia.org/wiki/Hyphen-minus

While we're at it, we should probably also include the
FULLWIDTH PLUS SIGN (U+FF0B) and SUPERSCRIPT PLUS SIGN (U+207A)
as alternative for the plus sign, and additionally the
SUPERSCRIPT MINUS (U+207B) as alternative for the minus
sign.

http://en.wikipedia.org/wiki/Minus_sign

I'm also +1 on adding support for other mathematical symbols used in parsing 
numbers, but only if their purpose is clearly defined in the Unicode database 
(i.e. accepting an e in some other script for exponential notation should not 
be allowed).

--

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



[issue10581] Review and document string format accepted in numeric data type constructors

2013-06-11 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

I've changed my mind :-)

Restricting the decimal encoder to only accept code points from one of the 
possible decimal digit ranges is a good idea. Let's do that.

--

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



[issue14455] plistlib unable to read json and binary plist files

2013-06-11 Thread Ronald Oussoren

Ronald Oussoren added the comment:

The fifth version of the patch should be much cleaner.

Changes:

* Coding style cleanup, the new code uses PEP8 conformant names for
  methods and variables.

* Explicitly make private classes private by prefixing their name with
  an underscore (including the old XML parser/generator classes)

* Remove support in the binary plist code for sets and uuids, neither can
  be written to plist files by Apple's code.

* More tests

* There is no support for JSON because JSON is not supported by Apple's
  propertylist APIs either. The command-line tool plutil does support
  JSON output, but the C and Objective-C APIs do not.

* There is no support for the old OpenStep format. That format is badly
  documented, has been deprecated for a long time, and writing it is 
  not supported by Apple's plist libraries.  The OpenStep format also 
  seems to be much more limited than the two modern ones.

Open issues:

* The patch contains plistlib.{dump,dumps,load,loads} which mirror the
  functions with same name from the pickle and json modules. 

  Is is usefull to add those functions to plistlib, and deprecate the 
  older functions?

  Advantages:
  + Cleaner API
  + Provides a clean path to remove plistlib.Data and 
plistlib._InternalDict (the latter is already deprecated)

  Disadvantages:
  - Very (too?) close to needless code churn

* Is renaming PlistParser and PlistWriter ok? Both are private and a 
  quick search on google seems to indicate that nobody directory uses
  these classes.

  If renaming is ok, should methods/variables be renamed to PEP8 style?

* Should a 'default' keyword be added to the serialization functions
  (simular to the keyword in json.dump)

  I don't have a usecase for this, the only reason to add is is 
  consistency with the json module

* Should a 'skipvalues' keyword be added to the serialization functions
  (to ignore values that cannot be serialized, see #11101)

  I'm not convinced that this would be a good idea.

* Should a 'check_circular' keyword be added to the 
  serialization functions (again similar to the same keyword for
  json.dump)? 

  This would avoid relying on the recursion limit to break infinite loops
  when serializing circular datastructures.

  Would need to check if binary plist can contain circular data structures
  when they are written using Apple's libraries.

--
keywords: +needs review
Added file: http://bugs.python.org/file30541/issue14455-v5.txt

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



[issue3329] API for setting the memory allocator used by Python

2013-06-11 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

I prefer the new version without PYMEM_TRACE_MALLOC :-)

Can we rename API and api_id to something more specific? maybe DOMAIN and 
domain_id?

--

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



[issue14903] dictobject infinite loop on 2.6.5 on 32-bit x86

2013-06-11 Thread Daniel Farina

Daniel Farina added the comment:

Hello folks,

After long delay, I can confirm this issue reproduces in a similar way inside 
of init_socket in 2.7.

--

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



[issue14903] dictobject infinite loop on 2.6.5 on 32-bit x86

2013-06-11 Thread Daniel Farina

Changes by Daniel Farina dan...@heroku.com:


--
versions: +Python 2.7

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



[issue18186] 2.x subprocess contains set notation

2013-06-11 Thread Daniel Farina

New submission from Daniel Farina:

I was vendoring subprocess to pick up the change for #16327 when I noticed I 
could not import it on 2.6.  The backwards compatibility claim at the top is 
2.2.

Included is a tiny patch that uses a semantically equivalent form.

--
components: Library (Lib)
files: old-set-notation-v1.patch
keywords: patch
messages: 190953
nosy: Daniel.Farina
priority: normal
severity: normal
status: open
title: 2.x subprocess contains set notation
versions: Python 2.6
Added file: http://bugs.python.org/file30542/old-set-notation-v1.patch

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



[issue14903] dictobject infinite loop on 2.6.5 on 32-bit x86

2013-06-11 Thread Serhiy Storchaka

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


--
nosy: +benjamin.peterson, rhettinger

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



[issue18033] Example for Profile Module shows incorrect method

2013-06-11 Thread Armin Rigo

Armin Rigo added the comment:

A slightly more complete example that I tested:

http://stackoverflow.com/a/16077568/1556290

--
nosy: +arigo

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



[issue18186] 2.x subprocess contains set notation

2013-06-11 Thread Berker Peksag

Berker Peksag added the comment:

Python 2.6 only receives security fixes. You can also look at the subprocess32 
module: https://pypi.python.org/pypi/subprocess32

--
nosy: +berker.peksag
resolution:  - invalid
stage:  - committed/rejected
status: open - closed

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



[issue18186] 2.x subprocess contains set notation

2013-06-11 Thread Daniel Farina

Daniel Farina added the comment:

Then most assuredly the message at the top is out of date.  It seems a pity 
that for this small change that older python versions cannot use the same code 
verbatim.

It reads:

# This module should remain compatible with Python 2.2, see PEP 291.

--

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



[issue18186] 2.x subprocess contains set notation

2013-06-11 Thread Daniel Farina

Daniel Farina added the comment:

Also, this fix would be for 2.7.  My mistake, even though the goal was to 
import on older Pythons.

--
status: closed - open
versions: +Python 2.7 -Python 2.6

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



[issue18187] Fix broken link in Doc/library/venv.rst

2013-06-11 Thread Berker Peksag

New submission from Berker Peksag:

The correct location of the venv module is Lib/venv, not Lib/venv.py.

Attaching a simple patch that fixes the location.

--
assignee: docs@python
components: Documentation
files: venv-location.diff
keywords: patch
messages: 190958
nosy: berker.peksag, docs@python
priority: normal
severity: normal
status: open
title: Fix broken link in Doc/library/venv.rst
versions: Python 3.3, Python 3.4
Added file: http://bugs.python.org/file30543/venv-location.diff

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



[issue18188] ERROR: test_no_optimize_flag on Mageia Linux Cauldron x86-64 with certain configure flags

2013-06-11 Thread Shlomi Fish

New submission from Shlomi Fish:

After I build Python-3.3.2 from the .tar.xz using the following script (on 
Mageia Linux Cauldron x86-64):


#!/bin/bash
./configure --prefix=$HOME/apps/python3 --with-threads \
--enable-ipv6 --with-dbmliborder=gdbm \
--with-system-expat \
--with-system-ffi \
--enable-shared \
--with-valgrind
shlomif@telaviv1:~/Download/unpack/prog/python/Python-3.3.2$ 


then I get this test failure in the «test_no_optimize_flag»:

[ QUOTE ]

==
ERROR: test_no_optimize_flag (distutils.tests.test_bdist_rpm.BuildRpmTestCase)
--
Traceback (most recent call last):
  File 
/home/shlomif/Download/unpack/prog/python/Python-3.3.2/Lib/distutils/tests/test_bdist_rpm.py,
 line 125, in test_no_optimize_flag
cmd.run()
  File 
/home/shlomif/Download/unpack/prog/python/Python-3.3.2/Lib/distutils/command/bdist_rpm.py,
 line 366, in run
self.spawn(rpm_cmd)
  File 
/home/shlomif/Download/unpack/prog/python/Python-3.3.2/Lib/distutils/cmd.py, 
line 366, in spawn
spawn(cmd, search_path, dry_run=self.dry_run)
  File 
/home/shlomif/Download/unpack/prog/python/Python-3.3.2/Lib/distutils/spawn.py,
 line 32, in spawn
_spawn_posix(cmd, search_path, dry_run=dry_run)
  File 
/home/shlomif/Download/unpack/prog/python/Python-3.3.2/Lib/distutils/spawn.py,
 line 163, in _spawn_posix
% (cmd[0], exit_status))
distutils.errors.DistutilsExecError: command 'rpmbuild' failed with exit status 
1
https://bugs.mageia.org/show_bug.cgi?id=9395

[ / QUOTE]

More info can be found at http://bugs.python.org/issue18142 .

Please look into fixing it.

Regards,

-- Shlomi Fish

--
components: Tests
messages: 190959
nosy: shlomif
priority: normal
severity: normal
status: open
title: ERROR: test_no_optimize_flag on Mageia Linux Cauldron x86-64 with 
certain configure flags
versions: Python 3.3

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



[issue18189] IDLE Improvements: Unit test for Delegator.py

2013-06-11 Thread R. Jayakrishnan

New submission from R. Jayakrishnan:

Continuing the IDLE unittest framework initiated in 
http://bugs.python.org/issue15392.

A small unit test for IDLE Delegator.py module. This patch introduces a test 
module named test_delegator.py inside Lib/idlelib/idle_test, considering the 
points README file in idle_test. The test method test_setdelegate() simply 
passes a text widget to Delegator by calling setdelegate(), and test the widget 
returned by getdelegate() for the same.

--
components: IDLE
files: test_delegator.patch
keywords: patch
messages: 190960
nosy: JayKrish
priority: normal
severity: normal
status: open
title: IDLE Improvements: Unit test for Delegator.py
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file30544/test_delegator.patch

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



[issue18189] IDLE Improvements: Unit test for Delegator.py

2013-06-11 Thread R. Jayakrishnan

Changes by R. Jayakrishnan raaj...@gmail.com:


--
versions: +Python 2.7, Python 3.3

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



[issue18188] ERROR: test_no_optimize_flag on Mageia Linux Cauldron x86-64 with certain configure flags

2013-06-11 Thread R. David Murray

R. David Murray added the comment:

This looks related to issue 14443, which was supposed to be fixed in 3.3.0.  
Can you do some of the same debugging that was done in that issue and see if it 
reveals any more about the problem?

Also, I notice from that issue that Antoine was (is?) running Mageia, so I'm 
adding him to nosy in case he wants to try to reproduce it.

--
nosy: +pitrou, r.david.murray
type:  - behavior

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



[issue3329] API for setting the memory allocator used by Python

2013-06-11 Thread STINNER Victor

STINNER Victor added the comment:

Amaury Forgeot d'Arc added the comment:
 I prefer the new version without PYMEM_TRACE_MALLOC :-)

Well, py_setallocators-filename.patch is more a proof-of-concept
showing how to use my Py_SetAllocators() API to pass the C trace
(filename/line number), than a real proposition. The patch is very
intrusive and huge, I also prefer py_setallocators-3.patch :-)

 Can we rename API and api_id to something more specific? maybe DOMAIN and 
 domain_id?

Something like:
{PY_ALLOC_MEM_DOMAIN, PY_ALLOC_OBJECT_DOMAIN}.
or
{PYMEM_DOMAIN, PYOBJECT_DOMAIN}
?

There are only two values, another option is to duplicate functions:
- PyMem_GetAllocators(), PyMem_SetAllocators(), PyMem_Malloc(), ..
- PyObject_GetAllocators(), PyObject_SetAllocators(), PyObject_Malloc(), ..

I prefer PyMem_SetAllocators() over PYOBJECT_DOMAIN.

--

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



[issue18189] IDLE Improvements: Unit test for Delegator.py

2013-06-11 Thread Todd Rovito

Changes by Todd Rovito rovit...@gmail.com:


--
nosy: +Todd.Rovito

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



[issue18189] IDLE Improvements: Unit test for Delegator.py

2013-06-11 Thread Todd Rovito

Changes by Todd Rovito rovit...@gmail.com:


--
nosy: +philwebster

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



[issue18189] IDLE Improvements: Unit test for Delegator.py

2013-06-11 Thread Todd Rovito

Changes by Todd Rovito rovit...@gmail.com:


--
nosy: +terry.reedy

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



[issue18188] ERROR: test_no_optimize_flag on Mageia Linux Cauldron x86-64 with certain configure flags

2013-06-11 Thread Shlomi Fish

Shlomi Fish added the comment:

Hi,

I don't understand the issue in questioned - it's too wordy and unclear. I 
don't know how to do the debugging in question - please guide me. I should note 
that after I do «unset PYTHONDONTWRITEBYTECODE» then all tests pass except for 
test_ftp.py, which gives me this. However, I don't see the bdist_rpm anywhere 
in the output. Was it skipped? If so, how, where and why?

[QUOTE]

==
error: test_ftp (test.test_urllib2net.othernetworktests)
--
traceback (most recent call last):
  file 
/home/shlomif/download/unpack/prog/python/python-3.3.2/lib/urllib/request.py, 
line 2307, in retrfile
self.ftp.cwd(file)
  file /home/shlomif/download/unpack/prog/python/python-3.3.2/lib/ftplib.py, 
line 591, in cwd
return self.voidcmd(cmd)
  file /home/shlomif/download/unpack/prog/python/python-3.3.2/lib/ftplib.py, 
line 264, in voidcmd
return self.voidresp()
  file /home/shlomif/download/unpack/prog/python/python-3.3.2/lib/ftplib.py, 
line 238, in voidresp
resp = self.getresp()
  file /home/shlomif/download/unpack/prog/python/python-3.3.2/lib/ftplib.py, 
line 233, in getresp
raise error_perm(resp)
ftplib.error_perm: 550 failed to change directory.

during handling of the above exception, another exception occurred:

traceback (most recent call last):
  file 
/home/shlomif/download/unpack/prog/python/python-3.3.2/lib/test/test_urllib2net.py,
 line 112, in test_ftp
self._test_urls(urls, self._extra_handlers())
  file 
/home/shlomif/download/unpack/prog/python/python-3.3.2/lib/test/test_urllib2net.py,
 line 218, in _test_urls
f = urlopen(url, req, timeout)
  file 
/home/shlomif/download/unpack/prog/python/python-3.3.2/lib/test/test_urllib2net.py,
 line 33, in wrapped
return _retry_thrice(func, exc, *args, **kwargs)
  file 
/home/shlomif/download/unpack/prog/python/python-3.3.2/lib/test/test_urllib2net.py,
 line 23, in _retry_thrice
return func(*args, **kwargs)
  file 
/home/shlomif/download/unpack/prog/python/python-3.3.2/lib/urllib/request.py, 
line 469, in open
response = self._open(req, data)
  file 
/home/shlomif/download/unpack/prog/python/python-3.3.2/lib/urllib/request.py, 
line 487, in _open
'_open', req)
  file 
/home/shlomif/download/unpack/prog/python/python-3.3.2/lib/urllib/request.py, 
line 447, in _call_chain
result = func(*args)
  file 
/home/shlomif/download/unpack/prog/python/python-3.3.2/lib/urllib/request.py, 
line 1464, in ftp_open
fp, retrlen = fw.retrfile(file, type)
  file 
/home/shlomif/download/unpack/prog/python/python-3.3.2/lib/urllib/request.py, 
line 2309, in retrfile
raise urlerror('ftp error: %d' % reason) from reason
typeerror: %d format: a number is required, not error_perm

--
ran 15 tests in 14.820s

[/QUOTE]

Also see:

https://bugs.mageia.org/show_bug.cgi?id=9395

Regards,

-- Shlomi Fish

--

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



[issue17925] asynchat.async_chat.initiate_send : del deque[0] is not safe

2013-06-11 Thread Pierrick Koch

Pierrick Koch added the comment:

sorry for the delay, here is the updated patch,
shall I add a new class in Lib/test/test_asynchat.py ?

--
Added file: http://bugs.python.org/file30545/cpython.asyncore.patch

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



[issue18181] super vs. someclass.__getattribute__

2013-06-11 Thread Ronald Oussoren

Ronald Oussoren added the comment:

I've attached a first very rough patch to demonstrate what I was rambling about.

With this patch and a patched version of PyObjC I can use the builtin super 
class with the proxy classes for Objective-C classes.

Open issues:

* Does this need a pep?

* The name of the new slot sucks, need to find a better one

* Should it be possible to define the slot in Python code?

  Probably, the 'super.py' file is a crude hack but I can imagine
  more realistic scenarios where implementing the slot in Python
  would be useful.

* There are no tests, and no documentation updates

--
keywords: +patch
Added file: http://bugs.python.org/file30546/issue-18181-poc.txt

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



[issue18190] RuntimeError raised with re.search + re.DOTALL on empty string

2013-06-11 Thread Harry Bock

New submission from Harry Bock:

In Python 2.7.5, running re.search on regular expressions beginning with '.+' 
will raise RuntimeError if:
 * the string being matched is empty
 * the flags include re.DOTALL/re.S

 re.search(.+a, , flags=re.S)
  File C:\Python27\lib\site-packages\IPython\core\interactiveshell.py, line 
2731, in run_code
exec code_obj in self.user_global_ns, self.user_ns
  File ipython-input-16-fefa32a418ba, line 1, in module
myre.search()
RuntimeError: internal error in regular expression engine

This does not occur if the input string is not empty, or if re.match is used 
instead of re.search, or if the re.S flag is omitted.

The bug does not occur on previous versions of Python 2.x, including 2.7.4.

--
components: Regular Expressions
messages: 190966
nosy: ezio.melotti, hbock, mrabarnett
priority: normal
severity: normal
status: open
title: RuntimeError raised with re.search + re.DOTALL on empty string
type: behavior
versions: Python 2.7

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



[issue18188] ERROR: test_no_optimize_flag on Mageia Linux Cauldron x86-64 with certain configure flags

2013-06-11 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I don't really use Mageia anymore, that said:

 I should note that after I do «unset PYTHONDONTWRITEBYTECODE» [snip]

Yep, this is a long-lasting Mageia issue. See:
https://qa.mandriva.com/show_bug.cgi?id=50484
https://bugs.mageia.org/show_bug.cgi?id=3348

You could try arguing with the maintainer (Michael Scherer) but he seems both 
stubborn and slightly clueless about anything Python-related, unfortunately.

 all tests pass except for test_ftp.py, which gives me this

You are not the only one getting the test_ftp failure. I guess Giampaolo didn't 
fix it well enough.

 However, I don't see the bdist_rpm anywhere in the output

Individual test cases are only listed on failure, or when verbose mode is 
specified. So, if it doesn't appear in the output, it passed.

--
nosy: +giampaolo.rodola

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



[issue18191] urllib2/urllib.parse.splitport does not handle IPv6 correctly

2013-06-11 Thread Julien Danjou

New submission from Julien Danjou:

 import urllib.parse
 urllib.parse.splitport(::1)
(':', '1')

This is obviously invalid.

--
components: Library (Lib)
messages: 190968
nosy: jd
priority: normal
severity: normal
status: open
title: urllib2/urllib.parse.splitport does not handle IPv6 correctly
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3

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



[issue18188] ERROR: test_no_optimize_flag on Mageia Linux Cauldron x86-64 with certain configure flags

2013-06-11 Thread R. David Murray

R. David Murray added the comment:

Benjamin fixed the ftp error message, one commit after the 3.3.2 tag.  Not sure 
if that is enough to make the test pass, though.

So, it sounds like 18142 should be closed as works for me?  That is, the 
remaining test failures are do to the poor system configuration in Mageia?

--

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



[issue18188] ERROR: test_no_optimize_flag on Mageia Linux Cauldron x86-64 with certain configure flags

2013-06-11 Thread Shlomi Fish

Shlomi Fish added the comment:

I see regarding test_ftp.py and the verbosity of the tests and the absence of 
bdist_rpm in the output - however, shouldn't the test suite handle the presence 
of the PYTHONDONTWRITEBYTECODE=1 flag better? (E.g: refuse to run the tests to 
begin with (with an error), or not run the failing tests, or unset the flag 
before running the test suite, or whatever?)

--

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



[issue18181] super vs. someclass.__getattribute__

2013-06-11 Thread Ronald Oussoren

Ronald Oussoren added the comment:

Second version of the poc adds a way to implement the hook in Python code, and 
supers_updated.py uses that hook.

Still no tests, no documentation and with awfull naming :-)

--
Added file: http://bugs.python.org/file30547/supers_updated.py

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



[issue18181] super vs. someclass.__getattribute__

2013-06-11 Thread Ronald Oussoren

Ronald Oussoren added the comment:

.

--

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



[issue17269] getaddrinfo segfaults on OS X when provided with invalid arguments combinations

2013-06-11 Thread Ronald Oussoren

Ronald Oussoren added the comment:

The buildbot seems to be happy right now (at least as far as getaddrinfo is 
concerned).

--
resolution:  - fixed
status: open - closed

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



[issue18190] RuntimeError raised with re.search + re.DOTALL on empty string

2013-06-11 Thread Matthew Barnett

Matthew Barnett added the comment:

Also in Python 3.3.2, but not Python 3.2.

I haven't tested Python 3.3.1 or Python 3.3.0.

--
versions: +Python 3.3

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



[issue18188] ERROR: test_no_optimize_flag on Mageia Linux Cauldron x86-64 with certain configure flags

2013-06-11 Thread R. David Murray

R. David Murray added the comment:

Given that we introduced the flag to support read-only file systems, I think 
one can argue that the test suite should support running on one.  However, the 
right thing to do would be to set up a buildbot where that was true so that it 
doesn't get re-broken in the future.  That might be a tad tricky to set up, I'm 
not sure.

--

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



[issue17941] namedtuple should support fully qualified name for more portable pickling

2013-06-11 Thread Christian Tismer

Christian Tismer added the comment:

I would like to make an additional suggestion.
(and I implemented this yesterday):

Native namedtuple (not a derived class) can be made much simpler to handle
when no module and class machinery is involved at all.

The way I implemented it has no need for sys._getframes, and it does
not store a reference to the class at all.

The advantage of doing so is that this maximizes the compatibility
with ordinary tuples. Ordinary tuples have no pickling issue at all,
and this way the named tuple should behave as well.

My implementation re-creates the namedtuple classes on the fly by a
function in __reduce_ex__. There is no speed penalty for this because
of caching the classes by their unique name and set of field names.

This is IMHO the way things should work:
A namedtuple replaces a builtin type, so it has the same pickling
behavior: nothing needed.

Rationale:
tuples are used everywhere and dynamically. namedtuple should be as
compatible to that as possible. By having to specify  a module etc., this 
dynamic is partially lost.

Limitation:
When a class is derived from namedtuple, pickling support is no longer
automated. This is compatible with ordinary tuples as well.

Cheers - Chris

--
hgrepos: +198
nosy: +Christian.Tismer

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



[issue18181] super vs. someclass.__getattribute__

2013-06-11 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

Is it possible to avoid a new slot?
for example, super() could walk the tp_base- chain and call tp_getattro each 
time the value changes.

--

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



[issue18190] RuntimeError raised with re.search + re.DOTALL on empty string

2013-06-11 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you for your report. This is a duplicate of issue17998.

--
nosy: +serhiy.storchaka
resolution:  - duplicate
stage:  - committed/rejected
status: open - closed
superseder:  - internal error in regular expression engine

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



[issue18181] super vs. someclass.__getattribute__

2013-06-11 Thread Ronald Oussoren

Ronald Oussoren added the comment:

I don't think it is possible to avoid adding a new slot. The default 
implementation of tp_getattro (PyObject_GenericGetAttr) looks in the instance 
dict, while super does not (because it wants a less specific implementation).  

PyObject_GenericGetAttr will also walk the entire MRO, while 
super.__getattribute__ does not start search at the first entry in the MRO.

Although I'd love to be proven wrong ;-)

--

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



[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-06-11 Thread Ethan Furman

Ethan Furman added the comment:

Final (hopefully! ;) patch.

I stuck the toc reference in datatypes.

If no more edits are necessary I'll commit on Friday (three days from now).

--
Added file: http://bugs.python.org/file30548/pep-0435.12.stoneleaf.patch

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



[issue17907] Deprecate imp.new_module() in favour of types.ModuleType

2013-06-11 Thread Brett Cannon

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


--
assignee:  - brett.cannon

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



[issue18192] Move imp.get_magic() to importlib

2013-06-11 Thread Brett Cannon

New submission from Brett Cannon:

As part of deprecating imp, need to move imp.get_magic() to importlib where it 
now belongs. Will be exposed as an attribute instead of a function, though.

--
components: Library (Lib)
messages: 190981
nosy: brett.cannon
priority: normal
severity: normal
stage: test needed
status: open
title: Move imp.get_magic() to importlib
versions: Python 3.4

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



[issue17177] Document/deprecate imp

2013-06-11 Thread Brett Cannon

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


--
dependencies: +Move imp.get_magic() to importlib

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



[issue17177] Document/deprecate imp

2013-06-11 Thread Brett Cannon

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


--
dependencies: +Move imp.reload() to importlib

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



[issue18193] Move imp.reload() to importlib

2013-06-11 Thread Brett Cannon

New submission from Brett Cannon:

For convenience it should live directly off of importlib and not importlib.util.

--
components: Library (Lib)
messages: 190982
nosy: brett.cannon
priority: normal
severity: normal
stage: test needed
status: open
title: Move imp.reload() to importlib
versions: Python 3.4

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



[issue18194] Move imp.source_from_cache/cache_from_source to importlib

2013-06-11 Thread Brett Cannon

New submission from Brett Cannon:

To facilitate deprecating imp, need to move imp.source_from_cache() and 
cache_from_source() to importlib.util or as static methods on 
importlib.machinery.SourceLoader.

--
components: Library (Lib)
messages: 190983
nosy: brett.cannon
priority: normal
severity: normal
stage: test needed
status: open
title: Move imp.source_from_cache/cache_from_source to importlib
versions: Python 3.4

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



[issue17177] Document/deprecate imp

2013-06-11 Thread Brett Cannon

Brett Cannon added the comment:

There should now be issues for each of the required relocations to make imp 
redundant.

--
dependencies: +Move imp.source_from_cache/cache_from_source to importlib

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



[issue17907] Deprecate imp.new_module() in favour of types.ModuleType

2013-06-11 Thread Brett Cannon

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


--
assignee: brett.cannon - 

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



[issue18192] Move imp.get_magic() to importlib

2013-06-11 Thread Brett Cannon

Brett Cannon added the comment:

This could be an attribute on importlib.machinery.SourceLoader instead of an 
attribute in importlib.util.

--

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



[issue18194] Move imp.source_from_cache/cache_from_source to importlib

2013-06-11 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

On Jun 11, 2013, at 08:47 PM, Brett Cannon wrote:

To facilitate deprecating imp, need to move imp.source_from_cache() and
cache_from_source() to importlib.util or as static methods on
importlib.machinery.SourceLoader.

+1 for importlib.util.  They should be publicly - and easily - available.

-Barry

--
nosy: +barry

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



[issue18192] Move imp.get_magic() to importlib

2013-06-11 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

On Jun 11, 2013, at 08:44 PM, Brett Cannon wrote:

As part of deprecating imp, need to move imp.get_magic() to importlib where
it now belongs. Will be exposed as an attribute instead of a function,
though.

so, importlib.magic ?

--
nosy: +barry

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



[issue18192] Move imp.get_magic() to importlib

2013-06-11 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

I'd like to see it be more easily accessible.

--

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



[issue18157] remove usage of imp.load_module() from pydoc

2013-06-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2c747be20d05 by Brett Cannon in branch 'default':
Issue #18157: stop using imp.load_module() in imp.
http://hg.python.org/cpython/rev/2c747be20d05

--
nosy: +python-dev

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



[issue18157] remove usage of imp.load_module() from pydoc

2013-06-11 Thread Brett Cannon

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


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

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



[issue18158] Delete test_importhooks

2013-06-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 176fe1f8496f by Brett Cannon in branch 'default':
Issue #18158: delete test_importhooks. Redundant in the face of
http://hg.python.org/cpython/rev/176fe1f8496f

--
nosy: +python-dev

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



[issue14797] Deprecate imp.find_module()/load_module()

2013-06-11 Thread Brett Cannon

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


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

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



[issue18158] Delete test_importhooks

2013-06-11 Thread Brett Cannon

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


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

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



[issue18186] 2.x subprocess contains set notation

2013-06-11 Thread Ned Deily

Ned Deily added the comment:

Your proposed change would still not make the source compatible with Python 2.2 
(released over a decade ago) as set() was introduced in 2.4. When the 
subprocess module was introduced back then, it made sense to maintain 
compatibility with then-recent releases but it no longer makes sense when 
Python 2.7 is reaching the end of its life and all previous versions of Python 
2 are retired or no longer receive bug fixes.  In Python 3, a number of these 
compatibility claims have been removed from the source, including the one in 
subprocess.  We could do a comment cleanup in the Python 2 source, as well, but 
at this point it hardly seems worth it.  And since we do no testing against 
previously retired releases, making this code change is no guarantee that the 
module would really work in any previous version of Python 2.x.  That's for you 
to decide if you are backporting to these unsupported versions.

--
nosy: +ned.deily
resolution: invalid - out of date
status: open - closed

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



[issue18186] 2.x subprocess contains set notation

2013-06-11 Thread Daniel Farina

Daniel Farina added the comment:

Okay, fair enough, in that case, here's a patch to fix the documentation as to 
not make incorrect statements.

--
status: closed - open
Added file: 
http://bugs.python.org/file30549/fix-subprocess-compat-documentation-v1.patch

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



[issue18187] Fix broken link in Doc/library/venv.rst

2013-06-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b1eeda9db91d by Ned Deily in branch '3.3':
Issue #18187: Fix broken link in venv documentation. Patch by Berker Peksag.
http://hg.python.org/cpython/rev/b1eeda9db91d

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

--
nosy: +python-dev

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



[issue18187] Fix broken link in Doc/library/venv.rst

2013-06-11 Thread Ned Deily

Ned Deily added the comment:

Thanks for the patch!

--
nosy: +ned.deily
resolution:  - fixed
stage:  - committed/rejected
status: open - closed

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



[issue18186] 2.x subprocess contains set notation

2013-06-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4b2fdd4dd700 by Ned Deily in branch '2.7':
Issue #18186: remove obsolete 2.2 compatibility comment.
http://hg.python.org/cpython/rev/4b2fdd4dd700

--
nosy: +python-dev

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



[issue18186] 2.x subprocess contains set notation

2013-06-11 Thread Ned Deily

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


--
status: open - closed

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



[issue18192] Move imp.get_magic() to importlib

2013-06-11 Thread Arfrever Frehtes Taifersar Arahesis

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


--
nosy: +Arfrever

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



[issue18193] Move imp.reload() to importlib

2013-06-11 Thread Arfrever Frehtes Taifersar Arahesis

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


--
nosy: +Arfrever

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



[issue18194] Move imp.source_from_cache/cache_from_source to importlib

2013-06-11 Thread Arfrever Frehtes Taifersar Arahesis

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


--
nosy: +Arfrever

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



[issue18195] error when deep copying module is confusing

2013-06-11 Thread mrjbq7

New submission from mrjbq7:

If you have a simple module (say foo.py):

$ cat foo.py
bar = 1

You get weird errors when trying to deep copy them (which I did by accident, 
not intentionally trying to deep copy modules):

Python 2.7.2:

 import foo
 import copy
 copy.deepcopy(foo)
Traceback (most recent call last):
  File stdin, line 1, in module
  File 
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py,
 line 190, in deepcopy
y = _reconstruct(x, rv, 1, memo)
  File 
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py,
 line 334, in _reconstruct
state = deepcopy(state, memo)
  File 
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py,
 line 163, in deepcopy
y = copier(x, memo)
  File 
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py,
 line 257, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
  File 
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py,
 line 163, in deepcopy
y = copier(x, memo)
  File 
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py,
 line 257, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
  File 
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py,
 line 190, in deepcopy
y = _reconstruct(x, rv, 1, memo)
  File 
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py,
 line 329, in _reconstruct
y = callable(*args)
  File 
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy_reg.py,
 line 93, in __newobj__
return cls.__new__(cls, *args)
TypeError: object.__new__(NotImplementedType) is not safe, use 
NotImplementedType.__new__()

Python 3.3.2:

 import foo
 import copy
 copy.deepcopy(foo)
Traceback (most recent call last):
  File stdin, line 1, in module
  File /usr/lib/python3.3/copy.py, line 174, in deepcopy
y = _reconstruct(x, rv, 1, memo)
  File /usr/lib/python3.3/copy.py, line 301, in _reconstruct
y.__dict__.update(state)
AttributeError: 'NoneType' object has no attribute 'update'

I'm not expecting to be able to deep copy a module, but it would be really 
great if it is not possible for the error message to say something like 
deepcopy doesn't work for modules rather than two different funky tracebacks 
that don't really explain the problem...

Thanks,

--
messages: 190996
nosy: mrjbq7
priority: normal
severity: normal
status: open
title: error when deep copying module is confusing

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



[issue16487] Allow ssl certificates to be specified from memory rather than files.

2013-06-11 Thread Brandon Craig Rhodes

Brandon Craig Rhodes added the comment:

Kristján, your patch is a wonderful idea—I am about to commit production code 
that will have to create tens of thousands of temporary files during operation, 
one file each time SSL is started up on a socket, which could be avoided if 
something like this patch were applied. I had always assumed that it was simply 
a limitation of the underlying SSL library! An interface that takes a filename 
like this, instead of a live file-like object, seems so un-Pythonic that I 
assumed the only reason for it was a limitation in OpenSSL. Thank you very much 
for looking under the covers and discovering that this was not the case!

I do, though, feel a slight twinge when we add Even More Parameters to a 
Standard Library routine but in such a way that it cannot be used with an 
existing parameter — as here in your patch, where we gain a parameter like 
`certdata` that cannot be (should not be?) used at the same time as `certfile`. 
It seems redundant to have two names for the same parameter to the underlying 
library, and makes it look like the routine needs more information than it 
really does.

Since my own instinct was to think, ten minutes ago, Maybe I can pass a 
StringIO, since it says it wants a fine!, I am very much in support of the 
idea of keeping only the existing parameters, but making them accept both 
strings (which, for compatibility, would continue to be interpreted as 
filenames) and file-like objects as arguments. I think this would have a great 
deal of symmetry with how other parts of the Standard Library work, while 
keeping this patch's central value of making it possible for those of us with 
cert-heavy code to avoid the creation of thousands of files a minute.

Again, thank you VERY much for discovering that OpenSSL can do this, and I will 
try to provide whatever encouragement I can as you try to shepherd this past 
the other committers.

--
nosy: +brandon-rhodes

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



[issue18147] SSL: diagnostic functions to list loaded CA certs

2013-06-11 Thread Christian Heimes

Christian Heimes added the comment:

New patch

* method has been renamed to get_ca_list() and returns only CA certs
* get_ca_list(binary_form=True) returns CA certs in DER format
* cert_store_stats() returns three elements: X.509 CA cert count, X.509 non-CA 
count and CRL count

--
Added file: http://bugs.python.org/file30550/ssl_ca_stats2.patch

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



[issue18163] Add a 'key' attribute to KeyError

2013-06-11 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Since the key is already accessible via the args attribute, what is the point 
of a new attribute?

 d = {}
 try:
d['roger']
except KeyError as e:
print(e.args)


('roger',)

--
nosy: +rhettinger

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



[issue18153] python imaplib - error 'unexpected repsonse'

2013-06-11 Thread tahnoon pasha

tahnoon pasha added the comment:

I'll log this at the davmail forums too and report back if I get a response 
there.

--

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



[issue18163] Add a 'key' attribute to KeyError

2013-06-11 Thread R. David Murray

R. David Murray added the comment:

Making it unambiguous what piece of data is being retrieved, and allowing new 
code to have a more complex message than just 'Keyerror: ' and still be 
able to get at only the missing key.

--

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



[issue18195] error when deep copying module is confusing

2013-06-11 Thread R. David Murray

R. David Murray added the comment:

Well, we don't generally complicate the code to handle edge cases.  That said, 
it might not be too complicated to add copy protocol methods to the module 
object which just raise a more useful error.

--
nosy: +r.david.murray

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



[issue17838] Can't assign a different value for sys.stdin in IDLE

2013-06-11 Thread Roger Serwy

Roger Serwy added the comment:

I'm closing this issue as the original problem reported has been resolved.

--
stage: needs patch - committed/rejected
status: open - closed

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



[issue5492] Error on leaving IDLE with quit() or exit() under Linux

2013-06-11 Thread Roger Serwy

Roger Serwy added the comment:

I noticed that the tracebacks didn't occur in 2.7 due to 872a3aca2120, but that 
patch was not grafted onto the 3.x branches. I'll take care of that.

With #13495 fixed, the two errors mentioned in msg187323 do not occur with the 
_rev1 patch applied.

--

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



[issue5492] Error on leaving IDLE with quit() or exit() under Linux

2013-06-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ca8e86711403 by Roger Serwy in branch '2.7':
#5492: Avoid traceback when exiting IDLE caused by a race condition.
http://hg.python.org/cpython/rev/ca8e86711403

New changeset da852f5250af by Roger Serwy in branch '3.3':
#5492: Avoid traceback when exiting IDLE caused by a race condition.
http://hg.python.org/cpython/rev/da852f5250af

New changeset 187da33826eb by Roger Serwy in branch 'default':
#5492: merge with 3.3
http://hg.python.org/cpython/rev/187da33826eb

--
nosy: +python-dev

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



[issue5492] Error on leaving IDLE with quit() or exit() under Linux

2013-06-11 Thread Roger Serwy

Roger Serwy added the comment:

This issue is now fixed. Thank you everyone for helping!

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

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



[issue18196] IDLE: forward apply patch for handling SystemExit

2013-06-11 Thread Roger Serwy

New submission from Roger Serwy:

As a formality, I opened this issue to apply 872a3aca2120 to the 3.x branch. 
This addresses a concern brought up by Terry in msg187323 from issue5492. 
Here's the relevant part of the message:


Without or with patch, quit() or exit brings up TK box
(?) The program is still running!
Do you want to kill it?
[OK]  [Cancel]
Did this always happen?

[Cancel] causes traceback (not good, regression?)
Traceback (most recent call last):
  File pyshell#0, line 1, in module
quit()
  File D:\Python\dev\cpython\lib\site.py, line 356, in __call__
raise SystemExit(code)
SystemExit: None


--
assignee: roger.serwy
components: IDLE
files: catch_exit.patch
keywords: patch
messages: 191007
nosy: rhettinger, roger.serwy, terry.reedy
priority: low
severity: normal
stage: patch review
status: open
title: IDLE: forward apply patch for handling SystemExit
type: behavior
versions: Python 3.3, Python 3.4
Added file: http://bugs.python.org/file30551/catch_exit.patch

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



[issue18196] IDLE: forward apply patch for handling SystemExit

2013-06-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0e56d4e3 by Roger Serwy in branch '3.3':
#18196: Avoid displaying spurious SystemExit tracebacks.
http://hg.python.org/cpython/rev/0e56d4e3

New changeset 479aad3bb122 by Roger Serwy in branch 'default':
#18196: merge with 3.3
http://hg.python.org/cpython/rev/479aad3bb122

--
nosy: +python-dev

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



[issue18167] cgi.FieldStorage fails to handle multipart/form-data when \r\n appears at end of 65535 bytes without other newlines

2013-06-11 Thread Ben Hearsum

Changes by Ben Hearsum bhear...@gmail.com:


--
nosy: +Ben.Hearsum

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



[issue18196] IDLE: forward apply patch for handling SystemExit

2013-06-11 Thread Roger Serwy

Roger Serwy added the comment:

And it's applied.

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

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



[issue6632] Include more chars in the decimal codec

2013-06-11 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

This is essentially a duplicate of #10581, so I am closing this and will 
summarize the situation there.

--
resolution:  - duplicate
status: open - closed
superseder:  - Review and document string format accepted in numeric data type 
constructors

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



[issue10581] Review and document string format accepted in numeric data type constructors

2013-06-11 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

It looks like we a approaching consensus on some points:

1. Mixed script numerals should be disallowed.
2. '\N{MINUS SIGN}' should be accepted as an alternative to '\N{HYPHEN-MINUS}'

Open question: should we accept fullwidth + and -, sub/superscript variants 
etc.?  I believe rather than debating variant codepoints one by one, we should 
consider applying NFKC (compatibility) normalization to unicode strings to be 
interpreted as numbers.  This would allow parsing strings like this:

 float(normalize('NFKC', '\N{FULLWIDTH HYPHEN-MINUS}\N{DIGIT ONE FULL 
 STOP}\N{FULLWIDTH DIGIT TWO}'))
-1.2

--

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