[issue15767] add ModuleNotFoundError

2013-02-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

from foo import bar

Here bar can be not module, but an attribute of foo (for example, os.path). 
What error will be raised in this case? Module or attribute - this is an 
implementation detail; why do we distinguish between these cases?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue13124] Add "Running a Build Slave" page to the devguide

2013-02-17 Thread Stefan Krah

Stefan Krah added the comment:

Eric Snow  wrote:
> Looking this over, it seems like there were outstanding objections to adding 
> this to the devguide and to the content.

I have no issues with the content of the second patch. However, snakebite
has changed the situation a little: We don't need more buildbots, we need
experts in AIX and HP-UX.

For DragonFlyBSD, NetBSD and OpenBSD we'd ideally need someone who reports the
OS bugs (there are a couple) upstream so that the bots finally turn green and
become useful.

So on fact the first paragraph of the patch is now a little outdated.

Given the current situation I think it would be more useful to add

http://mail.python.org/pipermail/python-dev/2012-September/121651.html

to the devguide.

--

___
Python tracker 

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



[issue17044] Implement PEP 422: Simple class initialisation hook

2013-02-17 Thread Daniel Urban

Daniel Urban added the comment:

Thanks for the grammar correction, I've fixed it in the new patch.

The new patch also adds object.__init_class__ (which is a no-op), to support 
cooperative multiple inheritance of __init_class__. (Adding type.__init_class__ 
was mentioned in the python-dev discussion, but that is not sufficient, so I've 
added this method to object instead of type.)

Tests are also updated. I'll update the docs, if this change is OK.

--
Added file: http://bugs.python.org/file29097/pep422_4.patch

___
Python tracker 

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



[issue17044] Implement PEP 422: Simple class initialisation hook

2013-02-17 Thread Daniel Urban

Changes by Daniel Urban :


Removed file: http://bugs.python.org/file29097/pep422_4.patch

___
Python tracker 

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



[issue17044] Implement PEP 422: Simple class initialisation hook

2013-02-17 Thread Daniel Urban

Changes by Daniel Urban :


Added file: http://bugs.python.org/file29098/pep422_4.patch

___
Python tracker 

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



[issue15004] add weakref support to types.SimpleNamespace

2013-02-17 Thread Antoine Pitrou

Antoine Pitrou added the comment:

No, you should also test the weakref returns None once the object is garbage 
collected.

--

___
Python tracker 

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



[issue17044] Implement PEP 422: Simple class initialisation hook

2013-02-17 Thread Nick Coghlan

Nick Coghlan added the comment:

Ah, I think I see your point - because __init_class__ is supposed to be a class 
method on instances of the metaclass, the anchor needs to be on object (the 
highest level instance of the default metaclass), not on type if we don't want 
super to behave strangely?

I think that's a valid conclusion (albeit a very subtle difference relative to 
an ordinary method on type), and compared to the tapdancing we do in __new__ 
and __init__ to help them be valid anchors for cooperative multiple 
inheritance, adding object.__init_class__ is a relatively minor thing.

If you wanted to propose a patch to the PEP as well, that would be great.

--

___
Python tracker 

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



[issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk

2013-02-17 Thread Stefan Krah

Stefan Krah added the comment:

Serhiy Storchaka  wrote:
> >  { path: [string, bytes, int] => path_converter => path_t },
>
> And register types somewhere:

I must admit that I had a similar thought when I first heard about the project:
If we're going through all this anyway, why not have a registry with signatures
and type annotations for all functions?

But since we're dealing with C files, intuitively I think it's better to stick
to C conventions.

Imagine that the preprocessor had full-blown C parser support, so we could
declare:

  static int
  path_converter(/* [string, bytes, int] */ PyObject *o, void *p) {

Later we tell the preprocessor to generate a function taking an argument "path"
of type [string, bytes, int] that will be passed on to path_converter().

In the absence of type inference, it feels natural to me to declare the
type in both places.

What *is* a problem is that we need some discipline in case the type of
path_converter() changes at some point, since the C compiler won't know
about [string, bytes, int].

--

___
Python tracker 

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



[issue17216] sparc linux build fails with "could not import runpy module"

2013-02-17 Thread uservorname usernachname

uservorname usernachname added the comment:

Thanks for your hint. I did:
./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info 
--bindir=/usr  --sysconfdir=/etc --sbindir=/usr/sbin/ & make 2>&1 | tee 
build-log.txt

and get:

gcc -pthread -fPIC -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall 
-Wstrict-prototypes -I./Include -I. 
-I/c/backup/fes-a120d19nas/Python-3.3.0/Include 
-I/c/backup/fes-a120d19nas/Python-3.3.0 -c 
/c/backup/fes-a120d19nas/Python-3.3.0/Modules/_hashopenssl.c -o 
build/temp.linux-padre-3.3/c/backup/fes-a120d19nas/Python-3.3.0/Modules/_hashopenssl.o
gcc -pthread -shared 
build/temp.linux-padre-3.3/c/backup/fes-a120d19nas/Python-3.3.0/Modules/_hashopenssl.o
 -L/usr/local/lib -lssl -lcrypto -o 
build/lib.linux-padre-3.3/_hashlib.cpython-33m.so
make: *** [sharedmods] Error 138

I also tried to compile with ./configure --build=sparc-linux but it results in 
getting the same make error.

Maybe it have to do something with uname --m
padre
?
When compiling other programs I have to set build=sparc-linux But as you can 
see its using here  linux-padre. Also gcc is using sparc-unkown-linux

If you need any other information let me know it.

--
Added file: http://bugs.python.org/file29099/config.log

___
Python tracker 

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



[issue17191] pdb list shows unexpected code when stack frame includes a try / finally block

2013-02-17 Thread Xavier de Gaye

Xavier de Gaye added the comment:

This is fixed in python 3.2 by changeset 670d4cbf1464, and indeed the
'>>' marker is shown at line 8 of pdb_list_bug_reproduce.py when
debugging this (modified for py3) script with python 3.2.

--
nosy: +xdegaye

___
Python tracker 

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



[issue15767] add ModuleNotFoundError

2013-02-17 Thread Brett Cannon

Brett Cannon added the comment:

Eric: knock yourself out. =)

Serhiy: What exception is raised in that situation is controlled by the eval 
loop, not importlib so that would be a separate change. But regardless, there 
is no way to infer whether you expected an attribute or module to be there, 
just that you were after something that didn't exist. But I would argue most 
people import at the module level and not the attribute level, and so raising 
an ModuleNotFoundError would be acceptable.

--

___
Python tracker 

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



[issue17215] documentation misprints

2013-02-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8c7719b06ba6 by Andrew Svetlov in branch '3.3':
Issue #17215: Fix documentation misprints (patch by July Tikhonov)
http://hg.python.org/cpython/rev/8c7719b06ba6

New changeset 627ebd001708 by Andrew Svetlov in branch 'default':
Issue #17215: Fix documentation misprints (patch by July Tikhonov)
http://hg.python.org/cpython/rev/627ebd001708

--
nosy: +python-dev

___
Python tracker 

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



[issue17215] documentation misprints

2013-02-17 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Fixed. July, would you fill Licence agreement 
http://www.python.org/psf/contrib/?

--
nosy: +asvetlov
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue17216] sparc linux build fails with "could not import runpy module"

2013-02-17 Thread uservorname usernachname

uservorname usernachname added the comment:

I also tried to compile with

./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info 
--bindir=/usr  --sysconfdir=/etc --sbindir=/usr/sbin/ --build=sparc-linux 
--libdir=/usr/lib --includedir=/usr/include --datarootdir=/usr/share 
--localedir=/usr/local --host=sparc-linux
which results in the same error. Strange is that i set libdir but it seems that 
is using /usr/local/lib instead of /usr/lib

Attached you will find the output of make ( make 2>&1 | tee build-log.txt )

--
Added file: http://bugs.python.org/file29100/build-log.txt

___
Python tracker 

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



[issue17044] Implement PEP 422: Simple class initialisation hook

2013-02-17 Thread Daniel Urban

Daniel Urban added the comment:

