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

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

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

[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

[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

[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

[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

[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

[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

[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 ___ P

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

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

[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, wrot

[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 ___ __

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

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

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

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

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

[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 ___ _

[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

[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

[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

[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

[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 ___ _

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

[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

[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

[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 ___ _

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

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

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

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

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

[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: 'mak

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

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

[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 ___ __

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

[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

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

[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

[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://m

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

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

[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: C

[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 ___ __

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

[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

[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 -- ___ Pytho

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

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

[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

[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

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

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

[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 ___ _

[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:/

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