[issue9665] Buid issues on Cygwin - _curses, _curses_panel, and _io

2012-05-28 Thread Arif Widi Nugroho

Changes by Arif Widi Nugroho :


--
nosy: +arifwn

___
Python tracker 

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



[issue14948] setup.cfg - rename home_page to homepage

2012-05-28 Thread anatoly techtonik

New submission from anatoly techtonik :

home_page is too conservative, ugly and requires more time typing. "home page" 
is also 2.15 times less popular that "homepage" spelling 
http://www.google.com/trends/?q=%22home+page%22,+%22homepage%22

Writing setup.cfg files for humans should be simple and intuitive without too 
much referencing to official docs. Perhaps it is possible to support both 
home_page and homepage with the latter being the preferred syntax.

--
assignee: eric.araujo
components: Distutils2
messages: 161857
nosy: alexis, eric.araujo, tarek, techtonik
priority: normal
severity: normal
status: open
title: setup.cfg - rename home_page to homepage

___
Python tracker 

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



[issue14947] Missing cross reference in types.new_class documentation

2012-05-28 Thread Nick Coghlan

New submission from Nick Coghlan :

The http://docs.python.org/dev/library/types#dynamic-type-creation docs should 
have a see also ref to the main class creation docs in the language reference.

Just a reminder to myself so I don't forget to fix it.

--
assignee: ncoghlan
components: Documentation
messages: 161856
nosy: ncoghlan
priority: normal
severity: normal
status: open
title: Missing cross reference in types.new_class documentation
type: enhancement
versions: Python 3.3

___
Python tracker 

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



[issue14942] add PyType_New()

2012-05-28 Thread Eric Snow

Eric Snow  added the comment:

Yeah, I'd meant that as an illustration of what I'd understood, rather than 
some other proposal for the C API.  types.new_class looks really handy.  Thanks 
for clarifying.

--

___
Python tracker 

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



[issue3177] Add shutil.open

2012-05-28 Thread Éric Araujo

Éric Araujo  added the comment:

(A last, very minor thing: please trim or remove quoted text when replying with 
the email interface (or on mailing lists); it puts unneeded wall of texts that 
reader waste time scanning, in case there were inline replies.  Thanks in 
advance.)

--

___
Python tracker 

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



[issue3177] Add shutil.open

2012-05-28 Thread Éric Araujo

Éric Araujo  added the comment:

Note that my suggestion has an inconvenient on Windows.  Take the example of 
HTML files; on an UNIX system I would decide whether I want them to be opened 
with my text editor or my web browser; I’d choose web browser because I launch 
my text editor from a shell.  On Windows though you would register your web 
browser for default action and your text editor for the edit action; this 
deliberate configuration would not be respected if we implement shutil.whatever 
with os.startfile(..., 'edit').

--

___
Python tracker 

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



[issue3177] Add shutil.open

2012-05-28 Thread Éric Araujo

Éric Araujo  added the comment:

The latest discussion on this thread does not match my UNIX user model.

tl;dr: shutil.whatever should call startfile(..., 'edit') or xdg-open; other 
actions implemented by startfile are not cross-platform.

> Well, so how about on UNIX shutil.launch (or whatever it's called) first 
> checks to see if we're
> referring to a file.  If we are, check to see if it's marked executable.  If 
> it is, execute it
> under a shell.  Failing *that* we could run xdg-open where available.
This makes sense from an os.startfile perspective, but not for an xdg-open 
user.  xdg-open (and shutil.whatever in my eyes) only starts an application 
with the passed argument; that’s it.  There is no execute action because that’s 
done otherwise (in Python, with subprocess and os.exec*; in the shell, with 
program invocation (i.e. “program” or “/full/path/to/file”) using shebangs or 
binfmt-format).  So in my mental model, using xdg-open to have a file or URI 
opened by a configured application (which can be graphical or command-line) has 
nothing to do with executing a file.

(There was an older system on UNIX named mailcap where you could register 
console and GUI actions for different actions, like edit and print, but it’s 
not used by current graphical mail clients like Thunderbird or by the xdg-open 
system, so I would not consider it at all.)

--

___
Python tracker 

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



[issue14942] add PyType_New()

2012-05-28 Thread Nick Coghlan

Nick Coghlan  added the comment:

No, I mean no new C API at all. Anyone that wants to dynamically create a new 
type from C in 3.3 can already just write their own code to make the 
appropriate types.new_class() call:

http://docs.python.org/dev/library/types#types.new_class

A simple example, ignoring refcounting:

   types_mod = PyImport_ImportModule("types");
   new_class = PyObject_GetAttrString(types_mod, "new_class");
   new_type = PyObject_CallFunction(new_function, "s", "MyClass")

And assorted variations thereof using the different PyObject_GetAttr* and 
PyObject_Call* functions.

--

___
Python tracker 

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



[issue14942] add PyType_New()

2012-05-28 Thread Eric Snow

Eric Snow  added the comment:

And unless there were some performance reason, I agree that the route I took in 
the patch is overkill.

--

___
Python tracker 

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



[issue14942] add PyType_New()

2012-05-28 Thread Eric Snow

Eric Snow  added the comment:

Presumably you mean something like this:



PyObject *
PyType_New(PyObject *name, PyObject *bases, PyObject *ns)
{
PyObject *type, *args, *newtype;
PyInterpreterState *interp = PyThreadState_GET()->interp;
PyObject *modules = interp->modules;
PyObject *builtins = PyDict_GetItemString(modules, "builtins");
_Py_IDENTIFIER(type);

if (builtins == NULL)
return NULL;
type = _PyObject_GetAttrId(builtins, &PyId_type);
if (type == NULL)
return NULL;
args = PyTuple_Pack(3, name, bases, ns);
if (args == NULL)
return NULL;
newtype = PyObject_CallObject(type, args);
Py_DECREF(args);
return newtype;
}

or even:

PyObject *
PyType_New(PyObject *meta, PyObject *name, PyObject *bases, PyObject *ns)
{
PyObject *args, *newtype;

args = PyTuple_Pack(3, name, bases, ns);
if (args == NULL)
return NULL;
newtype = PyObject_CallObject(type, args);
Py_DECREF(args);
return newtype;
}

and called with "PyType_New(&PyTypeObject, name, bases, ns)".



If that's what you meant, I'm okay with that.  Otherwise please elaborate.  :)