Yes, if we would add a regular (instance) method __init_class__ to type, it 
could (probably) work for regular (non-meta) classes, but not for metaclasses.  
If a metaclass Meta wouldn't define __init_class__ itself, calling 
Meta.__init_class__() in __build_class__ wouldn't work, since Meta would 
inherit the *instance* method from type (its superclass).  We might be able to 
make this work somehow (I'm not sure), but I think adding it to object as a 
classmethod works fine, and doesn't require special casing.

The attached patch documents, that object has an __init_class__ (and also adds 
some extra tests). I'll attach a patch to the PEP as well.

--
Added file: http://bugs.python.org/file29101/pep422_5.patch

___
Python tracker 

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



[issue17044] Implement PEP 422: Simple class initialisation hook

2013-02-17 Thread Daniel Urban

Changes by Daniel Urban :


Added file: http://bugs.python.org/file29102/pep422.patch

___
Python tracker 

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



[issue17211] pkgutil.iter_modules and walk_packages should return a namedtuple

2013-02-17 Thread Ramchandra Apte

Ramchandra Apte added the comment:

Please review.

--

___
Python tracker 

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



[issue12641] Remove -mno-cygwin from distutils

2013-02-17 Thread Roumen Petrov

Roumen Petrov added the comment:

Hi Matthias,

This issue is only for windows.
In scope autotool based builds compiler customization is used to 'transfer' 
some build settings (flags, options)  to distutils. This include compiler set 
in make macro (variable) CC.

Transfer is not complete but this is distutils issue out of scope here.

P.S.
(uploaded a patch to avoid syntax warning)

--
Added file: 
http://bugs.python.org/file29103/0001-MINGW-issue12641-avoid-syntax-warning.patch

___
Python tracker 

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



[issue17219] cross add Python's library directory when building python standard extensions

2013-02-17 Thread Roumen Petrov

New submission from Roumen Petrov:

For native build distutils add current directory to library path. This is not 
activated in case of cross-build.

Before , as part of issue3871 and issue15483, was updated setup.py , but now I 
would like to propose a simple more general solution with attached patch.

--
components: Build
files: 0001-cross-add-current-dir-in-library-path-if-building-py.patch
keywords: patch
messages: 182278
nosy: doko, rpetrov
priority: normal
severity: normal
status: open
title: cross add Python's library directory when building python standard 
extensions
versions: Python 3.4
Added file: 
http://bugs.python.org/file29104/0001-cross-add-current-dir-in-library-path-if-building-py.patch

___
Python tracker 

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



[issue17219] cross add Python's library directory when building python standard extensions

2013-02-17 Thread Roumen Petrov

Changes by Roumen Petrov :


--
components: +Cross-Build -Build
type:  -> compile error

___
Python tracker 

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



[issue14905] zipimport.c needs to support namespace packages when no 'directory' entry exists

2013-02-17 Thread Eric V. Smith

Eric V. Smith added the comment:

I don't think such files are common: I've never seen such a file "in the wild". 
I created one, by accident, while testing PEP 420.

OTOH, it was surprisingly easy to create the malformed file with zipfile.

--

___
Python tracker 

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



[issue17220] Little enhancements of _bootstrap.py

2013-02-17 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

The proposed patch a little cleans and optimizes some bits of _bootstrap.py.

--
components: Interpreter Core
files: _bootstrap.diff
keywords: patch
messages: 182280
nosy: brett.cannon, ncoghlan, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Little enhancements of _bootstrap.py
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file29105/_bootstrap.diff

___
Python tracker 

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



[issue17197] c/profile refactoring

2013-02-17 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

Of course you're right. I didn't realize that.
How about this (in attachment)?

--
keywords: +patch
Added file: http://bugs.python.org/file29106/profile-refactoring.diff

___
Python tracker 

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



[issue17220] Little enhancements of _bootstrap.py

2013-02-17 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue17219] cross add Python's library directory when building python standard extensions

2013-02-17 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue17044] Implement PEP 422: Simple class initialisation hook

2013-02-17 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue15767] add ModuleNotFoundError

2013-02-17 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue17221] Resort Misc/NEWS

2013-02-17 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

The proposed patch moves some Misc/NEWS entities to more appropriate sections 
(IDLE, C-API, Tests, Documentation, Tools/Demos). Please review.

--
assignee: docs@python
components: Documentation
files: NEWS-3.4.patch
keywords: patch
messages: 182282
nosy: docs@python, eric.araujo, ezio.melotti, georg.brandl, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Resort Misc/NEWS
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file29107/NEWS-3.4.patch

___
Python tracker 

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



[issue17222] py_compile.compile() replaces target files, breaking special files and symlinks

2013-02-17 Thread Arfrever Frehtes Taifersar Arahesis

New submission from Arfrever Frehtes Taifersar Arahesis:

Since d4eb02b6aac9 py_compile.compile() replaces target files, breaking special 
files and symlinks. Any custom permissions set on target files are also lost. 
This is a major regression.

