[issue18349] argparse usage should preserve () in metavars such as range(20)

2013-07-02 Thread paul j3

Changes by paul j3 :


--
components: +Library (Lib)
type:  -> behavior
versions: +Python 3.4

___
Python tracker 

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



[issue18349] argparse usage should preserve () in metavars such as range(20)

2013-07-02 Thread paul j3

New submission from paul j3:

As discussed in issue 16468, a metavar may be used to provide an alternative 
representation of a choices option.  However if a metvar like 'range(20)' is 
used, usage formatter strips off the '()'.

>>> parser.add_argument('foo', type=int, 
choices=range(20), metavar='range(0,20)')
>>> parser.format_usage()
# expect: 'usage: PROG [-h] range(0,20)\n'
# actual: 'usage: PROG [-h] range0,20\n'

This is done by a line in the help formater that removes excess mutually 
exclusive group notation:

HelpFormatter._format_actions_usage
   ...
   text = _re.sub(r'\(([^|]*)\)', r'\1', text)

A solution is to change this line to distinguish between a case like ' (...)' 
and 'range(...)'

text = _re.sub(r'( )\(([^|]*)\)', r'\1\2', text)

--
files: metaparen.patch
keywords: patch
messages: 19
nosy: paul.j3
priority: normal
severity: normal
status: open
title: argparse usage should preserve () in metavars such as range(20)
Added file: http://bugs.python.org/file30754/metaparen.patch

___
Python tracker 

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



[issue7292] Multiprocessing Joinable race condition?

2013-07-02 Thread Jonathan

Jonathan added the comment:

I can't even find the code I was having issues with anymore and I'm not doing 
anything related to this right now. So, unless Ramchandra can still reproduce 
this I'm going to say go ahead and close it.

--
status: pending -> open

___
Python tracker 

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



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

2013-07-02 Thread STINNER Victor

Changes by STINNER Victor :


Removed file: http://bugs.python.org/file30629/py_setallocators-6.patch

___
Python tracker 

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



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

2013-07-02 Thread STINNER Victor

Changes by STINNER Victor :


Removed file: http://bugs.python.org/file30653/py_setallocators-8.patch

___
Python tracker 

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



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

2013-07-02 Thread STINNER Victor

Changes by STINNER Victor :


Removed file: http://bugs.python.org/file30645/py_setallocators-7.patch

___
Python tracker 

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



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

2013-07-02 Thread STINNER Victor

STINNER Victor added the comment:

Updated patch (version 9):

- update API to the last version of the PEP
- PYMEM_DOMAIN_RAW now also have a well defined behaviour when requesting an 
allocation of zero bytes: PyMem_RawMalloc(0) now calls malloc(1)
- enhance the documentation (ex: mention default allocators)
- _testcapi checks also that PyMem_RawMalloc(0) is non-NULL

--
Added file: http://bugs.python.org/file30753/py_setallocators-9.patch

___
Python tracker 

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



[issue15797] bdist_msi does not pass -install/remove flags to install_script

2013-07-02 Thread B Maqueira

B Maqueira added the comment:

Hi Eric,

Any news/status on this bug? 

