Re: Why has __new__ been implemented as a static method?

2014-05-04 Thread Gregory Ewing

Steven D'Aprano wrote:
If it were a class method, you would call it by MyBaseClass.__new__() 
rather than explicitly providing the cls argument.


But that wouldn't be any good, because the base __new__
needs to receive the actual class being instantiated,
not the class that the __new__ method belongs to.

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


Re: Bug in Decimal??

2014-05-04 Thread Mark Dickinson
On Tue, 29 Apr 2014 19:37:17 -0700, pleasedontspam wrote:

 Hello, I believe I found a bug in the Decimal library. The natural logarithm
 results seem to be off in a certain range, as compared with Wolfram Alpha.

I had a quick look: this isn't a bug - it's just the result of propagation of
the error in partial to final.

In more detail: we've got a working precision of 2016 significant figures.  For
any small x, we have (1 + x) / (1 - x) = 1 + 2x + 2x^2 + 2x^3 +   For your
value of x, `Decimal('1e-1007'), we've got enough precision to store
1 + 2x + 2x^2 exactly, but that's all.

So partial has an absolute error of around 2x^3, or 2e-3021.

And since the derivative of the natural log function is almost exactly 1 at the
point we're interested in, we expect the absolute error in the output to be
close to 2e-3021, too.

And that's *precisely* what you're seeing: the Decimal module is giving you a
result that's exactly `Decimal('2e-1007') - Decimal('1.3e-3021')`, while the
result you were expecting is `Decimal('2e-1007') + Decimal('0.7e-3021')`.  A
difference of exactly `Decimal('2e-3021')`, as expected.

-- 
Mark


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


Re: tkinter: invisible PanedWindow sashes on OS X

2014-05-04 Thread draganov93
Hi to all,

I have a similar problem.
I have a PanedWindow with a lot of checkboxes in it and i want to make the 
checkboxes non-resizable.How can i achieve this?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re:Python Image Registration and Cropping?

2014-05-04 Thread Dave Angel
mikejohnrya...@gmail.com Wrote in message:
 Hello,
 
 Is there a Python tool or function that can register two images together 
 (line them up visually), and then crop them to the common overlap area?  I'm 
 assuming this can probably be done with Python Imaging Library but I'm not 
 very familiar with it yet.
 
 Any help or advice is appreciated!
 
 Thanks!
 

Without some context I'd call the problem intractable.  I've done
 such things using Photoshop to insert elements of one image into
 another.  But even describing an algorithm is difficult,  never
 mind trying to code it.

If I had such a challenge,  I'd probably use Pillow, but not till
 I knew what subset I was solving. 

1) you had an image, saved in lossless tiff, and it was copied
 twice,  each was edited and cropped,   and the original lost. 
 Analyze the two remaining tiff,  and try to reconstruct the
 largest common subset.

2) You have two faxes from filled in versions of the same original
 form,  and you're trying to extract just the handwriting portions
 of each. Very tricky,  because not only exposure differences, 
 but registration will vary over the surface,  because of moisture
 and irregular feed from multiple rollers. 

3) You have two jpegs, created from same master,  but one has been
 scaled, rotated, cropped, and color corrected.  Even without
 color correction,  one was saved at a different quality setting, 
 or prepared with a different raw converter. 

4) You have two images taken with the same camera, on a tripod,
 within a minute of each other,  with no visible difference of
 cloud cover,  with camera set on full manual,  without auto
 focus. The were converted with the same raw converter, 
 ...

etc.

-- 
DaveA

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


Re: Why has __new__ been implemented as a static method?

2014-05-04 Thread Steven D'Aprano
On Sun, 04 May 2014 20:03:35 +1200, Gregory Ewing wrote:

 Steven D'Aprano wrote:
 If it were a class method, you would call it by MyBaseClass.__new__()
 rather than explicitly providing the cls argument.
 
 But that wouldn't be any good, because the base __new__ needs to receive
 the actual class being instantiated, not the class that the __new__
 method belongs to.


Which is exactly what method descriptors -- whether instance methods or 
class descriptors -- can do. Here's an example, using Python 2.7:

class MyDict(dict):
@classmethod
def fromkeys(cls, *args, **kwargs):
print Called from, cls
return super(MyDict, cls).fromkeys(*args, **kwargs)

class AnotherDict(MyDict):
pass


And in use:

py MyDict.fromkeys('abc')
Called from class '__main__.MyDict'
{'a': None, 'c': None, 'b': None}
py AnotherDict().fromkeys('xyz')
Called from class '__main__.AnotherDict'
{'y': None, 'x': None, 'z': None}


In both cases, MyDict's __new__ method receives the class doing the 
calling, not the class where the method is defined.

Whatever the difficulty is with __new__, it isn't something obvious.


-- 
Steven D'Aprano
http://import-that.dreamwidth.org/
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python Image Registration and Cropping?

2014-05-04 Thread Ian Kelly
On Sun, May 4, 2014 at 7:24 AM, Dave Angel da...@davea.name wrote:
 mikejohnrya...@gmail.com Wrote in message:
 Hello,

 Is there a Python tool or function that can register two images together 
 (line them up visually), and then crop them to the common overlap area?  I'm 
 assuming this can probably be done with Python Imaging Library but I'm not 
 very familiar with it yet.

 Any help or advice is appreciated!

 Thanks!


 Without some context I'd call the problem intractable.  I've done
  such things using Photoshop to insert elements of one image into
  another.  But even describing an algorithm is difficult,  never
  mind trying to code it.

Well, fortunately there are known algorithms already:
http://en.wikipedia.org/wiki/Image_registration

 If I had such a challenge,  I'd probably use Pillow, but not till
  I knew what subset I was solving.

I don't think Pillow has any support for registration.  I'd probably
start by looking for Python bindings of a library that does handle it,
like ITK.  Searching for itk python turns up a number of results.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Why has __new__ been implemented as a static method?

2014-05-04 Thread Rotwang

On 04/05/2014 15:16, Steven D'Aprano wrote:

On Sun, 04 May 2014 20:03:35 +1200, Gregory Ewing wrote:


Steven D'Aprano wrote:

If it were a class method, you would call it by MyBaseClass.__new__()
rather than explicitly providing the cls argument.


But that wouldn't be any good, because the base __new__ needs to receive
the actual class being instantiated, not the class that the __new__
method belongs to.



Which is exactly what method descriptors -- whether instance methods or
class descriptors -- can do. Here's an example, using Python 2.7:

class MyDict(dict):
 @classmethod
 def fromkeys(cls, *args, **kwargs):
 print Called from, cls
 return super(MyDict, cls).fromkeys(*args, **kwargs)

class AnotherDict(MyDict):
 pass


And in use:

py MyDict.fromkeys('abc')
Called from class '__main__.MyDict'
{'a': None, 'c': None, 'b': None}
py AnotherDict().fromkeys('xyz')
Called from class '__main__.AnotherDict'
{'y': None, 'x': None, 'z': None}


In both cases, MyDict's __new__ method receives the class doing the
calling, not the class where the method is defined.


Yes, when a classmethod bound to a subclass or an instance is called. 
But this is irrelevant to Gregory's point:


On 04/05/2014 04:37, Steven D'Aprano wrote:

On Sun, 04 May 2014 11:21:53 +1200, Gregory Ewing wrote:

Steven D'Aprano wrote:

I'm not entirely sure what he means by upcalls, but I believe it
means to call the method further up (that is, closer to the base) of
the inheritance tree.


I think it means this:

 def __new__(cls):
MyBaseClass.__new__(cls)

which wouldn't work with a class method, because MyBaseClass.__new__
would give a *bound* method rather than an unbound one.


If it were a class method, you would call it by MyBaseClass.__new__()
rather than explicitly providing the cls argument.



The relevant behaviour is this:

 class C:
@classmethod
def m(cls):
print(Called from, cls)

 class D(C):
@classmethod
def m(cls):
C.m()


 C.m()
Called from class '__main__.C'
 D.m()
Called from class '__main__.C'


If __new__ were a classmethod, then a call to MyBaseClass.__new__() 
within the body of MySubClass.__new__ would pass MyBaseClass to the 
underlying function, not the MySubClass. This means that


class MySubClass(MyBaseClass):
def __new__(cls):
return MyBaseClass.__new__()

would fail, since it would return an instance of MyBaseClass rather than 
MySubClass.

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


Re: Why has __new__ been implemented as a static method?

2014-05-04 Thread Ian Kelly
On Sun, May 4, 2014 at 8:16 AM, Steven D'Aprano
steve+comp.lang.pyt...@pearwood.info wrote:
 On Sun, 04 May 2014 20:03:35 +1200, Gregory Ewing wrote:

 Steven D'Aprano wrote:
 If it were a class method, you would call it by MyBaseClass.__new__()
 rather than explicitly providing the cls argument.

 But that wouldn't be any good, because the base __new__ needs to receive
 the actual class being instantiated, not the class that the __new__
 method belongs to.


 Which is exactly what method descriptors -- whether instance methods or
 class descriptors -- can do. Here's an example, using Python 2.7:

 class MyDict(dict):
 @classmethod
 def fromkeys(cls, *args, **kwargs):
 print Called from, cls
 return super(MyDict, cls).fromkeys(*args, **kwargs)

 class AnotherDict(MyDict):
 pass


 And in use:

 py MyDict.fromkeys('abc')
 Called from class '__main__.MyDict'
 {'a': None, 'c': None, 'b': None}
 py AnotherDict().fromkeys('xyz')
 Called from class '__main__.AnotherDict'
 {'y': None, 'x': None, 'z': None}


 In both cases, MyDict's __new__ method receives the class doing the
 calling, not the class where the method is defined.

 Whatever the difficulty is with __new__, it isn't something obvious.

You cheated on two counts here.  First, you're using super; I think
Guido's comment about upcalls in the link you posted earlier was in
reference to calls that explicitly name the name parent class, i.e.
dict.fromkeys(), not super(MyDict, cls).fromkeys().

Second, you didn't override the method in AnotherDict, so
MyDict.fromkeys and AnotherDict.fromkeys refer to the same method,
the only difference being in which class is passed to the descriptor
when it is accessed.

Compare to this:

class MyDict(dict):
@classmethod
def fromkeys(cls, *args, **kwargs):
print MyDict Called from, cls
return dict.fromkeys(*args, **kwargs)

class AnotherDict(MyDict):
@classmethod
def fromkeys(cls, *args, **kwargs):
print AnotherDict Called from, cls
return MyDict.fromkeys(*args, **kwargs)

 MyDict.fromkeys('abc')
MyDict Called from class '__main__.MyDict'
{'a': None, 'c': None, 'b': None}
 AnotherDict.fromkeys('abc')
AnotherDict Called from class '__main__.AnotherDict'
MyDict Called from class '__main__.MyDict'
{'a': None, 'c': None, 'b': None}
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Glade on Windows using Python

2014-05-04 Thread mbg1708
On Tuesday, April 22, 2014 7:08:29 PM UTC-4, mbg...@planetmail.com wrote:
 Using Windows 8.1 Update.
 
 I've loaded ActiveState python (version 2.7) --- installed OK.
 
 I don't need Glade, but I do want to use some Glade XML and run the python 
 application.
 
 To run a Glade application this needs:
 
 
 
  from gi.repository import Gtk
 
 
 
 gi.repository is not available to import.
 
 
 
 Where can I find gi.repository?all searches to date have come up empty!
 
 
 
 Mary

So...it turns out that Glade support for Python 2.7 is pretty difficult.
I ended up rewriting the whole thing using Tkinter and ttk.Treeview.
It would have been good to reuse the Glade XML...less code, better looking, 
etc. etc.

Ah well.

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


Re: Glade on Windows using Python

2014-05-04 Thread Michael Torrie
On 05/04/2014 01:51 PM, mbg1...@planetmail.com wrote:
 So...it turns out that Glade support for Python 2.7 is pretty difficult.
 I ended up rewriting the whole thing using Tkinter and ttk.Treeview.
 It would have been good to reuse the Glade XML...less code, better looking, 
 etc. etc.

Both Gtk2 and Gtk3 are available for Windows.  Glade XML is typically
used on Gtk2 by the GtkBuilder class
(http://www.pygtk.org/pygtk2reference/class-gtkbuilder.html).  Gtk3 uses
http://python-gtk-3-tutorial.readthedocs.org/en/latest/builder.html.
The code you had in your OP was for Gtk3.

There are up-to-date packages of Gtk3 bindings for Python on Windows here:

http://sourceforge.net/projects/pygobjectwin32/files/

I didn't see your original post a couple of weeks ago, which is too bad.

I'm not sure Gtk is better-looking on Windows.  It's always been the
ugly step-child there compared to Linux.

Tkinter has a Windows native look and feel, so there's no reason to not
use Tkinter if it suits your project:
https://docs.python.org/3/library/tkinter.ttk.html
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python Image Registration and Cropping?

2014-05-04 Thread mikejohnryan08
On Sunday, May 4, 2014 11:51:00 AM UTC-4, Ian wrote:
 On Sun, May 4, 2014 at 7:24 AM, Dave Angel da...@davea.name wrote:
 
  mikejohnrya...@gmail.com Wrote in message:
 
  Hello,
 
 
 
  Is there a Python tool or function that can register two images together 
  (line them up visually), and then crop them to the common overlap area?  
  I'm assuming this can probably be done with Python Imaging Library but I'm 
  not very familiar with it yet.
 
 
 
  Any help or advice is appreciated!
 
 
 
  Thanks!
 
 
 
 
 
  Without some context I'd call the problem intractable.  I've done
 
   such things using Photoshop to insert elements of one image into
 
   another.  But even describing an algorithm is difficult,  never
 
   mind trying to code it.
 
 
 
 Well, fortunately there are known algorithms already:
 
 http://en.wikipedia.org/wiki/Image_registration
 
 
 
  If I had such a challenge,  I'd probably use Pillow, but not till
 
   I knew what subset I was solving.
 
 
 
 I don't think Pillow has any support for registration.  I'd probably
 
 start by looking for Python bindings of a library that does handle it,
 
 like ITK.  Searching for itk python turns up a number of results.

Thanks for the responses.  More specifically, my scenario is that I have many 
aerial image stereo-pairs, and need to register each pair together and crop 
them to their overlapping area.  The output should produce two images with the 
same field-of-view; and the only difference will be the perspective.  Still 
searching for a suitable module that can easily do this sort of thing.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue19576] Non-Python created threads documentation doesn't mention PyEval_InitThreads()

2014-05-04 Thread Jiong Du

Jiong Du added the comment:

this patch made a new issue20891

--
nosy: +lolynx

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



[issue21425] Python 3 pipe handling breaks python mode in emacs on Windows

2014-05-04 Thread Márton Marczell

New submission from Márton Marczell:

When I run a Python 3.3.4 prompt inside Emacs 24.3 on Windows 7, correct 
commands are evaluated immediately, but incorrect ones are delayed (I have to 
press Enter one more time), as seen below:

 1
1
 nonsense

Traceback (most recent call last):
File stdin, line 1, in module
NameError: name 'nonsense' is not defined

Python 2 does not do this. I've filed an Emacs bug report 
(http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17304) and got the response to 
try this on the command line (where cat.exe is from an MSYS installation):

python 21 | cat.exe

and it behaves the same way as in Emacs.

--
components: Windows
messages: 217861
nosy: marczellm
priority: normal
severity: normal
status: open
title: Python 3 pipe handling breaks python mode in emacs on Windows
type: behavior
versions: Python 3.3

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



[issue21422] int 0: return the number unmodified

2014-05-04 Thread Mark Dickinson

Mark Dickinson added the comment:

 Can you sow the overhead of the branch in a microbenchmark?

Conversely, can you show a case where this optimisation provides a benefit in 
real code?  We should be looking for a reason *to* apply the patch, not a 
reason *not* to apply the patch.

--

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



[issue21420] Optimize 2 ** n: implement it as 1 n

2014-05-04 Thread Mark Dickinson

Mark Dickinson added the comment:

Victor, can you demonstrate any cases of real code where this optimization 
makes a significant difference?

There are many, many tiny optimisations we *could* be making in 
Objects/longobject.c; each of those potential optimisations adds to the cost of 
maintaining the code, detracts from readability, and potentially even slows 
down the common cases fractionally.  In general, I think we should only be 
applying this sort of optimization when there's a clear benefit to real-world 
code.  I don't think this one crosses that line.

In the (I suspect rare) cases where a piece of real-world code is slowed down 
significantly due to a non-optimized 2**n, the code author still has the option 
of replacing that piece of code with 1n manually.  And in some cases, that's 
probably the wrong optimization anyway: an expression like `x * 2**n` would be 
better hand-optimized to `x  n`.

IOW, I'm -1 on making this change.

--

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



[issue21405] Allow using symbols from Unicode block Superscripts and Subscripts in identifiers

2014-05-04 Thread Roman Inflianskas

Roman Inflianskas added the comment:

See later discussion there: 
https://mail.python.org/pipermail/python-ideas/2014-May/027767.html

Because of https://mail.python.org/pipermail/python-ideas/2014-May/027789.html 
I'm closing this issue.

--
resolution:  - rejected
status: open - closed

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



[issue21121] -Werror=declaration-after-statement is added even for extension modules through setup.py

2014-05-04 Thread Stefan Krah

Stefan Krah added the comment:

 If you guys want this in 3.4.1, please get it checked in in the next, oh, 
 eight hours.

I can't commit today.  Perhaps one of you wants to take over (I think we all
agree that the third patch is the best).

--

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



[issue21233] Add *Calloc functions to CPython memory allocation API

2014-05-04 Thread Stefan Krah

Stefan Krah added the comment:

STINNER Victor rep...@bugs.python.org wrote:
 My final commit includes an addition to What's New in Python 3.5 doc,
 including a notice in the porting section. It is not enough?

I'm not sure: The usual case with ABI changes is that extensions may segfault
if they are *not* recompiled [1].  In that case documenting it in What's New is
standard procedure.

Here the extension *is* recompiled and still segfaults.

 Even if the API is public, the PyMemAllocator thing is low level. It's not
 part of the stable ABI. Except failmalloc, I don't know any user. I don't
 expect a lot of complain and it's easy to port the code.

Perhaps it's worth asking on python-dev. Nathaniel's suggestion isn't bad
either (e.g. name it PyMemAllocatorEx).

[1] I was told on python-dev that many people in fact do not recompile.

--

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



[issue21088] curses addch() argument position reverses in Python3.4.0

2014-05-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4f26430b03fd by Larry Hastings in branch '3.4':
Issue #21088: Bugfix for curses.window.addch() regression in 3.4.0.
http://hg.python.org/cpython/rev/4f26430b03fd

--
nosy: +python-dev

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



[issue21088] curses addch() argument position reverses in Python3.4.0

2014-05-04 Thread Larry Hastings

Changes by Larry Hastings la...@hastings.org:


--
assignee:  - larry
resolution:  - fixed
stage: needs patch - resolved

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



[issue21088] curses addch() argument position reverses in Python3.4.0

2014-05-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3aa5fae8c313 by Larry Hastings in branch 'default':
Issue #21088: Merge from 3.4.
http://hg.python.org/cpython/rev/3aa5fae8c313

--

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



[issue21121] -Werror=declaration-after-statement is added even for extension modules through setup.py

2014-05-04 Thread Larry Hastings

Larry Hastings added the comment:

Sorry, I should have said 3.4.1rc1.  You can still get it in for 3.4.1.

--

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



[issue21121] -Werror=declaration-after-statement is added even for extension modules through setup.py

2014-05-04 Thread Ronald Oussoren

Ronald Oussoren added the comment:

This is the same issue as Issue18211. As that issue doesn't have a patch and 
this one does, I'm closing Issue18211 as a duplicate.

--
nosy: +ronaldoussoren

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



[issue18211] -Werror=statement-after-declaration problem

2014-05-04 Thread Ronald Oussoren

Ronald Oussoren added the comment:

Closing this one because Issue21121 contains a usable patch.

--
resolution:  - duplicate
superseder:  - -Werror=declaration-after-statement is added even for extension 
modules through setup.py

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



[issue18211] -Werror=statement-after-declaration problem

2014-05-04 Thread Ronald Oussoren

Ronald Oussoren added the comment:

Sigh. Actually closing doesn't work due to the dependency :-(

--

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



[issue21426] Invisible characters in email related souce files.

2014-05-04 Thread Milan Oberkirch

New submission from Milan Oberkirch:

I found non-printable characters in the source files of the email package. Vim 
rendered it as '^L', pasting it on the linux console has the same effect as 
CTRL+L. In most places it was combined with regular newlines, sometimes as a 
replacement, sometimes additionally to them.
My guess is that these files were saved with an editor replacing '\n' with '\r' 
and additional '\n' were inserted afterwards since the linebreaks seemed to be 
gone.

I replaced these chars by '\n' or '' in the attached patch.

--
components: email
files: linebreak.patch
keywords: patch
messages: 217874
nosy: barry, r.david.murray, zvyn
priority: normal
severity: normal
status: open
title: Invisible characters in email related souce files.
versions: Python 3.5
Added file: http://bugs.python.org/file35149/linebreak.patch

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



[issue21426] Invisible characters in email related souce files.

2014-05-04 Thread Benjamin Peterson

Benjamin Peterson added the comment:

They are page markers to assist in file nagivation. 
https://www.gnu.org/software/emacs/manual/html_node/emacs/Pages.html

--
nosy: +benjamin.peterson
resolution:  - wont fix
status: open - closed

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



[issue2159] dbmmodule inquiry function is performance prohibitive

2014-05-04 Thread Eric Olson

Eric Olson added the comment:

Hi,
Thanks for finding those issues.  I attached a new patch.

a) Good find, I added the free() for gdbm.  ndbm doesn't need free().
b) Added the error check.  I don't know if a test can be made for this.  If 
there was a common way to patch C libraries in CPython, I would give that a try.
Also, do you know if we should check for the gdbm error before the dbm error, 
or does it not matter?
c) Yes, it looks like NULL is used here instead of 0.  Changed 0s to NULLS.

Let me know if you see anything else.

--
Added file: http://bugs.python.org/file35150/dbm_bool_e.patch

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



[issue21427] installer not working

2014-05-04 Thread Uwe

New submission from Uwe:

Installer fails to install 3.4 on win7 32 bit
Error: cannot register 64 bit component {BE22BD81-ECE5-45BD-83B8-84BA45846A2D} 
on 32 bit system. KeyPath: C:\Windows\py.exe

--
messages: 217878
nosy: ellipso
priority: normal
severity: normal
status: open
title: installer not working
type: crash
versions: Python 3.4

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



[issue21428] Python suddenly cares about EOLs formats on windows

2014-05-04 Thread Chappuis

New submission from Chappuis:

When trying to execute the Software build program waf 
(http://ftp.waf.io/pub/release/waf-1.7.16) with the command python waf-1.7.16 
--version, this unzip a folder in the current directory while reporting the 
version of the program on the standard input. Waf is distributed as a single 
file with unix end-of-lines. Executing the program with python 2.7 to 3.3 does 
not cause any problem, but executing with python-3.4.0 make the execution stop.

I patched waf to solve the problem which is purely related to unix/dos 
end-of-lines. The behaviour of python-3.4.0 seems to have change regarding 
these EOL characters compared to the previous releases. Is that intentional?

Kind regards

Thierry

--
components: Windows
messages: 217879
nosy: pygnol
priority: normal
severity: normal
status: open
title: Python suddenly cares about EOLs formats on windows
type: behavior
versions: Python 3.4

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



[issue21429] Input.output error with multiprocessing

2014-05-04 Thread Mikaela Suomalainen

New submission from Mikaela Suomalainen:

I encountered this error with Limnoria and I was told to report it here.

```
ERROR 2014-05-04T18:04:04 supybot Uncaught exception in ['title'].
Traceback (most recent call last):
File 
/home/users/mkaysi/.local/lib/python3.4/site-packages/supybot/callbacks.py, 
line 1266, in _callCommand
self.callCommand(command, irc, msg, *args, **kwargs)
File 
/home/users/mkaysi/.local/lib/python3.4/site-packages/supybot/utils/python.py,
 line 91, in g