--

___
Python tracker 

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



[issue14944] Setup & Usage documentation for pydoc, idle & 2to3

2012-05-28 Thread Tshepang Lekhonkhobe

Changes by Tshepang Lekhonkhobe :


--
nosy: +tshepang

___
Python tracker 

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



[issue14945] Setup & Usage documentation for selected stdlib modules

2012-05-28 Thread Tshepang Lekhonkhobe

Changes by Tshepang Lekhonkhobe :


--
nosy: +tshepang

___
Python tracker 

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



[issue14939] Usage documentation for pyvenv

2012-05-28 Thread Tshepang Lekhonkhobe

Changes by Tshepang Lekhonkhobe :


--
nosy: +tshepang

___
Python tracker 

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



[issue14946] packaging’s pysetup script should be named differently than distutils2’s pysetup

2012-05-28 Thread Éric Araujo

Changes by Éric Araujo :


--
title: packaging’spysetup script should be named differently than distutils2’s 
pysetup -> packaging’s pysetup script should be named differently than 
distutils2’s pysetup

___
Python tracker 

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



[issue14946] packaging’spysetup script should be named differently than distutils2’s pysetup

2012-05-28 Thread Éric Araujo

New submission from Éric Araujo :

The whole point of naming distutils2 “packaging” in the standard library is to 
avoid name conflicts in case someone wants to import a distutils2 version from 
site-packages that’s newer than the packaging version in the standard library.  
However the main command-line entry point, the pysetup script, has a 
conflicting name: both packaging and distutils2 use it.

I don’t have an elegant solution to that; suggestions welcome.

--
assignee: eric.araujo
components: Distutils2
messages: 161848
nosy: alexis, eric.araujo, tarek
priority: normal
severity: normal
status: open
title: packaging’spysetup script should be named differently than distutils2’s 
pysetup
versions: Python 3.3

___
Python tracker 

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



[issue12510] IDLE get_the_calltip mishandles raw strings

2012-05-28 Thread Roger Serwy

Roger Serwy  added the comment:

Which comment needs revision?

--

___
Python tracker 

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



[issue14945] Setup & Usage documentation for selected stdlib modules

2012-05-28 Thread Nick Coghlan

Nick Coghlan  added the comment:

I think for these it's reasonable to just have an index page that references 
out to the individual module docs. Most of them are closely related to using 
the module in your own code and/or there's general background info in the 
module docs that you're likely to need in order to understand what the tool is 
for.

The main thing I'm after at this point is for Setup & Usage to act as a central 
index for using Python from the command line, rather than it necessarily 
containing all the details directly. Rather than trying too hard to categorise 
them, I'd be inclined to start with a simple alphabetical list (module name 
linking to the relevant section in the module docs, adding it if it doesn't 
already exist). Something like:

compileall - Precompiling Python source modules to bytecode
pickle - Display the contents of pickles saved as files
pickletools - Analyse the contents of pickles saved as files
site - Display details of Python's configuration
sysconfig - Display additional details of Python's configuration
test - Execute Python's own regression test suite
timeit - Microbenchmarking for small Python snippets
unittest - Find and execute unit tests

Maybe we'll decide to do something more long term, but I think this is a good 
way to start.

--

___
Python tracker 

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



[issue14944] Setup & Usage documentation for pydoc, idle & 2to3

2012-05-28 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Hmm, how did I miss that?? Well better to reference that, and maybe revise it. 
I believe there may also be another .txt document in idlelib.

Anyway, perhaps there should first be a section on tkinter by itself, and how 
to get the tcl/tk it depends on. Mention that optional part of Windows install, 
so tkinter will likely not work if unselected from installer.

--

___
Python tracker 

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



[issue14944] Setup & Usage documentation for pydoc, idle & 2to3

2012-05-28 Thread Ned Deily

Ned Deily  added the comment:

http://docs.python.org/py3k/library/idle.html (duplicates much of the IDLE help 
file)

--
nosy: +ned.deily

___
Python tracker 

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



[issue14944] Setup & Usage documentation for pydoc, idle & 2to3

2012-05-28 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

I second the motion for IDLE. There is no module doc for it.

Off the top of my head, there should be a general section that
* says what it is, and that it depends on tcl/tk and tkinter install;
* mentions the existent of the menu Help / IDLE help document;
* gives common startup methods from command line (I forget this) or inside 
interpreter ('from idlelib import idle') and that one may need to use one of 
these to see tracebacks if Idle crashes - even if one normally uses a 
system-specific method to directly run as gui app.
* gives other common info and trouble-shooting tips (some of this is on tracker 
- such as deleting user .cfg that prevents startup).
* points to system specific discussions, where ever they are put.

Then for each system,
* tcl/tk situation
* how to directly start up
* location of config files

Windows: (what I use)
tcl/tk comes with system.
...

*nix: 
tcl/tk probably already on system
...

mac: (ned daily)
special tcl/tk issues, special page on site
...

--
nosy: +terry.reedy

___
Python tracker 

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



[issue14945] Setup & Usage documentation for selected stdlib modules

2012-05-28 Thread Éric Araujo

Éric Araujo  added the comment:

I’d propose to add one file per script / module-as-script, except maybe for -m 
site and -m sysconfig which are more about debugging an installation than 
really using a feature provided by the stdlib.

--
nosy: +eric.araujo

___
Python tracker 

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



[issue14818] C implementation of ElementTree: Some functions should support keyword arguments

2012-05-28 Thread Eli Bendersky

Eli Bendersky  added the comment:

Committed all fixes in http://hg.python.org/cpython/rev/7d252dbfbee3

--
resolution:  -> fixed
stage: patch review -> 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



[issue14814] Implement PEP 3144 (the ipaddress module)

2012-05-28 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 7d252dbfbee3 by Eli Bendersky in branch 'default':
Issue 14814: Add namespaces keyword arg to find(*) methods in _elementtree.
http://hg.python.org/cpython/rev/7d252dbfbee3

--

___
Python tracker 

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



[issue14942] add PyType_New()

2012-05-28 Thread Nick Coghlan

Nick Coghlan  added the comment:

I realised that with the addition of types.new_class(), that's fairly easy to 
invoke from C (no harder than any other Python function, anyway). Thus, no need 
to duplicate the functionality directly in the C API.

--
resolution:  -> 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