For a use case of this functionality please have a look at a demo I did a while 
ago at CamPUG (https://github.com/campug/braudel_sample_server).

--

___
Python tracker 

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



[issue18286] Python 3.3 - Slowing down computer

2013-07-02 Thread Matthew Barnett

Matthew Barnett added the comment:

> with open('url_list.txt') as f:
>
> content = f.readlines()
> content = ''.join(content)
>
Why are you reading all of the lines and then joining them together like that? 
Why not just do:

content = f.read()

> content = list(content)

Why are you making a list? You could just as easily index the string.

> if content[0] == 'h' and content[1] == 't' and content[2] =='t':

If 'content' is a string, then that can be:

  if content.startswith('htt'):

> print("Make sure that you remove http:/ !")
> time.sleep(1)
> sys.exit("")
> elif content[0] != 'w' and content[1] != 'w' and content[2] != 'w':

If 'content' is a string, then that can be:

  elif content.startswith('www'):

> print("Make sure that you have the www. at the start!")
> print(content[0],content[1])
> time.sleep(1)
> sys.exit("")
> os.system("CLS")
> else:
> print("Configuration looks fine!")
> time.sleep(1)
> with open('url_list.txt') as f:

Now you're reading it for a second time!

> content_url = f.readlines()
> content_join = ''.join(content_url)
> print("You will load video url",content_join,".")
> time.sleep(1)
> os.system("CLS")
> print("Processing...")
> time.sleep(1)
>
>
> global x

'global' has no effect outside a function.

> x = 0
> time.sleep(1)
> if x > 35:
> print("Warning! Your computer could go unstable!")
> time.sleep(1)
> os.system("CLS")
> print("Are you sure you want to select that many? - yes - no")
> while "1" == "1":

Or:
  while True:

> _answer_ = input("|yes| |no| - ")
> if _answer == "yes":
> break
> elif answer == "no":

You have '_answer_', '_answer' and 'answer'.

> sys.exit("Quitting application")
> else:
> print("Invalid input!")
> time.sleep(1)
> os.system("CLS")
>
> elif x in range(1,35):

Or:

  elif 1 <= x <= 35:

> print("Seems fine")
> elif x < 0:
> print("Warning!")
> print("Out of range value!")
> os.system("CLS")
> time.sleep(5)
> sys.exit("")
> os.system("CLS")
> time.sleep(5)
> print("Starting now!")
> while x > 0:
> x = x - 1
> os.system("start "+content_join)

You're starting up to 35 processes (or possibly more). That's going to slow 
down your machine.

>
> time.sleep(10)
> os.system("taskkill /f /im chrome.exe")
> os.system("start test.py")

Now you're repeating the whole procedure (I think). That's going to slow down 
your machine even more.

> sys.exit("restarting")

So it looks like your problem is not the fault of Python itself, but due to 
what you're doing with it.

--
nosy: +mrabarnett

___
Python tracker 

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



[issue18347] ElementTree corrupts cAse of closing tags when html method is specified

2013-07-02 Thread Christian Heimes

Christian Heimes added the comment:

Attached fix with unit test

The HTML serializer has a line tag = tag.lower() and used the lower tag to 
write the end tag.

--
keywords: +patch
Added file: http://bugs.python.org/file30752/18347_taglower.patch

___
Python tracker 

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



[issue18348] Additional code pages for EBCDIC

2013-07-02 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +haypo

___
Python tracker 

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



[issue18347] ElementTree corrupts cAse of closing tags when html method is specified

2013-07-02 Thread Christian Heimes

Christian Heimes added the comment:

I'm able to confirm the issue for Python 2.7 and 3.x:

>>> import xml.etree.ElementTree as ET
>>> tree = ET.fromstring("someData")
>>> ET.tostring(tree, encoding="utf-8", method="html")
b'someData'

--
nosy: +christian.heimes
stage:  -> needs patch
versions:  -Python 2.6, Python 3.1, Python 3.5

___
Python tracker 

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



[issue18305] [patch] Fast sum() for non-numbers

2013-07-02 Thread Sergey

Sergey added the comment:

> I don't know about IronPython, but Jython and PyPy have same behavior as 
> CPython.

Right. I was wrong, at least Jython and PyPy suffer from this bug too.

> I think that it is worthwhile to discuss the idea at first in the 
> Python-Ideas mailing list [1].

Ok, wrote to Python-Ideas, thank you.

--

___
Python tracker 

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



[issue2286] Stack overflow exception caused by test_marshal on Windows x64

2013-07-02 Thread Richard Oudkerk

Richard Oudkerk added the comment:

Closing because this is caused by #17206 and is already discussed there.

--
status: open -> closed

___
Python tracker 

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



[issue18348] Additional code pages for EBCDIC

2013-07-02 Thread roskakori

New submission from roskakori:

Currently Python includes a codec for EBCDIC international (cp500) but seems to 
be missing any further EBCDIC codecs. These encodings are widly used on 
mainframe platforms, popular in finance and insurance.

Descriptions of these codepages are available from IBM: 
. These 
descriptions also include mapping files although not in a format that can 
readily be processed by gencodec.py.

So instead I used the codecs included with Java 1.7 to generate mappings for 
gencodec.py. You can find them in the attached ZIP archive. As Java also runs 
on mainframe platforms, IBM should be interested in the Java codecs to be 
correct and complete.

The converter is available from . To 
build the cp*.txt for EBCDIC, simply run:

$ git clone https://github.com/roskakori/CodecMapper.git
$ cd CodecMapper
$ ant ebcdic

IBM lists a large number of EBCDIC codepages, I only attached the ones listed 
in the German Wikipedia: . This also 
includes cp500 for comparison with your current cp500. And it lacks EDF03DRV 
because even Java does not support it.

Currently Java 1.7 supports 43 variants. To get a list of them, use:

$ ant list | grep -i ' ibm'

This would also fix issue 1097797: Encoding for Code Page 273 used by EBCDIC 
Germany Austria.

--
components: Unicode
files: cp_ebcdic.zip
messages: 192214
nosy: ezio.melotti, lemburg, roskakori
priority: normal
severity: normal
status: open
title: Additional code pages for EBCDIC
type: enhancement
Added file: http://bugs.python.org/file30751/cp_ebcdic.zip

___
Python tracker 

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



[issue18347] ElementTree corrupts cAse of closing tags when html method is specified

2013-07-02 Thread Adam Urban

New submission from Adam Urban:

import xml.etree.ElementTree as ET
tree = ET.parse("myinput.xml")
tree.write("myoutput.xml", encoding="utf-16le", xml_declaration=False, 
default_namespace=None, method="html")

If the source XML has a tag like this:
someData

ElementTree will output it like this when html is specified as the "method":

someData

--
components: XML
messages: 192212
nosy: Adam.Urban, eli.bendersky, serhiy.storchaka
priority: normal
severity: normal
status: open
title: ElementTree corrupts cAse of closing tags when html method is specified
type: behavior
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 
3.4, Python 3.5

___
Python tracker 

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



[issue2286] Stack overflow exception caused by test_marshal on Windows x64

2013-07-02 Thread Richard Oudkerk

Richard Oudkerk added the comment:

Reopening because I think this is again a problem for Win64 and 3.x.  The Win64 
buildbots always seem to crash on test_marshal (and I do too).

It appears to be BugsTestCase.test_loads_2x_code() which crashes, which is 
virtually the same as test_loads_recursion().

--
nosy: +sbt
status: closed -> open
versions: +Python 3.4

___
Python tracker 

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



[issue18312] "make distclean" deletes files under .hg directory

2013-07-02 Thread R. David Murray

R. David Murray added the comment:

OK, this looks like a false alarm.  I still don't understand those @ failures 
or the input error on the makefile, but there doesn't seem to be a problem with 
this patch.

--
stage: needs patch -> 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



[issue15767] add ModuleNotFoundError

2013-07-02 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> It's not a question of harder but more error-prone since a typo in
> the string won't be directly noticed while mistyping an attribute
> name will be.

Ok, agreed. I guess it's ok, if it only adds one or two attributes.

--

___
Python tracker 

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



[issue18224] pyvenv pydoc.py script causing AttributeErrors on Windows

2013-07-02 Thread Éric Araujo

Éric Araujo added the comment:

That’s too bad; it’s annoying to lose the ability to just use “pydoc x” if a 
venv is activated.

--
nosy: +eric.araujo

___
Python tracker 

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



[issue15767] add ModuleNotFoundError

2013-07-02 Thread Brett Cannon

Brett Cannon added the comment:

It's not a question of harder but more error-prone since a typo in the string 
won't be directly noticed while mistyping an attribute name will be.

--

___
Python tracker 

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



[issue17206] Py_XDECREF() expands its argument multiple times

2013-07-02 Thread STINNER Victor

STINNER Victor added the comment:

Jeremy: "stack for python_d.exe has been already up'ed to 210"

Indeed, but not recently (changeset 97361d917d22):

<< Issue 2286: bump up the stack size of the 64-bit debug python_d.exe to 
210. The default value of 20 causes a stack overflow at 1965 iterations 
of r_object() in marshal.c, 35 iterations before the 2000 limit enforced by 
MAX_MARSHAL_STACK_DEPTH. >>

Oh it looks like it was the same issue: "Stack overflow exception caused by 
test_marshal on Windows x64". See issue #2286.

Amaury wrote in this issue (in 2008, msg63540):
"Can you try to raise the stack size on x64 builds? If 2Mb is enough for 32bit, 
4Mb should be good in your case."

Jeremy: "Therefore the reserve could be as large as needed to prevent stack 
overflows without impacting the actually memory footprint of the executable.  
Maybe we should consider increasing the reserve to match that of Linux (8MB)?"

Ah ok, if the memory footprint is unchanged, yes please increase the arbitrary 
limit. I would suggest 8 MB.

--

___
Python tracker 

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



[issue17206] Py_XDECREF() expands its argument multiple times

2013-07-02 Thread Jeremy Kloth

Jeremy Kloth added the comment:

I forgot to note that with the increased stack reserve my previous patches to 
Py_DECREF() and related macros are no longer needed.

--

___
Python tracker 

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



[issue17206] Py_XDECREF() expands its argument multiple times

2013-07-02 Thread Jeremy Kloth

Jeremy Kloth added the comment:

The /STACK:reserve[,commit] linker option uses 'reserve' as the upper limit of 
bytes to allow the executable to allocate.  The optional 'commit' value 
(default of 4096) is the amount of physical memory allocated as needed.

Therefore the reserve could be as large as needed to prevent stack overflows 
without impacting the actually memory footprint of the executable.  Maybe we 
should consider increasing the reserve to match that of Linux (8MB)?  From the 
list I posted above, the huge increase in stack use in Python-ast.c could lead 
to other overflows for certain expressions.

Attached is the patch to the project file to increase the stack reserve to 4MB. 
 The actual value doesn't impact the memory requirements of the debug build 
except in edge cases that would otherwise result in stack overflow exceptions.

--
Added file: http://bugs.python.org/file30750/project.diff

___
Python tracker 

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



[issue18346] Backporting of atomic file rename to Python 2.7

2013-07-02 Thread Christian Heimes

Christian Heimes added the comment:

I had some spare time: https://pypi.python.org/pypi/pyosreplace . Please test.

--

___
Python tracker 

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



[issue15767] add ModuleNotFoundError

2013-07-02 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> In this instance where there are only a set number of options are
> expected to be officially valid, yes I think enums are a good fit.

They are a good fit, that doesn't mean they're the only one.

> As for strings, the only way I would be okay with that is defining
> the strings either as attributes on ImportError itself or off of
> importlib to make it easy to do a comparison.

What does that mean?
I don't understand how `exc.reason == 'module_not_found'` is
harder than `exc.reason == ImportReason.MODULE_NOT_FOUND`.

--

___
Python tracker 

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



[issue15767] add ModuleNotFoundError

2013-07-02 Thread Brett Cannon

Brett Cannon added the comment:

In this instance where there are only a set number of options are expected to 
be officially valid, yes I think enums are a good fit.

As for strings, the only way I would be okay with that is defining the strings 
either as attributes on ImportError itself or off of importlib to make it easy 
to do a comparison. But in that case I might as well just drop _not_found and 
use ``str(exc).startswith('No module named ')`` to detect what I need and be 
done with it.

--

___
Python tracker 

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



[issue15767] add ModuleNotFoundError

2013-07-02 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> But the bootstrapping issues for the enum module is probably going
> to be the showstopper for this.

Have we succumbed to the enum religion already? Just make it a plain string.

--

___
Python tracker 

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



[issue18346] Backporting of atomic file rename to Python 2.7

2013-07-02 Thread R. David Murray

Changes by R. David Murray :


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



[issue15767] add ModuleNotFoundError

2013-07-02 Thread Brett Cannon

Brett Cannon added the comment:

OK, I'll revert the changes related to ModuleNotFoundError.

As for adding a 'reason' attribute, I see two sticking points. One is how to 
set the enum value. There is both the C code issue (specifically so ceval.c and 
import.c can use the values) as well as importlib's bootstrapping restrictions. 
I'll have to think about whether there is any reasonable way to make it work.

Second, as you hinted at Guido, is exactly what the acceptable cases may be. I 
would probably start with any ImportError raised directly by import itself and 
nothing more. Other things from loaders (e.g. bad magic number, stale bytecode, 
etc.) could be initially left out. That would mean the following possible 
values:

* module is not a package
* module not found
* None in sys.modules

But the bootstrapping issues for the enum module is probably going to be the 
showstopper for this. That suggests either adding not_found or figuring out 
some way to prevent _not_found from leaking outside of importlib (which I now 
think I can do somewhat reasonably).

--
resolution: fixed -> 
stage: committed/rejected -> 

___
Python tracker 

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



[issue18338] python --version should send output to STDOUT

2013-07-02 Thread Ramchandra Apte

Ramchandra Apte added the comment:

> Your proposal is reasonable. I'm flagging it for Python 3.4+ as it's a 
> backward incompatible modification.

Agree.

--
nosy: +Ramchandra Apte

___
Python tracker 

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



[issue18305] [patch] Fast sum() for non-numbers

2013-07-02 Thread Ramchandra Apte

Ramchandra Apte added the comment:

I agree with Sergey. Would be nice if it could use copy.copy (though that might 
change behaviour a bit)

--
nosy: +Ramchandra Apte

___
Python tracker 

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



[issue18312] "make distclean" deletes files under .hg directory

2013-07-02 Thread R. David Murray

R. David Murray added the comment:

Hmm.  I may be pointing the finger at the wrong thing here...looking at more 
logs I'm now not sure what is up with the buildbots.

--

___
Python tracker 

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



[issue18312] "make distclean" deletes files under .hg directory

2013-07-02 Thread R. David Murray

R. David Murray added the comment:

Unfortunately make distclean is now failing on the buildbots.

Which reminds us that there is another place that that target, including the 
'find' at issue, is used.

Presumably there is an issue with tests not cleaning up after themselves that 
ought to be fixed, but for now we just need to re-fix make distclean.

http://buildbot.python.org/all/builders/x86%20Tiger%202.7/builds/2030/steps/clean/logs/stdio

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

___
Python tracker 

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



[issue18312] "make distclean" deletes files under .hg directory

2013-07-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5896f887a93a by Eric V. Smith in branch '2.7':
Closes #18312: 'make distclean' no longer deletes files in dot-directories.
http://hg.python.org/cpython/rev/5896f887a93a

New changeset 910ec3471d55 by Eric V. Smith in branch '3.3':
Closes #18312: 'make distclean' no longer deletes files in dot-directories.
http://hg.python.org/cpython/rev/910ec3471d55

New changeset 8e838598eed1 by Eric V. Smith in branch 'default':
#18312: merge from 3.3.
http://hg.python.org/cpython/rev/8e838598eed1

--
nosy: +python-dev
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



[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2013-07-02 Thread Scott Leerssen

Scott Leerssen added the comment:

Regarding whether or not to include the fix in 2.7, I'd like to suggest that it 
be included there as well.  It will be quite some time before the project on 
which I work moves to Python 3, and I just hit the same issue.

--
nosy: +Scott.Leerssen

___
Python tracker 

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



[issue18346] Backporting of atomic file rename to Python 2.7

2013-07-02 Thread Christian Heimes

Christian Heimes added the comment:

Some people have developed a ctypes interface to MoveFileExW(). For example 
https://github.com/mitsuhiko/python-atomicfile/ .

--
nosy: +christian.heimes

___
Python tracker 

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



[issue17261] multiprocessing.manager BaseManager cannot return proxies from proxies remotely (when listening on '')

2013-07-02 Thread Richard Oudkerk

Changes by Richard Oudkerk :


--
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
versions: +Python 3.3, Python 3.4

___
Python tracker 

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



[issue17261] multiprocessing.manager BaseManager cannot return proxies from proxies remotely (when listening on '')

2013-07-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 20b59fec1123 by Richard Oudkerk in branch '2.7':
Issue #17261: Ensure multiprocessing's proxies use proper address.
http://hg.python.org/cpython/rev/20b59fec1123

New changeset be4b9e677187 by Richard Oudkerk in branch '3.3':
Issue #17261: Ensure multiprocessing's proxies use proper address.
http://hg.python.org/cpython/rev/be4b9e677187

New changeset 7387b884f833 by Richard Oudkerk in branch 'default':
Issue #17261: Ensure multiprocessing's proxies use proper address.
http://hg.python.org/cpython/rev/7387b884f833

--
nosy: +python-dev

___
Python tracker 

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



[issue18346] Backporting of atomic file rename to Python 2.7

2013-07-02 Thread Ronald Oussoren

Ronald Oussoren added the comment:

Issue #8828 adds a new API to the os module, as such it is inappropriate for a 
back port (no new features in stable releases)

--
nosy: +ronaldoussoren

___
Python tracker 

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



[issue14206] multiprocessing.Queue documentation is lacking important details

2013-07-02 Thread Richard Oudkerk

Changes by Richard Oudkerk :


--
resolution:  -> fixed
stage:  -> committed/rejected

___
Python tracker 

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



[issue15767] add ModuleNotFoundError

2013-07-02 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

On Jul 02, 2013, at 07:16 AM, Serhiy Storchaka wrote:

>If most user code should catch a ModuleNotFoundError exception, perhaps it
>will be better rename old ImportError to ImportlibError (or ImportingError,
>or ImportMachineryError, or BaseImportError) and new ModuleNotFoundError to
>ImportError. This will left most existing user code untouched.

I urge some caution here.  I don't know that the above will cause problems,
but I do think you're walking into PEP territory.  I would feel much more
comfortable with an analysis based on testing existing third party code.

--

___
Python tracker 

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



[issue14206] multiprocessing.Queue documentation is lacking important details

2013-07-02 Thread Richard Oudkerk

Changes by Richard Oudkerk :


--
status: open -> closed

___
Python tracker 

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



[issue14206] multiprocessing.Queue documentation is lacking important details

2013-07-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f35401dba89f by Richard Oudkerk in branch '2.7':
Issue #14206: Clarify docs for Queue.join_cancel_thread().
http://hg.python.org/cpython/rev/f35401dba89f

New changeset 9746f217a270 by Richard Oudkerk in branch '3.3':
Issue #14206: Clarify docs for Queue.join_cancel_thread().
http://hg.python.org/cpython/rev/9746f217a270

New changeset d0b48efac9de by Richard Oudkerk in branch 'default':
Issue #14206: Clarify docs for Queue.join_cancel_thread().
http://hg.python.org/cpython/rev/d0b48efac9de

--
nosy: +python-dev

___
Python tracker 

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



[issue17273] Pool methods can only be used by parent process.

2013-07-02 Thread Richard Oudkerk

Changes by Richard Oudkerk :


--
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
title: multiprocessing.pool.Pool task/worker handlers are not fork safe -> Pool 
methods can only be used by parent process.
type: behavior -> 
versions: +Python 2.7, Python 3.4

___
Python tracker 

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



[issue17273] multiprocessing.pool.Pool task/worker handlers are not fork safe

2013-07-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 389788ba6bcb by Richard Oudkerk in branch '2.7':
Issue #17273: Clarify that pool methods can only be used by parent process.
http://hg.python.org/cpython/rev/389788ba6bcb

New changeset 57fe80fda9be by Richard Oudkerk in branch '3.3':
Issue #17273: Clarify that pool methods can only be used by parent process.
http://hg.python.org/cpython/rev/57fe80fda9be

New changeset 7ccf3d36ad13 by Richard Oudkerk in branch 'default':
Issue #17273: Clarify that pool methods can only be used by parent process.
http://hg.python.org/cpython/rev/7ccf3d36ad13

--
nosy: +python-dev

___
Python tracker 

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



[issue18346] Backporting of atomic file rename to Python 2.7

2013-07-02 Thread Alexandr Zarubkin

Changes by Alexandr Zarubkin :


--
title: Backporting of issue 8828 to Python 2.7 -> Backporting of atomic file 
rename to Python 2.7

___
Python tracker 

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



[issue18346] Backporting of issue 8828 to Python 2.7

2013-07-02 Thread me21

New submission from me21:

It would be nice to backport http://bugs.python.org/issue8828 to Python 2.7. 
For example, Django depends on atomic renames with its file-based sessions, and 
it still supports Python 2.x.
There was a bug in Django because of this 
(https://code.djangoproject.com/ticket/9084), and they ended up with non-atomic 
workaround.
Some other third-party libraries could be affected as well.

--
components: Library (Lib), Windows
messages: 192186
nosy: me21
priority: normal
severity: normal
status: open
title: Backporting of issue 8828 to Python 2.7
type: enhancement
versions: Python 2.7

___
Python tracker 

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



[issue18340] float related test has problem with Denormal Flush to Zero compiler options

2013-07-02 Thread V.E.O

V.E.O added the comment:

Hi Mark,

If these flag is opened by code running in Python, DAZ FTZ flags should be 
opened.
With Intel Compiler, in default, they add code opening the flag for you.

--

___
Python tracker 

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



[issue18244] Adopt C3-based linearization for improved ABC support in functools.singledispatch

2013-07-02 Thread Łukasz Langa

Łukasz Langa added the comment:

For the record, the PEP has been updated [1]_ and so has been the backport for 
2.6 - 3.3 [2]_.

.. [1] http://hg.python.org/peps/rev/000a8986ef73

.. [2] https://pypi.python.org/pypi/singledispatch/3.4.0.2

--

___
Python tracker 

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



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

2013-07-02 Thread Ronald Oussoren

Ronald Oussoren added the comment:

This version should be better:

* There should be no lines longer than 80 characters

* Changed coding style of the (private) XML plist writer classes
  to PEP8

* Public API is now dump/dumps and load/loads, the old API is still
  available and deprecated

  -> As mentioned before I'm not entirely sure if doing this is the
 right solution, but it does give us a clean path to remove
 deprecated functionality later on (in particular the Dict and Data
 classes). 
  -> What I haven't done yet, and probably should, is to write a 2to3
 fixer that converts code to the new API.

* Grouped source in more logical segments (deprecated, xml support, 
  binary support, generic code).

* The previous item means that I've moved even more code around, I looked
  into minimizing the patch but the original module could not be 
  easily extended without moving code around.

* Added some more tests
  -> I might add more tests when I manage to run coverage.py, for some
 reason the instructions in the dev-guide don't work for me with
 a framework install :-(

I might add a documentation comment to the binary plist support code that
gives an overview of the file format with pointers to more information, but 
other than that and possible test coverage improvements the patch should be 
done.

--
Added file: http://bugs.python.org/file30749/issue-14455-v7.txt

___
Python tracker 

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



[issue17870] Python does not provide PyLong_FromIntMax_t() or PyLong_FromUintMax_t() function

2013-07-02 Thread Mark Dickinson

Mark Dickinson added the comment:

Yes, I apologise; I haven't had time for review.  I'll unassign so that someone 
else can pick this up.  It would still be good to have an independent review 
from someone before this goes in, though.

--
assignee: mark.dickinson -> 

___
Python tracker 

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



[issue18345] logging: file creation options with FileHandler and friends

2013-07-02 Thread Antoine Pitrou

New submission from Antoine Pitrou:

When starting a service as root, you may want your log files to be created as 
another user (the service may drop privileges later). It would be nice to have 
a "chown" option to FileHander. For example it could take either a "username" 
string, or a ("username", "groupname") tuple.

(a similar request may be made for chmod, but umask helps a lot there)

This is quite low-priority :)

--
components: Library (Lib)
messages: 192181
nosy: pitrou, vinay.sajip
priority: low
severity: normal
status: open
title: logging: file creation options with FileHandler and friends
type: enhancement
versions: Python 3.4

___
Python tracker 

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



[issue18340] float related test has problem with Denormal Flush to Zero compiler options

2013-07-02 Thread Mark Dickinson

Mark Dickinson added the comment:

> From my test, GCC will not enforce DFZ/FTZ only by compiler options. It > 
> needs code modify register flag.

But in normal use, the Python process should be starting in a sensible default 
state, with the DAZ and FTZ flags disabled, so I'm confused about how the DAZ / 
FTZ flags ever get set in the first place.  Are you embedding Python in another 
app?

--

___
Python tracker 

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



[issue18340] float related test has problem with Denormal Flush to Zero compiler options

2013-07-02 Thread V.E.O

V.E.O added the comment:

Hi All,

>From my test, GCC will not enforce DFZ/FTZ only by compiler options. It needs 
>code modify register flag.

I think it's a problem with Intel Compiler.
Maybe from platform.python_compiler(), these tests can identify the compiler 
and be skipped.
But the identification is ambiguous, for in Linux it's "GCC Intel(R) C++ gcc 
x.x mode", in Windows it's like "MSC v.1600 32 bit (Intel)"

If the support for Intel Compiler is not OK, we can pending these issues for 
future fix.

--

___
Python tracker 

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



[issue18314] Have os.unlink remove junction points

2013-07-02 Thread Kim Gräsman

Kim Gräsman added the comment:

This comment outlines how to tell junction points from other mount points:
http://www.codeproject.com/Articles/21202/Reparse-Points-in-Vista?msg=3651130#xx3651130xx

This should port straight into Py_DeleteFileW.

Would anyone be interested in a patch?

--

___
Python tracker 

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



[issue18344] _bufferedreader_read_all() may leak reference to data

2013-07-02 Thread Richard Oudkerk

Richard Oudkerk added the comment:

Patch attached.

--
keywords: +patch
Added file: http://bugs.python.org/file30748/buf-readall.patch

___
Python tracker 

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



[issue18344] _bufferedreader_read_all() may leak reference to data

2013-07-02 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue15767] add ModuleNotFoundError

2013-07-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

If most user code should catch a ModuleNotFoundError exception, perhaps it will 
be better rename old ImportError to ImportlibError (or ImportingError, or 
ImportMachineryError, or BaseImportError) and new ModuleNotFoundError to 
ImportError. This will left most existing user code untouched.

--

___
Python tracker 

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