f(self, *args, **kwargs)
File 
/home/users/mkaysi/.local/lib/python3.4/site-packages/supybot/callbacks.py, 
line 1247, in callCommand
method(irc, msg, *args, **kwargs)
File 
/home/users/mkaysi/.local/lib/python3.4/site-packages/supybot/commands.py, 
line 1076, in newf
f(self, irc, msg, args, *state.args, **state.kwargs)
File 
/home/users/mkaysi/.local/lib/python3.4/site-packages/supybot/plugins/Web/plugin.py,
 line 109, in newf
f(self, irc, *args, **kwargs)
File 
/home/users/mkaysi/.local/lib/python3.4/site-packages/supybot/plugins/Web/plugin.py,
 line 96, in newf
pn=self.name(), cn=f.__name__)
File 
/home/users/mkaysi/.local/lib/python3.4/site-packages/supybot/commands.py, 
line 120, in process
p.start()
File 
/home/users/mkaysi/.pyenv/versions/3.4.0/lib/python3.4/multiprocessing/process.py,
 line 105, in start
self._popen = self._Popen(self)
File 
/home/users/mkaysi/.pyenv/versions/3.4.0/lib/python3.4/multiprocessing/context.py,
 line 212, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File 
/home/users/mkaysi/.pyenv/versions/3.4.0/lib/python3.4/multiprocessing/context.py,
 line 267, in _Popen