[issue14945] Setup & Usage documentation for selected stdlib modules

2012-05-28 Thread Nick Coghlan

Nick Coghlan  added the comment:

Additional candidates after grepping the docs:

python -m site
python -m sysconfig
python -m pickle
python -m pickletools
python -m compileall
python -m test

--

___
Python tracker 

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



[issue3177] Add shutil.open

2012-05-28 Thread Hobs

Hobs  added the comment:

Then they or we can add Konqueror, etc to the options that are 'try'ed for
the 'view' option. Worst case they get a terminal cat of the file instead
of an error message or unintended action (like running a script). What
exactly are you proposing to do when execute is False? That's exactly what
the augmented launch function would do when the "open" or "view" option is
chosen. Anything else for the other options like "edit" or "email" is just
gravy (for application developers targeting the 90% of platforms that we
could easily anticipate).

Gnome/KDE Xdg-open, Android "Share", Windows Open, already do implement
more than we need. Like your "execute" flag, I'm suggesting we bypass all
that unpredictable open() stuff and allow the application developer to
chose what happens when they launch a file. It would allow the app
developer to stay out of the tug-of war between PC manufacturers, OS
manufacturers, and Internet service providers trying to set "preferred
applications" and steering customers to their products.

But clearly you have passion for the boolean execute flag, and you probably
have more experience with python standard libraries than I do, so go for
it. I like your "execute" option. Just thought you'd like to extend it to
include other options. I'm happy with my cross-platform home-rolled
launch() function for my apps that can't afford to leave launch() actions
up to chance.

On Sat, May 26, 2012 at 4:00 PM, Larry Hastings wrote:

>
> Larry Hastings  added the comment:
>
> > In Linux we could `try` nautilus then Mozilla
> > (file://.../containing_folder) then fall back to a shell
> > `cd && ls` if no browser is available, raising NotImplemented
> > if all else fails... until someone implements for that
> > user's platform particulars.
>
>  Designing a cross-platform API based on abilities provided by only one of
> those platforms, then waiving your hand and saying , is poor cross-platform
> API design.  OS X is 11 years old, GNOME is 13, KDE is 16, and none of the
> above appear to be in a hurry to add this feature.  And even on Windows,
> which has had this feature for 17 years (IIRC it was introduced with
> Windows 95)... it is hardly ever used.  99.999% of the time you simply want
> to "open" the file using the user's preferred app.
>
> Since Windows users already have an API to access this extra functionality
> on their platform (os.startfile) I assert that the cross-platform API
> should only expose the functionality that's available across platforms.
>  Hence my proposal for "execute".
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue14944] Setup & Usage documentation for pydoc, idle & 2to3

2012-05-28 Thread Nick Coghlan

Nick Coghlan  added the comment:

Same goes for idle and 2to3. These may just be cross-references to the relevant 
module documentation rather than completely new text.

--
title: Setup & Usage documentation for pydoc -> Setup & Usage documentation for 
pydoc, idle & 2to3

___
Python tracker 

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



[issue14945] Setup & Usage documentation for selected stdlib modules

2012-05-28 Thread Nick Coghlan

Nick Coghlan  added the comment:

Found it: #11260. I've left it open, since the original suggestion in that 
issue is related to actually documenting the -m behaviour of the smptd module - 
it was just the issue *discussion* that ended up covering the more general 
question of how such command line interfaces should be documented.

The current issue is specifically about providing a central index in the setup 
and usage documentation to those modules which *already* have officially 
documented and supported behaviour when executed with -m.

--

___
Python tracker 

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



[issue11260] smtpd-as-a-script feature should be documented and should use argparse

2012-05-28 Thread Nick Coghlan

Nick Coghlan  added the comment:

I created #14945 as a suggestion to add a simple page to 
http://docs.python.org/dev/using/index.html that will provide a central 
reference to the module documentation for modules with officially supported 
behaviour when used with the "-m" switch.

--
nosy: +ncoghlan

___
Python tracker 

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



[issue14945] Setup & Usage documentation for selected stdlib modules

2012-05-28 Thread Nick Coghlan

Nick Coghlan  added the comment:

I'm sure there's a predecessor to this issue that I intend for this one to 
replace, but I can't currently find it in order to mark it as superceded.

--

___
Python tracker 

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



[issue14945] Setup & Usage documentation for selected stdlib modules

2012-05-28 Thread Nick Coghlan

New submission from Nick Coghlan :

Some stdlib modules have officially documented and supported behaviour when 
executed via -m. These should be referenced from the Setup & Usage 
documentation at http://docs.python.org/dev/using/index.html

Current candidates:
python -m unittest
python -m timeit

--
assignee: docs@python
components: Documentation
messages: 161832
nosy: docs@python, ncoghlan
priority: normal
severity: normal
stage: needs patch
status: open
title: Setup & Usage documentation for selected stdlib modules
type: enhancement
versions: Python 2.7, Python 3.2, Python 3.3

___
Python tracker 

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



[issue14944] Setup & Usage documentation for pydoc

2012-05-28 Thread Nick Coghlan

New submission from Nick Coghlan :

pydoc is installed as a script by Python. It should be documented under 
http://docs.python.org/dev/using/index.html.

--
assignee: docs@python
components: Documentation
messages: 161831
nosy: docs@python, ncoghlan
priority: normal
severity: normal
stage: needs patch
status: open
title: Setup & Usage documentation for pydoc
type: enhancement
versions: Python 2.7, Python 3.2, Python 3.3

___
Python tracker 

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



[issue14940] Usage documentation for pysetup

2012-05-28 Thread Nick Coghlan

Nick Coghlan  added the comment:

See my reply on #14939. We need to start getting command line usage information 
*out* of the standard library reference and documenting it here.

--

___
Python tracker 

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



[issue14942] add PyType_New()

2012-05-28 Thread Nick Coghlan

Changes by Nick Coghlan :


--
Removed message: http://bugs.python.org/msg161829

___
Python tracker 

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



[issue14942] add PyType_New()

2012-05-28 Thread Nick Coghlan

Nick Coghlan  added the comment:

See my reply on #14939. We need to start getting command line usage information 
*out* of the standard library reference and documenting it here.

--
nosy: +ncoghlan

___
Python tracker 

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



[issue12510] IDLE get_the_calltip mishandles raw strings