# cd /tmp
# touch test.py
# ls -l /dev/null
crw-rw-rw- 1 root root 1, 3 Feb 17 21:16 /dev/null
# python3.3 -c 'import py_compile; py_compile.compile("test.py", 
cfile="/dev/null")'
# ls -l /dev/null
crw-rw-rw- 1 root root 1, 3 Feb 17 21:16 /dev/null
# python3.4 -c 'import py_compile; py_compile.compile("test.py", 
cfile="/dev/null")'
# ls -l /dev/null
-rw-r- 1 root root 102 Feb 17 21:53 /dev/null

--
messages: 182283
nosy: Arfrever, brett.cannon, eric.snow, ncoghlan
priority: high
severity: normal
status: open
title: py_compile.compile() replaces target files, breaking special files and 
symlinks
versions: Python 3.4

___
Python tracker 

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



[issue17216] sparc linux build fails with "could not import runpy module"

2013-02-17 Thread Ned Deily

Ned Deily added the comment:

I'm glad you got a little further.  Now it seems the build is failing when 
trying to build the _ssl and _hashlib extension modules.

building '_ssl' extension
gcc -pthread -fPIC -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall 
-Wstrict-prototypes -I./Include -I. 
-I/c/backup/fes-a120d19nas/Python-3.3.0/Include 
-I/c/backup/fes-a120d19nas/Python-3.3.0 -c 
/c/backup/fes-a120d19nas/Python-3.3.0/Modules/_ssl.c -o 
build/temp.linux-padre-3.3/c/backup/fes-a120d19nas/Python-3.3.0/Modules/_ssl.o
gcc -pthread -shared 
build/temp.linux-padre-3.3/c/backup/fes-a120d19nas/Python-3.3.0/Modules/_ssl.o 
-L/usr/local/lib -lssl -lcrypto -o build/lib.linux-padre-3.3/_ssl.cpython-33m.so
*** WARNING: renaming "_ssl" since importing it failed: 
build/lib.linux-padre-3.3/_ssl.cpython-33m.so: undefined symbol: time, version 
key
building '_hashlib' extension
gcc -pthread -fPIC -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall 
-Wstrict-prototypes -I./Include -I. 
-I/c/backup/fes-a120d19nas/Python-3.3.0/Include 
-I/c/backup/fes-a120d19nas/Python-3.3.0 -c 
/c/backup/fes-a120d19nas/Python-3.3.0/Modules/_hashopenssl.c -o 
build/temp.linux-padre-3.3/c/backup/fes-a120d19nas/Python-3.3.0/Modules/_hashopenssl.o
gcc -pthread -shared 
build/temp.linux-padre-3.3/c/backup/fes-a120d19nas/Python-3.3.0/Modules/_hashopenssl.o
 -L/usr/local/lib -lssl -lcrypto -o 
build/lib.linux-padre-3.3/_hashlib.cpython-33m.so
make: *** [sharedmods] Error 138

Both of these modules are dependent on libssl and libcrypto, both normally 
supplied by openssl.  In the main setup.py file which is used to build the 
interpreter's extension modules, there are tests for the presence of these libs 
and their corresponding include files (setup.py line 759).  There are a list of 
locations that are searched including the standard system locations and 
/usr/local/ssl and /usr/contrib/ssl.  Apparently, setup.py is finding both 
includes and libs in one of those directories because otherwise it would skip 
attempting to build _ssl altogether.  But for some reason the link step fails 
with the undefined symbol message.  And then it seems that the _hashlib step 
fails altogether.  I have no personal experience with sparc linux installs, 
much less with the ReadyNAS (and I doubt anyone else here does either), so I 
can only speculate that the most likely cause of this failure is a broken 
openssl installation.  I'd check the above locations as well as under /usr/lib 
an
 d /usr/include.  If you are using a package manager to install openssl, make 
sure it is a dev version with headers, like libssl-dev.  Good luck!

--

___
Python tracker 

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



[issue17012] Differences between /usr/bin/which and shutil.which()

2013-02-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Ping.

--

___
Python tracker 

___
___
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-02-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Ping.

--

___
Python tracker 

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



[issue17221] Resort Misc/NEWS

2013-02-17 Thread Antoine Pitrou

Antoine Pitrou added the comment:

unittest is a library, not a part of the test suite, so its enhancements should 
remain in the library section.

--
nosy: +pitrou

___
Python tracker 

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