return Popen(process_obj)
File 
/home/users/mkaysi/.pyenv/versions/3.4.0/lib/python3.4/multiprocessing/popen_fork.py,
 line 18, in __init__
sys.stdout.flush()
OSError: [Errno 5] Input/output error
ERROR 2014-05-04T18:04:04 supybot Exception id: 0xaaefe
```

--
components: Library (Lib)
messages: 217880
nosy: mikaela
priority: normal
severity: normal
status: open
title: Input.output error with multiprocessing
versions: Python 3.4

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



[issue21121] -Werror=declaration-after-statement is added even for extension modules through setup.py

2014-05-04 Thread Éric Araujo

Éric Araujo added the comment:

I can commit the patch but won’t be able to check the buildbots for the next 
twelve hours.

--

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



[issue21121] -Werror=declaration-after-statement is added even for extension modules through setup.py

2014-05-04 Thread Ned Deily

Ned Deily added the comment:

There's no immediate rush now. It's too late for 3.4.1rc1.

--

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



[issue18211] -Werror=statement-after-declaration problem

2014-05-04 Thread Éric Araujo

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


--
dependencies:  -CPython setup.py problems
stage: needs patch - resolved
status: open - closed

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



[issue18255] CPython setup.py problems

2014-05-04 Thread Éric Araujo

Éric Araujo added the comment:

Note that the distutils feature freeze has been lifted, so in 3.5 sysconfig 
could be reused by distutils.sysconfig, but the existing functionality 
(different API + ability to override with env vars) must be preserved.

--
nosy: +eric.araujo

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



[issue21430] Document ssl.pending()

2014-05-04 Thread Bas Wijnen

New submission from Bas Wijnen:

In order to use ssl sockets asynchronously, it is important to use the 
pending() method, otherwise the internal buffer will be ignored, and select may 
block for new data while it's already waiting.  See bug #16976 and 
http://stackoverflow.com/questions/21663705/how-to-use-select-with-python-ssl-socket-buffering

Using pending() works fine, but is entirely undocumented.  
https://docs.python.org/2.7/library/ssl.html (and all other versions) don't 
even mention the existence of the method.  I hope this can be changed; using an 
undocumented feature isn't nice, but in this case there is no other good 
solution.

--
assignee: docs@python
components: Documentation
messages: 217884
nosy: docs@python, shevek
priority: normal
severity: normal
status: open
title: Document ssl.pending()
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5

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



[issue7850] platform.system() should be macosx instead of Darwin on OSX

2014-05-04 Thread Christian Clauss

Christian Clauss added the comment:

assert sys.platform == platform.system().lower()

Should that always be True?  It is on Mac OS X but...

On iOS (Pythonista):
sys.platform == 'unknown'
platform.system() == 'Darwin'

https://docs.python.org/2/library/sys.html#sys.platform should be updated to 
provide the correct values for iOS and Android devices which now outnumber many 
of the other OSes listed.

--
nosy: +Christian.Clauss

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



[issue21422] int 0: return the number unmodified

2014-05-04 Thread STINNER Victor

STINNER Victor added the comment:

The reason to apply the patch is to reduce the memory footprint.

--

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



[issue21431] 3.4.1rc1 test_pydoc fails: pydoc_data.topics.topics values are type bytes not str

2014-05-04 Thread Ned Deily

New submission from Ned Deily:

Something went wrong with the update of pydoc_data topics for 3.4.1rc1. As can 
be seen in http://hg.python.org/releasing/3.4.1/rev/c67a19e11a71, the values 
for the topics dict should be strings but were updated as bytes.  This causes 
pydoc topics searches to fail.  The process problem needs to be fixed for 3.4.1 
final.

An example:

$ /usr/local/bin/pydoc3.4 def
Traceback (most recent call last):
  File /usr/local/bin/pydoc3.4, line 5, in module
pydoc.cli()
  File 
/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/pydoc.py, 
line 2580, in cli
help.help(arg)
  File 
/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/pydoc.py, 
line 1860, in help
elif request in self.keywords: self.showtopic(request)
  File 
/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/pydoc.py, 
line 1941, in showtopic
pager(doc.strip() + '\n')
TypeError: can't concat bytes to str

--
assignee: larry
components: Build
messages: 217887
nosy: georg.brandl, larry, ned.deily
priority: release blocker
severity: normal
status: open
title: 3.4.1rc1 test_pydoc fails: pydoc_data.topics.topics values are type 
bytes not str
versions: Python 3.4

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



[issue21121] -Werror=declaration-after-statement is added even for extension modules through setup.py

2014-05-04 Thread Stefan Krah

Stefan Krah added the comment:

One more question:

I think it's nicer to add CFLAGS_NODIST to 'renamed_variables' in
Lib/sysconfig.py:265:

renamed_variables = ('CFLAGS', 'CFLAGS_NODIST', 'LDFLAGS', 'CPPFLAGS')

That way it's possible to look up CFLAGS_NODIST directly.



For consistency, we can do the same for Lib/distutils/sysconfig.py,
where the variable would be purely informational.

--

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



[issue21431] 3.4.1rc1 test_pydoc fails: pydoc_data.topics.topics values are type bytes not str

2014-05-04 Thread Larry Hastings

Larry Hastings added the comment:

3.4.1rc1 is the first release I've cut where the makefile didn't auto-download 
Sphinx.  And then the makefile used python and sphinx-build straight off 
the path, rather than finding the local ones.  To generate pydoc-topics, I had 
to do the following:

% ./configure --prefix=`pwd`/release  make
% ./release/bin/pip install sphinx
% cd Doc
% make pydoc-topics PYTHON=../release/bin/python 
SPHINXBUILD=../release/bin/sphinx-build

And apparently this didn't work.

Maybe there should be a smoke test to make sure pydoc-topics is okay?

And... maybe make pydoc-topics should copy the data file itself, rather than 
making me cut and paste paths out of PEP 101?  And *then* automatically test it?

--

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



[issue21431] 3.4.1rc1 test_pydoc fails: pydoc_data.topics.topics values are type bytes not str

2014-05-04 Thread Ned Deily

Ned Deily added the comment:

From a first quick look, it appears that the problem occurs when using a 
Python 3 version of sphinx-build.  With Python 2, the topics appear to be 
generated correctly.

--

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



[issue21121] -Werror=declaration-after-statement is added even for extension modules through setup.py

2014-05-04 Thread Ned Deily

Ned Deily added the comment:

Is there any reason to expose CFLAGS_NODIST externally?  It seems to me that it 
is only needed in the top-level setup.py for building standard library 
extension modules.  Let's not add yet another configuration variable to the 
already confusing array we present to users through the two 
sysconfig.get_config_var().

--

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



[issue21429] Input.output error with multiprocessing

2014-05-04 Thread Ned Deily

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


--
nosy: +sbt

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



[issue21427] installer not working

2014-05-04 Thread Ned Deily

Ned Deily added the comment:

Did you try using the 32-bit (x86) installer from 
https://www.python.org/downloads/release/python-340/ ?  Unfortunately, I 
believe the default download button currently only downloads the 64-bit version.

--
nosy: +ned.deily

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



[issue21430] Document ssl.pending()

2014-05-04 Thread Ned Deily

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


--
nosy: +pitrou

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



[issue21430] Document ssl.pending()

2014-05-04 Thread Ned Deily

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


--
nosy: +christian.heimes

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



[issue21421] ABCs for MappingViews should declare __slots__ so subclasses aren't forced to have __dict__/__weakref__

2014-05-04 Thread Josh Rosenberg

Josh Rosenberg added the comment:

Cool. Thanks for the feedback. I split it into two patches for a reason; I 
wasn't wedded to the simplification.

--

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



[issue21427] installer not working

2014-05-04 Thread Uwe

Uwe added the comment:

Of course, only official sources
the file is named python-3.4.0.msi and 23,924KB
the name is similar to that of earlier versions which worked fine
So I am not sure, whether it is 32 or 64bit
maybe it would be a good idea to use two different names such as x86 and x64?

--

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



[issue21430] Document ssl.pending()

2014-05-04 Thread Antoine Pitrou

Antoine Pitrou added the comment:

pending() shouldn't be necessary for this. See 
https://docs.python.org/dev/library/ssl.html#notes-on-non-blocking-sockets

Generally, when using non-blocking sockets, you first try to read (or write) 
and then catch any exceptions that might be raised if the socket isn't ready.

--

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



[issue21428] Python suddenly cares about EOLs formats on windows

2014-05-04 Thread Antoine Pitrou

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


--
nosy: +benjamin.peterson

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



[issue21422] int 0: return the number unmodified

2014-05-04 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Reduce the memory footprint in which actual workload? This looks rather 
gratuitous to me.

--
nosy: +pitrou

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



[issue21420] Optimize 2 ** n: implement it as 1 n

2014-05-04 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I agree with Mark, there doesn't seem to be a strong point in favour of this 
optimization.

--

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



[issue21424] Simplify and speed-up heaqp.nlargest()

2014-05-04 Thread Antoine Pitrou

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


--
nosy: +tim.peters

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



[issue21431] 3.4.1rc1 test_pydoc fails: pydoc_data.topics.topics values are type bytes not str

2014-05-04 Thread Ned Deily

Ned Deily added the comment:

The problem is in PydocTopicsBuilder in Doc/tools/sphinxext/pyspecific.py.  It 
needs to be smarter so that ideally it should continue to work with any Python 
= 2.5 and independent of the Python being built.

--
assignee: larry - georg.brandl
nosy: +benjamin.peterson
stage:  - needs patch
versions: +Python 2.7, Python 3.5

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



[issue21418] Segv during call to super_init in application embedding Python interpreter.

2014-05-04 Thread Antoine Pitrou

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


--
nosy: +benjamin.peterson

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



[issue21431] 3.4.1rc1 test_pydoc fails: pydoc_data.topics.topics values are type bytes not str

2014-05-04 Thread Larry Hastings

Larry Hastings added the comment:

Well, surely working with the current python is sufficient?  I'd be happy if it 
was only guaranteed to run with the python tree it's a part of.

--

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



[issue21427] installer not working

2014-05-04 Thread Ned Deily

Ned Deily added the comment:

There are two different names: the 64-bit installer is python-3.4.0.amd64.msi.  
But I see now that the error refers to py.exe, which I believe is the Python 
launcher.  I've nosyed the Windows experts.

--
nosy: +tim.golden, zach.ware

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



[issue9850] obsolete macpath module dangerously broken and should be removed

2014-05-04 Thread Ned Deily

Ned Deily added the comment:

The patch appears fine but it really doesn't have anything to do with the gist 
of this issue.  The problem remains that much of macpath is fundamentally 
broken.  In the intervening years since the issue was opened, I contend that 
any need for OS 9 style paths (aka HFS paths) has diminished even further so I 
would still support starting in Python 3.5 the deprecation and removal process 
for this module.  But, as long as it remains, to address the current problems 
at a minimum a patch would be needed to remove or raise exceptions for all of 
the macpath functions that make file system calls and to update the 
documentation.

--

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



[issue21427] installer not working

2014-05-04 Thread eryksun

eryksun added the comment:

This is the first time I've used msilib, but it does appear that the component 
is marked as 64-bit:

 import msilib
 msidbComponentAttributes64bit = 256
 sql = (SELECT ComponentId,Attributes FROM Component 
...WHERE Component='launcher')
 db = msilib.OpenDatabase('python-3.4.0.msi', msilib.MSIDBOPEN_READONLY)
 v = db.OpenView(sql)
 v.Execute(None)
 r = v.Fetch()
 r.GetString(1)
'{BE22BD81-ECE5-45BD-83B8-84BA45846A2D}'
 attr = r.GetInteger(2)
 attr
264
 attr  msidbComponentAttributes64bit
256

As it should be according to Tools/msi/msi.py:

http://hg.python.org/cpython/file/04f714765c13/Tools/msi/msi.py#l990

Here's the comment regarding this:

# msidbComponentAttributes64bit = 256; this disables registry redirection
# to allow setting the SharedDLLs key in the 64-bit portion even for a
# 32-bit installer.
# XXX does this still allow to install the component on a 32-bit system?
# Pick up 32-bit binary always

For reference, the Component table:
http://msdn.microsoft.com/en-us/library/aa368007%28v=vs.85%29.aspx

--
nosy: +eryksun

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



[issue21432] samba.git from git://git.samba.org/samba.git samba.netcmd.main not found

2014-05-04 Thread Joshua Knights

New submission from Joshua Knights:

This is a Python Path Issue:

/root/samba-master/bin/samba-tool domain join AAF.ECPI DC -Uadministrator 
--realm=AAF.ECPI I get the following Error: 

Traceback (most recent call last):
 File /root/samba-master/bin/samba-tool, line 33, in module
 from samba.netcmd.main import cmd_sambatool
ImportError: No module named samba.netcmd.main


Here is the following Scenario of the above:

I am running a CentosOS Release 6.5 (Final) Kernel Linux 
2.632-431.11.2.el6.x86_64 GNOME 2.28.2 

Both my Domain and Relm are AAF.ECPI;   My Directory Path for Samba Version is 
/root/samba-master/

I did a Yum Update before starting anything

Then I did a:  

yum install glibc glibc-devel gcc python* libacl-devel krb5-workstation 
krb5-libs pam_krb5 

and then I removed the older samba packages before starting via the command: 

yum remove samba-winbind-client samba-common samba-client 

Then I installed git core using the command: 

yum install git-core 

Then I downloaded Samba with the following command: 

git clone git://git.samba.org/samba.git samba-master

Then I installed the additional openldap-devel Library 

then I did the ./configure --enable-debug --enable-selftest 

then initiated the make command 

Then I successfully did a: 

 kinit administrator

 and it prompted me for the Administrator Password of the Windows Domain 
Administrator. 

Then I ran 

klist 

and it successfully showed me I had a security token from the Windows Primary 
Domain Controller. 

Where I am currently Stuck is when I run the:

/root/samba-master/bin/samba-tool domain join AAF.ECPI DC -Uadministrator 
--realm=AAF.ECPI I get the following Error: 

Traceback (most recent call last):
 File /root/samba-master/bin/samba-tool, line 33, in module
 from samba.netcmd.main import cmd_sambatool
ImportError: No module named samba.netcmd.main


When I do a find / - name samba.netcmd.main 

It pulls up: NOTHING!! 

If I pull up : find / -name netcmd 

I get: 

/root/samba-master/python/samba/netcmd
/root/samba-master/bin/python/samba/netcmd
/root/samba-master/bin/default/python/samba/netcmd

In my research somebody said: to export the PYTHONPATH and to change it to the 
correct path of the netcmd command.

if I wanted to fix it permanently then to update my bash.rc file. 

In other words Tell my samba tool where to look, and this look is only 
temporary till I close my terminal. Placing the 

command in the bash.rc file will run this script every time I open my terminal. 
Well, I tried all 3 and none of them worked.

And if one of you has an answer, help me cause I need my domain member server 
to work ASAP. Like before 1pm on May 5th 2014 if at all possible. if one of 
your reps has an answer PLease call my Cell (425) 231-8472.  My Absolute 
Deadline is May 7th by 8am, but that's pushing it.

Thanks you,

Joshua

--
components: Extension Modules
messages: 217903
nosy: SithKitty
priority: normal
severity: normal
status: open
title: samba.git from git://git.samba.org/samba.git  samba.netcmd.main not found
type: compile error
versions: Python 3.5

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



[issue14019] Unify tests for str.format and string.Formatter

2014-05-04 Thread Nick Coghlan

Nick Coghlan added the comment:

Note that this issue wasn't about the formatter module - it relates to the 
str.format() method and the string.Formatter *class*.

The formatter module is completely unrelated.

--

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



[issue21432] samba.git from git://git.samba.org/samba.git samba.netcmd.main not found

2014-05-04 Thread Joshua Knights

Joshua Knights added the comment:

Correction, this Might be a python path issue and I am not sure what version of 
python the samba.git is using.

--
versions:  -Python 3.5

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



[issue21433] False = True produces segfault

2014-05-04 Thread Samuel Ainsworth

New submission from Samuel Ainsworth:

Running this:

 False = True
Segmentation fault: 11

gives me this:

Process: Python [17911]
Path:
/Library/Frameworks/Python.framework/Versions/3.3/Resources/Python.app/Contents/MacOS/Python
Identifier:  Python
Version: 3.3.1 (3.3.1)
Code Type:   X86-64 (Native)
Parent Process:  bash [5092]
Responsible: Terminal [298]
User ID: 501

Date/Time:   2014-05-05 00:55:57.270 -0400
OS Version:  Mac OS X 10.9.2 (13C1021)
Report Version:  11
Anonymous UUID:  B5997910-F526-88BB-2135-BD6152A81709

Sleep/Wake UUID: 88A9925C-46FC-488E-B7A5-EBB1AAE6BAC1

Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x

VM Regions Near 0:
-- 
__TEXT 0001-00011000 [4K] r-x/rwx 
SM=COW  
/Library/Frameworks/Python.framework/Versions/3.3/Resources/Python.app/Contents/MacOS/Python

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   readline.so 0x0001006e1f57 call_readline + 647
1   org.python.python   0x00018182 PyOS_Readline + 274
2   org.python.python   0x0001a048 tok_nextc + 104
3   org.python.python   0x0001a6f1 tok_get + 97
4   org.python.python   0x0001bb61 PyTokenizer_Get + 17
5   org.python.python   0x00018294 parsetok + 212
6   org.python.python   0x000100105253 PyParser_ASTFromFile 
+ 131
7   org.python.python   0x000100105459 
PyRun_InteractiveOneFlags + 281
8   org.python.python   0x0001001057ce 
PyRun_InteractiveLoopFlags + 78
9   org.python.python   0x0001001070e1 PyRun_AnyFileExFlags 
+ 161
10  org.python.python   0x00010011dade Py_Main + 3454
11  org.python.python   0x00010e1c 0x1 + 3612
12  org.python.python   0x00010c74 0x1 + 3188

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x  rbx: 0x00010220  rcx: 0x00010220  
rdx: 0x0a00
  rdi: 0x  rsi: 0x0001006e221c  rbp: 0x7fff5fbff210  
rsp: 0x7fff5fbff140
   r8: 0x00010220   r9: 0x  r10: 0x0001  
r11: 0x0001
  r12: 0x0001  r13: 0x000c  r14: 0x0001001fb678  
r15: 0x7fff5fbff1d0
  rip: 0x0001006e1f57  rfl: 0x00010206  cr2: 0x
  
Logical CPU: 1
Error Code:  0x0004
Trap Number: 14


Binary Images:
   0x1 -0x10ff7 +org.python.python (3.3.1 - 3.3.1) 
152E1B23-6F4F-E37A-CB7A-862C4D3D1FBD 
/Library/Frameworks/Python.framework/Versions/3.3/Resources/Python.app/Contents/MacOS/Python
   0x13000 -0x1001cbff7 +org.python.python (3.3.1, [c] 
2004-2013 Python Software Foundation. - 3.3.1) 
0328F41B-A30B-2BBA-D4C3-FA2E5DE4FCA1 
/Library/Frameworks/Python.framework/Versions/3.3/Python
   0x1003f3000 -0x1003f4ff7 +_heapq.so (???) 
1C40E27A-FBFA-6B43-9AA9-9FCDF1961459 
/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/lib-dynload/_heapq.so
   0x1006e -0x1006e2ff7 +readline.so (???) 
5D0B15E6-1E61-AA6F-3915-27BBA7D83F4C 
/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/lib-dynload/readline.so
   0x1020f1000 -0x10210fffb  libedit.2.dylib (39) 
1B0596DB-F336-32E7-BB9F-51BF70DB5305 /usr/lib/libedit.2.dylib
   0x10212 -0x102174fe7 +libncursesw.5.dylib (5) 
AA864030-A948-A10A-78B5-CF638A98AEFF 
/Library/Frameworks/Python.framework/Versions/3.3/lib/libncursesw.5.dylib
0x7fff6343f000 - 0x7fff63472817  dyld (239.4) 
2B17750C-ED1B-3060-B64E-21897D08B28B /usr/lib/dyld
0x7fff894f4000 - 0x7fff894faff7  libsystem_platform.dylib (24.90.1) 
3C3D3DA8-32B9-3243-98EC-D89B9A1670B3 /usr/lib/system/libsystem_platform.dylib
0x7fff89931000 - 0x7fff89958ff7  libsystem_network.dylib (241.3) 
8B1E1F1D-A5CC-3BAE-8B1E-ABC84337A364 /usr/lib/system/libsystem_network.dylib
0x7fff89b7f000 - 0x7fff89b80ff7  libsystem_blocks.dylib (63) 
FB856CD1-2AEA-3907-8E9B-1E54B6827F82 /usr/lib/system/libsystem_blocks.dylib
0x7fff89fd5000 - 0x7fff89fd9ff7  libcache.dylib (62) 
BDC1E65B-72A1-3DA3-A57C-B23159CAAD0B /usr/lib/system/libcache.dylib
0x7fff8a21f000 - 0x7fff8a228ff3  libsystem_notify.dylib (121) 
52571EC3-6894-37E4-946E-064B021ED44E /usr/lib/system/libsystem_notify.dylib
0x7fff8a52f000 - 0x7fff8a536fff  libcompiler_rt.dylib (35) 
4CD916B2-1B17-362A-B403-EF24A1DAC141 /usr/lib/system/libcompiler_rt.dylib
0x7fff8b144000 - 0x7fff8b146ff3  libsystem_configuration.dylib (596.13) 
B51C8C22-C455-36AC-952D-A319B6545884 
/usr/lib/system/libsystem_configuration.dylib
0x7fff8c3b4000 - 

[issue21433] False = True produces segfault

2014-05-04 Thread Samuel Ainsworth

Changes by Samuel Ainsworth samuel_ainswo...@brown.edu:


--
type:  - crash

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



[issue21433] False = True produces segfault

2014-05-04 Thread Ned Deily

Ned Deily added the comment:

See Issue18458.  Update to the latest Python 3.3.5 or 3.4.x.

--
nosy: +ned.deily
resolution:  - duplicate
stage:  - resolved
status: open - closed
superseder:  - interactive interpreter crashes and test_readline fails on OS X 
10.9 Mavericks due to libedit update

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