2012-05-28 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

I am reopening just as a reminder to revise the comment.

--
status: closed -> open

___
Python tracker 

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



[issue14939] Usage documentation for pyvenv

2012-05-28 Thread Nick Coghlan

Nick Coghlan  added the comment:

No, we need to start using the Setup & Usage docs *more*, not less.

All tools with useful command line behaviour (especially those that are 
directly installed as scripts) should eventually be documented here.

The fact this has historically been avoided is no excuse for perpetuating the 
mistake.

--

___
Python tracker 

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



[issue14938] 'import my_pkg.__init__' creates duplicate modules

2012-05-28 Thread Ronan Lamy

Ronan Lamy  added the comment:

Grmf. I didn't mean to change the status.

--
resolution:  -> wont fix
status: open -> closed

___
Python tracker 

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



[issue14938] 'import my_pkg.__init__' creates duplicate modules

2012-05-28 Thread Ronan Lamy

Ronan Lamy  added the comment:

my_pkg.__init__ isn't treated as just another module but as a package. That is 
the reason why the bogus my_pkg.__init__.module1 is created, I guess:

>>> import sys
>>> sorted(name for name in sys.modules if name.startswith('my_'))
[]
>>> import my_pkg.__init__
>>> sorted(name for name in sys.modules if name.startswith('my_'))
['my_pkg', 'my_pkg.__init__', 'my_pkg.__init__.module1', 'my_pkg.module1', 
'my_pkg.module2']
>>> sys.modules['my_pkg.module1'].__package__
'my_pkg'
>>> sys.modules['my_pkg.__init__'].__package__
'my_pkg.__init__'

I agree that importing __init__ is a hack, but the way 3.3 reacts to it is 
nasty, because it can cause a whole application to be executed multiple times.

--
resolution: wont fix -> 
status: closed -> open

___
Python tracker 

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



[issue14895] test_warnings.py EnvironmentVariableTests is a bad test

2012-05-28 Thread Frank Wierzbicki

Changes by Frank Wierzbicki :


--
nosy: +fwierzbicki

___
Python tracker 

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



[issue14939] Usage documentation for pyvenv

2012-05-28 Thread Éric Araujo

Éric Araujo  added the comment:

I would document it in library/venv, just like other tools are documented in 
the relevant module docs.  I’m nonetheless +1 to listing all scripts installed 
by Python in the Setup and Usage docs, with links.

--
nosy: +eric.araujo

___
Python tracker 

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



[issue12932] dircmp does not allow non-shallow comparisons

2012-05-28 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Lennart, I saw your response on StackOverflow ;-).

--
nosy: +terry.reedy
resolution: out of date -> 
stage: committed/rejected -> test needed
status: closed -> open
versions: +Python 3.3 -Python 2.6, Python 2.7

___
Python tracker 

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



[issue14943] winreg OpenKey doesn't work as documented

2012-05-28 Thread Glenn Linderman

New submission from Glenn Linderman :

My first time to use winreg and I am sure that some of this report is 
documentation, but depending on behavior in other versions, maybe it is a 
regression in code as well, but I doubt it.

I'm reading the 3.3 documentation, but using 3.2.3 for testing.  The 
documentation doesn't indicate any change execpt the exception thrown, between 
3.2 and 3.3.

The documentation for OpenKey indicates it has 4 parameters, calling the 3rd 
"reserverd" and the 4th "access".  These are given default values of 0 and 
KEY_ALL_ACCESS, respectively, according to the function definition.