[issue17212] os.path.isfile() in Python 3.3 sometimes fails

2013-02-17 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +haypo

___
Python tracker 

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



[issue17212] os.path.isfile() in Python 3.3 sometimes fails

2013-02-17 Thread STINNER Victor

STINNER Victor added the comment:

Looks like a duplicate of issue #17137.
Le 17 févr. 2013 23:08, "Antoine Pitrou"  a écrit :

>
> Changes by Antoine Pitrou :
>
>
> --
> nosy: +haypo
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue12596] cPickle - stored data differ for same dictionary

2013-02-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a minimal reproducer. Results:

pickle.dumps('spam', 2)
0: \x80 PROTO  2
2: USHORT_BINSTRING 'spam'
8: qBINPUT 0
   10: .STOP
highest protocol among opcodes = 2

pickle.dumps('spam1'[:-1], 2)
0: \x80 PROTO  2
2: USHORT_BINSTRING 'spam'
8: qBINPUT 0
   10: .STOP
highest protocol among opcodes = 2

cPickle.dumps('spam', 2)
0: \x80 PROTO  2
2: USHORT_BINSTRING 'spam'
8: qBINPUT 1
   10: .STOP
highest protocol among opcodes = 2

cPickle.dumps('spam1'[:-1], 2)
0: \x80 PROTO  2
2: USHORT_BINSTRING 'spam'
8: .STOP
highest protocol among opcodes = 2

The difference between 3rd and 4th examples is "BINPUT 1". In the last case the 
string has refcount=1 and BINPUT doesn't emitted due to optimization. Note that 
Python implementation emits BINPUT with different number.

--
Added file: http://bugs.python.org/file29108/cPickletest2.py

___
Python tracker 

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



[issue17047] Fix double double words words

2013-02-17 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
stage: needs patch -> patch review

___
Python tracker 

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



[issue13169] Regular expressions with 0 to 65536 repetitions raises OverflowError

2013-02-17 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis added the comment:

Some third-party modules (e.g. epydoc) refer to sre_constants.MAXREPEAT.
Please add 'from _sre import MAXREPEAT' to Lib/sre_constants.py for 
compatibility.

--
nosy: +Arfrever
resolution: fixed -> 
stage: committed/rejected -> 
status: closed -> open

___
Python tracker 

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



[issue17223] Initializing array.array with unicode type code and buffer segfaults

2013-02-17 Thread Manuel Jacob

New submission from Manuel Jacob:

>>> from array import array
>>> str(array('u', b'asdf'))
[1]19411 segmentation fault (core dumped)  python

This error occures with Python 3.3 and hg tip but not with Python 3.2.

--
components: Library (Lib), Unicode
messages: 182291
nosy: ezio.melotti, mjacob
priority: normal
severity: normal
status: open
title: Initializing array.array with unicode type code and buffer segfaults
type: crash
versions: Python 3.3, Python 3.4

___
Python tracker 

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



[issue17223] Initializing array.array with unicode type code and buffer segfaults

2013-02-17 Thread Manuel Jacob

Manuel Jacob added the comment:

The attached patch fixes the crash.

Output:
>>> from array import array
>>> str(array('u', b'asdf'))
Traceback (most recent call last):
  File "", line 1, in 
ValueError: character U+66647361 is not in range [U+; U+10]

--
keywords: +patch
Added file: http://bugs.python.org/file29109/issue17223.diff

___
Python tracker 

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



[issue17223] Initializing array.array with unicode type code and buffer segfaults

2013-02-17 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +haypo
stage:  -> patch review

___
Python tracker 

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



[issue17223] Initializing array.array with unicode type code and buffer segfaults

2013-02-17 Thread Ezio Melotti

Ezio Melotti added the comment:

Thanks for the report and the patch.
Could you also include a test for this?

--

___
Python tracker 

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



[issue17223] Initializing array.array with unicode type code and buffer segfaults

2013-02-17 Thread Manuel Jacob

Manuel Jacob added the comment:

I've attached a new patch with a test that segfaults on Python 3.3 and passes 
on hg tip with the patch applied.

--
Added file: http://bugs.python.org/file29110/issue17223_with_test.diff

___
Python tracker 

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



[issue17221] Resort Misc/NEWS

2013-02-17 Thread Ned Deily

Ned Deily added the comment:

kbk has requested in the past that IDLE News items be put in 
Lib/idlelib/News.txt because it is installed with IDLE and there is a button to 
display it included in the "About IDLE" window.  I know we've not been diligent 
about doing that, at least, I haven't.  I suppose the items could continue to 
be put in Misc/NEWS and, prior to each release, copied into the News.txt.  That 
step could be added to the release manager's checklist.  But, if there are IDLE 
items in Misc/NEWS, whether duplicated or not, I agree it would be better to 
have them in their own section.

--
nosy: +ned.deily

___
Python tracker 

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



[issue6975] symlinks incorrectly resolved on POSIX platforms

2013-02-17 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis added the comment:

The above revisions have broken handling of arguments with >=2 "..".

Before these revisions:

$ cd /usr/bin
$ python3.2 -c 'import os; print(os.path.realpath(".."))'
/usr
$ python3.2 -c 'import os; print(os.path.realpath("../.."))'
/
$ python3.2 -c 'import os; print(os.path.realpath("../../.."))'
/
$ python3.2 -c 'import os; print(os.path.realpath("../../../.."))'

After these revisions:

$ cd /usr/bin
$ python3.2 -c 'import os; print(os.path.realpath(".."))'
/usr
$ python3.2 -c 'import os; print(os.path.realpath("../.."))'
/usr/bin
$ python3.2 -c 'import os; print(os.path.realpath("../../.."))'
/usr
$ python3.2 -c 'import os; print(os.path.realpath("../../../.."))'
/usr/bin

--
nosy: +Arfrever, benjamin.peterson, larry
priority: normal -> release blocker
resolution: fixed -> 
stage: committed/rejected -> 
status: closed -> open

___
Python tracker 

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



[issue6975] symlinks incorrectly resolved on POSIX platforms

2013-02-17 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis added the comment:

The actual output of last command in "Before these revisions:" is: /

--

___
Python tracker 

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



[issue16893] Create IDLE help.txt from Doc/library/idle.rst

2013-02-17 Thread Zachary Ware

Zachary Ware added the comment:

Actually, I have an objection myself.  In merging this patch with another I'm 
working on, I noticed that I failed to include the new 'idledoc' target in the 
Makefile usage message.  The attached patch fixes that oversight.

--
Added file: http://bugs.python.org/file29111/issue16893_makefiles.v2.diff

___
Python tracker 

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



[issue17223] Initializing array.array with unicode type code and buffer segfaults

2013-02-17 Thread STINNER Victor

Changes by STINNER Victor :


--
versions: +Python 2.7, Python 3.2

___
Python tracker 

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



[issue17223] Initializing array.array with unicode type code and buffer segfaults

2013-02-17 Thread STINNER Victor

STINNER Victor added the comment:

issue17223_with_test.diff looks good to me (we may just drop {...} around 
return NULL).

--

___
Python tracker 

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



[issue16893] Create IDLE help.txt from Doc/library/idle.rst

2013-02-17 Thread Ned Deily

Ned Deily added the comment:

There are a few problems with the proposed patch (v2).  I commented on those in 
Rietveld.  But, beyond that, I'm not convinced that the generated help.txt is 
an improvement over the original help.txt.  While it is formatted more 
consistently (a good thing), it is significantly longer (547 lines vs 369).  
Some info is lost in the translation, for one, the menu div bars (---).  Some 
of the markup looks odd to me as plain text, for example:

Upon startup with the ``-s`` option, IDLE will execute the file
referenced by the environment variables ``IDLESTARTUP`` or
``PYTHONSTARTUP``. IDLE first checks for ``IDLESTARTUP``; if
``IDLESTARTUP`` is present the file referenced is run.  If 
``IDLESTARTUP`` is not present, IDLE checks for ``PYTHONSTARTUP``.

Also, I noticed that the deprecation notice, about running without a 
subprocess, near the end of the help text seems to be missing from the .rst.

--
nosy: +ned.deily

___
Python tracker 

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



[issue16893] Create IDLE help.txt from Doc/library/idle.rst

2013-02-17 Thread Ned Deily

Ned Deily added the comment:

For comparison, here's a copy of the new rendered help.txt.

--
Added file: http://bugs.python.org/file29112/help.txt

___
Python tracker 

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



[issue15435] Strange behavior when AttributeError raise inside a property get function

2013-02-17 Thread Yariv

Yariv added the comment:

Duplicate of http://bugs.python.org/issue1615 , which is open.

--
nosy: +Yariv

___
Python tracker 

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