The text of the documentation does not further explain these parameters, rather 
it explains "res" and "sam" which may appear to correspond... (that is problem 
#1)

Assuming a correspondence, and a name change for those parameters somewhere 
along the line (perhaps between 3.1 and 3.2 when named parameters became 
supported, per the doc. note), then "sam" is defined to have a default value of 
"KEY_READ".  That conflicts with the default value shown in the function 
definition (this is problem #2).

The behavior of OpenKey in 3.2.2 seems to be that the access parameter actually 
defaults to "KEY_READ", rather than "KEY_ALL_ACCESS".  Since the documentation 
is inconsistent in this area, I'm not sure if there was intended to be a code 
change, nor what the prior behavior might have been, nor what the future 
behavior is intended to be.  If a change in default was intended, either it was 
implemented wrong, or documented wrong, and there is no indication in the 
documentation that a change was made, or should have been made (this is problem 
#3).

I suspect the changes should all be to the documentation, changing the function 
definition to read "KEY_READ" instead of "KEY_ALL_ACCESS", and changing the 
parameters in the text to be called "reserved" and "access" instead of "res" 
and "sam", and if so, then problem #3 is fictitious, just a result of the other 
inconsistencies, and speculation.

--
assignee: docs@python
components: Documentation
messages: 161822
nosy: docs@python, v+python
priority: normal
severity: normal
status: open
title: winreg OpenKey doesn't work as documented
type: behavior
versions: Python 3.2, Python 3.3

___
Python tracker 

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



[issue14940] Usage documentation for pysetup

2012-05-28 Thread Éric Araujo

Éric Araujo  added the comment:

I agree the doc needs work (I have a patch in progress), but don’t think it 
should be in “Python Setup and Usage” any more than pydoc or 2to3 or -m 
unittest, so suggest this be closed in favor of #12779.

--

___
Python tracker 

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



[issue14942] add PyType_New()

2012-05-28 Thread Eric Snow

Changes by Eric Snow :


--
components: +Interpreter Core
type:  -> enhancement

___
Python tracker 

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



[issue14942] add PyType_New()

2012-05-28 Thread Eric Snow

New submission from Eric Snow :

Nick Coghlan suggested[1] exploring an easier spelling for "type(name, (), {})" 
in the C API.  I've attached a patch that adds a function that does so: 
_PyType_New().  It's "private" in the patch, but only because I am reticent to 
expand the API without solid feedback from the more experienced devs.

Even if I didn't get the implementation quite right (I'm relatively new to the 
C API), the patch at least demonstrates the concept.  :)


[1] http://mail.python.org/pipermail/python-ideas/2012-May/015281.html

--
files: PyType_New.diff
keywords: patch
messages: 161820
nosy: eric.snow
priority: normal
severity: normal
status: open
title: add PyType_New()
versions: Python 3.3
Added file: http://bugs.python.org/file25752/PyType_New.diff

___
Python tracker 

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



[issue14668] Document the path option in the Windows installer

2012-05-28 Thread Nick Coghlan

Nick Coghlan  added the comment:

See #14941 for a couple of other issues I noticed with the current Windows docs 
(specifically, -m means finding the stdlib location could probably be 
de-emphasised and the docs on compiling should be replaced with a reference to 
the devguide)

--
nosy: +ncoghlan

___
Python tracker 

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



[issue14941] "Using Python on Windows" end user docs are out of date

2012-05-28 Thread Nick Coghlan

Changes by Nick Coghlan :


--
superseder:  -> Document the path option in the Windows installer

___
Python tracker 

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



[issue14941] "Using Python on Windows" end user docs are out of date

2012-05-28 Thread Brian Curtin

Brian Curtin  added the comment:

#14668

--
resolution:  -> duplicate
status: open -> closed

___
Python tracker 

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



[issue14941] "Using Python on Windows" end user docs are out of date

2012-05-28 Thread Nick Coghlan

New submission from Nick Coghlan :

The following docs should be updated based on the automatic PATH manipulation 
in the updated installer:
http://docs.python.org/dev/using/windows.html#using-python-on-windows

The section on script execution should also mention the -m switch and the 
section on compiling Python on Windows should be replaced with a reference to 
the devguide (if there is information here which is both still current and not 
in the devguide, then it should be added there).

--
messages: 161817
nosy: brian.curtin, ncoghlan
priority: normal
severity: normal
stage: needs patch
status: open
title: "Using Python on Windows" end user docs are out of date
type: enhancement
versions: Python 3.3

___
Python tracker 

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



[issue14940] Usage documentation for pysetup

2012-05-28 Thread Nick Coghlan

New submission from Nick Coghlan :

Command line documentation for pysetup must be provided under 
http://docs.python.org/dev/using/index.html before 3.3 is released.

--
messages: 161816
nosy: eric.araujo, ncoghlan, tarek
priority: deferred blocker
severity: normal
stage: needs patch
status: open
title: Usage documentation for pysetup
type: enhancement

___
Python tracker 

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



[issue14939] Usage documentation for pyvenv

2012-05-28 Thread Nick Coghlan

New submission from Nick Coghlan :

Command line documentation for pyvenv must be provided under 
http://docs.python.org/dev/using/index.html before 3.3 is released.

--
assignee: docs@python
components: Documentation
messages: 161815
nosy: docs@python, ncoghlan, vinay.sajip
priority: deferred blocker
severity: normal
stage: needs patch
status: open
title: Usage documentation for pyvenv
type: enhancement
versions: Python 3.3

___
Python tracker 

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



[issue14744] Use _PyUnicodeWriter API in str.format() internals

2012-05-28 Thread STINNER Victor

STINNER Victor  added the comment:

> Functions to write digits into a string may be appropriate
> in the stringlib.

Oh, stringlib is specific to unicodeobject.c: it cannot be used outside.

--

___
Python tracker 

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



[issue14744] Use _PyUnicodeWriter API in str.format() internals

2012-05-28 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

I just sent you a patch which does not use any macros or stringlib.

--

___
Python tracker 

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



[issue14937] IDLE's deficiency in the completion of file names (Python 32, Windows XP)

2012-05-28 Thread Roger Serwy

Roger Serwy  added the comment:

The "open_completions" method in AutoComplete.py is where the bug exists. When 
mode == COMPLETE_FILES, the code searches for characters within the ASCII set, 
plus a few others contained in FILENAME_CHARS. 

Attached is a patch to also include characters beyond the ASCII set during the 
backward search. If anyone knows of a better technique, please comment. 

Fransisco, thanks for reporting this issue. If you find more, please let us 
know.

--
keywords: +patch
nosy: +serwy, terry.reedy
Added file: http://bugs.python.org/file25751/issue14937.patch

___
Python tracker 

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



[issue10839] email module should not allow some header field repetitions

2012-05-28 Thread R. David Murray

R. David Murray  added the comment:

My original fix for this for email6 got lost in a refactoring.  Here is a patch 
that fixes it in the code I recently checked in.  It may not cover all the 
headers that should be unique, since I haven't implemented parsers for all 
structured headers yet, but they will all be there before the new code moves 
from provisional to stable.

--
keywords: +patch
Added file: http://bugs.python.org/file25750/max_count.patch

___
Python tracker 

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



[issue14744] Use _PyUnicodeWriter API in str.format() internals

2012-05-28 Thread STINNER Victor

STINNER Victor  added the comment:

> So far away I have to say, it is better to use stringlib
> approach, than the massive macros, which are more difficult
> to read and edit.

Ah, you don't like the two macros in longobject.c. Functions to write digits 
into a string may be appropriate in the stringlib.

--

___
Python tracker 

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



[issue14938] 'import my_pkg.__init__' creates duplicate modules

2012-05-28 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



[issue14938] 'import my_pkg.__init__' creates duplicate modules

2012-05-28 Thread Brett Cannon

Brett Cannon  added the comment:

You can't have it both ways. If you explicitly import __init__ then it becomes 
just another module to Python, but you still need the implicit package module 
(i.e. without the __init__ name) for everything else to work since so much of 
the import system relies on the name of the module itself. If one chooses to 
work around the import system by doing stuff that is non-standard you will get 
quirky results like this.

Closing as "won't fix" as it isn't worth the code complication to support such 
an edge case.

--
resolution:  -> wont fix
status: open -> closed

___
Python tracker 

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



[issue14920] help(urllib.parse) fails when LANG=C

2012-05-28 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



[issue14937] IDLE's deficiency in the completion of file names (Python 32, Windows XP)

2012-05-28 Thread Francisco Gracia

Francisco Gracia  added the comment:

I would be delighted, but unfortunately I am a very poor programmer and do not 
have the slightest idea of how all this works.

--

___
Python tracker 

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



[issue11783] email parseaddr and formataddr should be IDNA aware

2012-05-28 Thread R. David Murray

Changes by R. David Murray :


--
assignee: r.david.murray -> 

___
Python tracker 

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



[issue11783] email parseaddr and formataddr should be IDNA aware

2012-05-28 Thread R. David Murray

R. David Murray  added the comment:

I'm finally getting back around to this.  Torsten, could you submit a 
contributor agreement, please?  (http://www.python.org/psf/contrib/)

And to answer the question you had about the 'still failing' test, parseaddr 
isn't currently doing the encoded-word decode.  Either it should do that too, 
or it shouldn't do the IDNA decode.  I think it should do the decode, because 
parseaddr and formataddr are supposed to be inverses.  And decoding when 
decoding didn't used to be done seems like a backward compatible change: a 
program doing its own decoding just won't find anything that needs decoding.

--

___
Python tracker 

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



[issue14930] Make memoryview weakrefable

2012-05-28 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset bc0281f85409 by Richard Oudkerk in branch 'default':
Issue #14930: Make memoryview objects weakrefable.
http://hg.python.org/cpython/rev/bc0281f85409

--
nosy: +python-dev

___
Python tracker 

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



[issue14775] Dict untracking can result in quadratic dict build-up

2012-05-28 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> No problem. I've been thinking about getting involved with python
> development for a while - this seemed a good place to start!

It is. You can also subscribe to the core-mentorship mailing-list if you want: 
http://mail.python.org/mailman/listinfo/core-mentorship

I've now committed the patches. Thanks for your contribution!

(if by chance it doesn't solve the issue, feel free to re-open it)

--
resolution:  -> fixed
stage: patch review -> 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



[issue14775] Dict untracking can result in quadratic dict build-up

2012-05-28 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 47e6217d0e84 by Antoine Pitrou in branch '3.2':
Issue #14775: Fix a potential quadratic dict build-up due to the garbage 
collector repeatedly trying to untrack dicts.
http://hg.python.org/cpython/rev/47e6217d0e84

New changeset 7951900afd00 by Antoine Pitrou in branch 'default':
Issue #14775: Fix a potential quadratic dict build-up due to the garbage 
collector repeatedly trying to untrack dicts.
http://hg.python.org/cpython/rev/7951900afd00

New changeset 6554ebbeb2f3 by Antoine Pitrou in branch '2.7':
Issue #14775: Fix a potential quadratic dict build-up due to the garbage 
collector repeatedly trying to untrack dicts.
http://hg.python.org/cpython/rev/6554ebbeb2f3

--
nosy: +python-dev

___
Python tracker 

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



[issue11783] email parseaddr and formataddr should be IDNA aware

2012-05-28 Thread R. David Murray

Changes by R. David Murray :


--
components: +email -Library (Lib)
nosy: +barry

___
Python tracker 

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



[issue12037] test_email failures under Windows with the eol extension activated

2012-05-28 Thread R. David Murray

Changes by R. David Murray :


--
assignee: r.david.murray -> 
components: +email
nosy: +barry

___
Python tracker 

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



[issue10839] email module should not allow some header field repetitions

2012-05-28 Thread R. David Murray

Changes by R. David Murray :


--
components: +email -Library (Lib)
nosy: +barry

___
Python tracker 

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



[issue14360] email.encoders.encode_quopri doesn't work with python 3.2

2012-05-28 Thread R. David Murray

Changes by R. David Murray :


--
components: +email -Library (Lib)

___
Python tracker 

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



[issue13700] imaplib.IMAP4.authenticate authobject does not work correctly in python3

2012-05-28 Thread R. David Murray

Changes by R. David Murray :


--
components: +email -Library (Lib)
nosy: +barry

___
Python tracker 

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



[issue1079] decode_header does not follow RFC 2047

2012-05-28 Thread R. David Murray

R. David Murray  added the comment:

Ralf, thanks very much for this patch.  I'm considering applying it.  Given 
that the current code breaks on parsing various legitimate constructs, it seems 
like the behavior change (preserving whitespace in the non-EW parts...which IMO 
is correct) should be an acceptable tradeoff.

Could you please submit a contributor agreement?  
(http://www.python.org/psf/contrib/)

--
components: +email -Library (Lib)

___
Python tracker 

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



[issue14775] Dict untracking can result in quadratic dict build-up

2012-05-28 Thread Tim Silk

Tim Silk  added the comment:

> Thank you for doing this! 

No problem. I've been thinking about getting involved with python development 
for a while - this seemed a good place to start!

> Do you have a real name so that I can credit you?

Yes (thankfully) - I've added it to my profile.

> Also, could you fill a contributor agreement? 
> http://www.python.org /psf/contrib/

Yes, will do.

--

___
Python tracker 

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



[issue14928] Fix importlib bootstrapping issues

2012-05-28 Thread Meador Inge

Changes by Meador Inge :


--
nosy: +meador.inge

___
Python tracker 

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



[issue9041] raised exception is misleading

2012-05-28 Thread Meador Inge

Changes by Meador Inge :


--
resolution:  -> fixed
stage: patch review -> 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



[issue9041] raised exception is misleading

2012-05-28 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 8a65eceea56c by Meador Inge in branch '2.7':
Issue #9041: raised exception is misleading
http://hg.python.org/cpython/rev/8a65eceea56c

New changeset a2e140b083e0 by Meador Inge in branch '3.2':
Issue #9041: raised exception is misleading
http://hg.python.org/cpython/rev/a2e140b083e0

New changeset 7c7bbf4a70b7 by Meador Inge in branch 'default':
Issue #9041: raised exception is misleading
http://hg.python.org/cpython/rev/7c7bbf4a70b7

--
nosy: +python-dev

___
Python tracker 

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



[issue11050] email.utils.getaddresses behavior contradicts RFC2822

2012-05-28 Thread R. David Murray

R. David Murray  added the comment:

The pre 3.3 email package does not do any header unfolding.  You can make this 
work by doing the header unfolding before passing it to getaddresses:

  >>> email.utils.getaddresses([''.join(m['to'].splitlines())])
  [('A (B)', 'c...@d.org'), ('', 'd...@e.org')]

The new provisional policy that was just added to 3.3 (which will eventually 
become the standard interface) does do the unfolding before parsing the 
addresses, so it does not have this issue.  In 3.3 we now have this:

  >>> import email
  >>> from email.policy import SMTP
  >>> m = email.message_from_string("To: \"A\r\n (B)\" , (A\r\n C) 
\r\nSubject: test\r\n\r\nbody", policy=SMTP)
  >>> m['to'].addresses
  (Address(display_name='A (B)', username='c', domain='d.org'), 
Address(display_name='', username='d', domain='e.org'))

--
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



[issue14938] 'import my_pkg.__init__' creates duplicate modules

2012-05-28 Thread Aaron Meurer

Changes by Aaron Meurer :


--
nosy: +Aaron.Meurer

___
Python tracker 

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



[issue14938] 'import my_pkg.__init__' creates duplicate modules

2012-05-28 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +brett.cannon

___
Python tracker 

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



[issue14938] 'import my_pkg.__init__' creates duplicate modules

2012-05-28 Thread Ronan Lamy

New submission from Ronan Lamy :

If an __init__.py file contains relative imports, doing 'import 
my_pkg.__init__' or calling __import__('my_pkg.__init__') creates duplicate 
versions of the relatively imported modules, which (I believe) causes cryptic 
errors in some cases (cf. the metaclass issue in 
http://code.google.com/p/sympy/issues/detail?id=3272 ).

More precisely, with my_pkg/__init__.py containing (see attachment for the full 
setup):

from .module1 import a
from my_pkg.module2 import b

I get:

Python 3.3.0a3+ (default:0685f51e9891, May 27 2012, 02:22:12) 
[GCC 4.6.1] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import my_pkg.__init__
>>> import sys
>>> sorted(name for name in sys.modules if name.startswith('my_'))
['my_pkg', 'my_pkg.__init__', 'my_pkg.__init__.module1', 'my_pkg.module1', 
'my_pkg.module2']
>>> 

Note the bogus 'my_pkg.__init__.module1' entry. For reference, in Python 3.2, 
the last line is:

['my_pkg', 'my_pkg.__init__', 'my_pkg.module1', 'my_pkg.module2']


NB: calling __import__('my_pkg.__init__') might seem odd (I didn't actually 
expect it to work on any Python version), but doctest apparently relies on it 
to test __init__.py files.

--
components: Interpreter Core
files: my_pkg.tar.bz2
messages: 161799
nosy: Ronan.Lamy
priority: normal
severity: normal
status: open
title: 'import my_pkg.__init__' creates duplicate modules
type: behavior
versions: Python 3.3
Added file: http://bugs.python.org/file25749/my_pkg.tar.bz2

___
Python tracker 

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



[issue975330] Inconsistent newline handling in email module

2012-05-28 Thread R. David Murray

R. David Murray  added the comment:

I almost applied this patch, but my gut is having second thoughts about it.  I 
don't think this is the correct solution.  The correct solution would be to 
delay the encoding of the body part until the message generation phase, and use 
the requested linesep at that point.  That is, in 3.2 and 3.3 I've changed the 
paradigm from "always use \n and convert the final string at need" to "specify 
the linesep when flattening the message".

I'm uploading the completed patch here so I don't lose it, but I don't think 
I'm going to use it in this form.

--
assignee: r.david.murray -> 
components: +email -Library (Lib)
keywords:  -easy, patch
stage: test needed -> needs patch
Added file: http://bugs.python.org/file25748/crlf_base64_body_encode.patch

___
Python tracker 

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



[issue14930] Make memoryview weakrefable

2012-05-28 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Updated patch.

Looks good to me!

--

___
Python tracker 

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



[issue14930] Make memoryview weakrefable

2012-05-28 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue14937] IDLE's deficiency in the completion of file names (Python 32, Windows XP)

2012-05-28 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

Would you like to contribute a patch?

--
nosy: +loewis

___
Python tracker 

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



[issue14937] IDLE's deficiency in the completion of file names (Python 32, Windows XP)

2012-05-28 Thread Francisco Gracia

New submission from Francisco Gracia :

I find specially nice the completion feature for filenames of IDLE when they 
include long paths, something that is more mand more frequent with big disks 
and infinite amounts of files.

But there is a small problem with it. If the name of any of the directories 
that intervene in the path to the file has any special character in it (meaning 
by that I suppose any non ASCII character), the completion mechanism ceases to 
work.

For instance, if the path were:

d:/Biblioteca/Técnica/informática/Python ...

the cesation of the help would occur after the incorporation of *Técnica*, 
because its *e* is accented.

There is plenty of cheap software which shows this minor deficiency, but I 
consider that IDLE for Python 3 should not be in that group.

--
components: IDLE
messages: 161795
nosy: fgracia
priority: normal
severity: normal
status: open
title: IDLE's deficiency in the completion of file names (Python 32, Windows XP)
type: behavior
versions: Python 3.2

___
Python tracker 

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



[issue14936] PEP 3121, 384 refactoring applied to curses_panel module

2012-05-28 Thread Robin Schreiber

Robin Schreiber  added the comment:

I have now also added the PEP3121 patch for the curses_panel module.

--

___
Python tracker 

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



[issue14936] PEP 3121, 384 refactoring applied to curses_panel module

2012-05-28 Thread Robin Schreiber

Changes by Robin Schreiber :


Added file: http://bugs.python.org/file25747/curses_panel_pep3121.patch

___
Python tracker 

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



[issue14936] PEP 3121, 384 refactoring applied to curses_panel module

2012-05-28 Thread Robin Schreiber

New submission from Robin Schreiber :

I have now applied the Heap-Type Refactoring from PEP 384 to the curses_panel 
module. Currently I still provide seperate patches for the PEP 3121 and PEP 384 
refactoring. As mentioned in Issue #14935 I am planning to release single 
patches in the future for each module I refactor.

--
components: Extension Modules
files: curses_panel_pep384.patch
keywords: patch
messages: 161793
nosy: Robin.Schreiber
priority: normal
severity: normal
status: open
title: PEP 3121, 384 refactoring applied to curses_panel module
type: enhancement
versions: Python 3.3
Added file: http://bugs.python.org/file25746/curses_panel_pep384.patch

___
Python tracker 

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



[issue14935] PEP 384 Refactoring applied to _csv module

2012-05-28 Thread Robin Schreiber

Robin Schreiber  added the comment:

I was of course referring to PEP 384. Sorry for the inconvenience.

--
title: PEP 341 Refactoring applied to _csv module -> PEP 384 Refactoring 
applied to _csv module

___
Python tracker 

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



[issue14935] PEP 341 Refactoring applied to _csv module

2012-05-28 Thread Antoine Pitrou

Changes by Antoine Pitrou :


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

___
Python tracker 

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



[issue14935] PEP 341 Refactoring applied to _csv module

2012-05-28 Thread Robin Schreiber

New submission from Robin Schreiber :

Corresponding to my previous Issue #14732 I have now applied the Heap-Type 
Refactoring from PEP 341 to the _csv module. As I will apply this refactoring 
for almost every Standard Module, I will bundle my PEP3121 and PEP341 
refactorings into a single patch for future releases. (In case there are no 
objections)

--
components: Extension Modules
files: csv_pep341.patch
keywords: patch
messages: 161791
nosy: Robin.Schreiber
priority: normal
severity: normal
status: open
title: PEP 341 Refactoring applied to _csv module
type: enhancement
versions: Python 3.3
Added file: http://bugs.python.org/file25745/csv_pep341.patch

___
Python tracker 

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



[issue11954] 3.3 - 'make test' fails

2012-05-28 Thread Stefan Krah

Stefan Krah  added the comment:

I can confirm that test_distutils runs fine on Fedora both as root
and as non-root (rpmbuild is installed).

Also, I don't see any test failures when running the whole test suite
as root. IMO this means that all remaining issues in this report are
fixed.

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

___
Python tracker 

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



[issue14744] Use _PyUnicodeWriter API in str.format() internals

2012-05-28 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

> So, do you have any comment or complain? Or can I commit the patch?

I beg your pardon, I will do a review and additional benchmarks today.

So far away I have to say, it is better to use stringlib approach, than the 
massive macros, which are more difficult to read and edit. However, I will do a 
benchmark to check if we can achieve the same effect with less change code.

--

___
Python tracker 

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



[issue14930] Make memoryview weakrefable

2012-05-28 Thread Richard Oudkerk

Richard Oudkerk  added the comment:

Updated patch.

--
Added file: http://bugs.python.org/file25744/memoryview-weakref.patch

___
Python tracker 

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



[issue14443] Distutils test_bdist_rpm failure

2012-05-28 Thread Nick Coghlan

Nick Coghlan  added the comment:

Dave, sending this one back in your direction. Is there a relevant difference 
between rpmbuild in RHEL6 and rpmbuild in current Fedora?

--
assignee: eric.araujo -> dmalcolm

___
Python tracker 

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



[issue14915] pysetup3.3 install is case insensitive, remove is case sensitive

2012-05-28 Thread Nick Coghlan

Nick Coghlan  added the comment:

My original report looks like a misdiagnosis. What appears to be happening is 
that "pysetup3.3 install" is case *insensitive* (thus allowing "pysetup3.3 
install distutils2", but "pysetup3.3 remove" is case *sensitive*, thus 
requiring "pysetup3.3 remove Distutils2".

I figured this out because installing things with pysetup3.3 after running 
"make altinstall" actually broke test_packaging in my trunk build - apparently 
due to tests complaining that the package cache wasn't empty. Should I create a 
new issue pointing out that problem? Perhaps sysconfig should have a "checkout" 
profile that keeps everything away from system directories.

Anyway, after seeing Distutils2 in that test failure report, I thought to run 
"pysetup3.3 list" and confirmed the different capitalisation. Sure enough, 
upper-casing the initial D let the remove command work.

--
title: pysetup may leave a package in a half-installed state -> pysetup3.3 
install is case insensitive, remove is case sensitive

___
Python tracker 

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



[issue9742] Python 2.7: math module fails to build on Solaris 9

2012-05-28 Thread Stefan Krah

Stefan Krah  added the comment:

This is just a suggestion, but the easiest way of getting good support
for a non-mainstream platform is to provide a build slave:

http://www.python.org/dev/buildbot/


Setting up a build slave takes 20 min:

http://bugs.python.org/file24399/buildslave_install.txt


On Unix running a build slave is practically zero-maintenance.


The general problem with exotic platforms is that developers aren't
able to reproduce the issue and are reluctant to commit a fix which
they can't test.

--
nosy: +skrah

___
Python tracker 

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



[issue14744] Use _PyUnicodeWriter API in str.format() internals

2012-05-28 Thread STINNER Victor

STINNER Victor  added the comment:

So, do you have any comment or complain? Or can I commit the patch?
Le 24 mai 2012 11:57, "STINNER Victor"  a écrit :

>
> STINNER Victor  added the comment:
>
> >> For Python 3.3, _PyUnicodeWriter API is faster than the Py_UCS4 buffer
> API and PyAccu API in quite all cases, with a speedup between 30% and 100%.
> But there are some cases where the _PyUnicodeWriter API is slower:
> >
> > Perhaps most of these problems can be solved if instead of the boolean
> > flag (overallocate/no overallocate) to use the Py_ssize_t parameter that
> > indicates by how much should you overallocate (it is the length of the
> > suffix in the format).
>
> There is not only a flag (flags.overallocate): there is also the
> min_length, which is used and helps for str%args and str.format(args).
>
> My patch contains a lot of "tricks" to limit overallocation, e.g.
> don't overallocate if we are writing the last part of the output.
>
> Computing exactly the size of the buffer gives the best performance
> because it avoids a resize in _PyUnicodeWriter_Finish(). I tried for
> example to modify PyUnicode_Format() to parse the format string twice:
> first to compute the size of the output buffer, second to write
> characters. In my experience, parsing the format string twice is more
> expensive than reallocating the buffer (PyUnicode_READ is expensive),
> especially on short and simple format strings.
>
> I tried different methods to allocate the buffer of _PyUnicodeWriter:
> change the overallocation factor (0%, 25%, 50%, 100%), only
> overallocate +100 characters, etc. But I failed to find something
> better than the proposed patch.
>
> At least I can say than always disabling overallocation slows done
> many cases: when there is a suffix after an argument, or when there
> are more than one argument.
>
> Feel free to experiment other methods to estimate the size of the output
> buffer.
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue14915] pysetup may leave a package in a half-installed state

2012-05-28 Thread Éric Araujo

Éric Araujo  added the comment:

IIUC checking trove classifiers / requires-python or something else before 
installing may be a good idea, but this bug is about something else: a project 
can be half-installed.  You could reproduce it with a Python 2 project with one 
file containing a syntax error (I think unittest2 is an example, see #10530).

--

___
Python tracker 

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



[issue14443] Distutils test_bdist_rpm failure

2012-05-28 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

Unfortunately, it seems like it's still failing on the RHEL 6 buildbot.

--
status: pending -> open

___
Python tracker 

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



  1   2   >