[issue38522] Py_USING_MEMORY_DEBUGGER is referenced in docs but not present in code

2021-12-29 Thread Benjamin Peterson


Benjamin Peterson  added the comment:


New changeset 9f0e40fae5191c3e3ed6109bd2e2f97aa0ac8d64 by Miss Islington (bot) 
in branch '3.10':
closes bpo-38522 docs: remove references to Py_USING_MEMORY_DEBUGGER (GH-30284) 
(GH-30295)
https://github.com/python/cpython/commit/9f0e40fae5191c3e3ed6109bd2e2f97aa0ac8d64


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue38522>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46253] C API documentation of Py_UNICODE_* character properties macros use Py_UNICODE instead of Py_UCS4

2022-01-11 Thread Benjamin Peterson


Benjamin Peterson  added the comment:


New changeset 43c5c1369cb21f08a1dc1d63923c3586b883e3e8 by Julian Gilbey in 
branch 'main':
closes bpo-46253: Change Py_UNICODE to Py_UCS4 in the C API docs to match the 
current source code (GH-30387)
https://github.com/python/cpython/commit/43c5c1369cb21f08a1dc1d63923c3586b883e3e8


--
nosy: +benjamin.peterson
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue46253>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46626] expose IP_BIND_ADDRESS_NO_PORT linux socket option

2022-02-03 Thread Benjamin Peterson


Change by Benjamin Peterson :


--
components: Library (Lib)
nosy: benjamin.peterson
priority: normal
severity: normal
status: open
title: expose IP_BIND_ADDRESS_NO_PORT linux socket option
type: enhancement
versions: Python 3.11

___
Python tracker 
<https://bugs.python.org/issue46626>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46626] expose IP_BIND_ADDRESS_NO_PORT linux socket option

2022-02-03 Thread Benjamin Peterson


Change by Benjamin Peterson :


--
keywords: +patch
pull_requests: +29289
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/31106

___
Python tracker 
<https://bugs.python.org/issue46626>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46626] expose IP_BIND_ADDRESS_NO_PORT linux socket option

2022-02-03 Thread Benjamin Peterson


New submission from Benjamin Peterson :


New changeset 1aa6be06c4cb7f04a340adb1c7b16b89803ef254 by Benjamin Peterson in 
branch 'main':
closes bpo-46626: Expose IP_BIND_ADDRESS_NO_PORT socket option. (GH-31106)
https://github.com/python/cpython/commit/1aa6be06c4cb7f04a340adb1c7b16b89803ef254


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue46626>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45459] Limited API support for Py_buffer

2022-02-22 Thread Benjamin Peterson


Benjamin Peterson  added the comment:

clang doesn't like the typedef forward-decl:

In file included from ../cpython/Modules/_ctypes/_ctypes.c:108:
In file included from ../cpython/Include/Python.h:43:
../cpython/Include/object.h:109:3: warning: redefinition of typedef 'PyObject' 
is a C11 feature [-Wtypedef-redefinition]
} PyObject;
  ^
../cpython/Include/pybuffer.h:23:24: note: previous definition is here
typedef struct _object PyObject;
   ^
1 warning generated.

--
nosy: +benjamin.peterson

___
Python tracker 
<https://bugs.python.org/issue45459>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46736] Generate HTML 5 with SimpleHTTPRequestHandler.list_directory

2022-02-23 Thread Benjamin Peterson


Benjamin Peterson  added the comment:


New changeset 0bb40a42d71873ea267aace8c92a02d66fe36dc2 by Dong-hee Na in branch 
'main':
closes bpo-46736: SimpleHTTPRequestHandler now uses HTML5. (GH-31533)
https://github.com/python/cpython/commit/0bb40a42d71873ea267aace8c92a02d66fe36dc2


--
nosy: +benjamin.peterson
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue46736>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12968] vvccc留查!!!

2011-09-13 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
resolution:  -> invalid
status: open -> closed

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



[issue12978] Figure out extended attributes on BSDs

2011-09-14 Thread Benjamin Peterson

New submission from Benjamin Peterson :

Extended attribute support currently exists in the os module for Linux. BSD's 
(including OSX) have a similar (but of course incompatible) interface. They 
should be exposed through the same functions. For example,

os.getxattr("myfile", "user.whatever")

should call on the C level

getxattr("myfile", "user.whatever", value, sizeof(value), 0, 0);

--
messages: 144028
nosy: benjamin.peterson
priority: normal
severity: normal
status: open
title: Figure out extended attributes on BSDs
versions: Python 3.3

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



[issue12995] Different behaviours with between v3.1.2 and v3.2.2

2011-09-16 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

This is because how the filesystem encoding is determined has changed. You 
probably need to explicity discover how non-ascii characters like those in 
'/home/vincent/àéèîö.jpg' are encoded in your filesystem.

--
nosy: +benjamin.peterson
resolution:  -> invalid
status: open -> closed

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



[issue12989] Consistently handle path separator in Py_GetPath on Windows

2011-09-19 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Approved for 3.1 as far as I'm concerned.

--

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



[issue12746] normalization is affected by unicode width

2011-09-28 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Not anymore, though. :)

--
resolution:  -> fixed
status: open -> closed

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



[issue12746] normalization is affected by unicode width

2011-09-28 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Almost, that is. The unicodedata module still needs to use the new PEP 393 API.

--
resolution: fixed -> 
status: closed -> open

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



[issue13113] Wrong error message on class instance, when giving too little positional arguments

2011-10-06 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Fixed in 3.3

Traceback (most recent call last):
  File "x.py", line 16, in 
debug=0)
TypeError: __init__() missing 2 required positional arguments: 'remote_user' 
and 'remote_prefix'

--
nosy: +benjamin.peterson
resolution:  -> out of date
status: open -> closed

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



[issue13137] from __future__ import division breaks ad hoc numeric types

2011-10-08 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

You have to implement __truediv__.

--
nosy: +benjamin.peterson
resolution:  -> invalid
status: open -> closed

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




[issue13135] Using type() as a constructor doesn't support new class keyword arguments

2011-10-08 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

That's not true. You simply call the metaclass itself.

--
nosy: +benjamin.peterson
resolution:  -> invalid
status: open -> closed

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



[issue5322] Python 2.6 object.__new__ argument calling autodetection faulty

2011-10-09 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

I think it needs tests.

--
nosy: +benjamin.peterson

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



[issue13239] Remove <> operator from Grammar/Grammar

2011-10-21 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Or perhaps we don't need joke backward compatibility? (That's nearly 3 years 
old.)

--
nosy: +benjamin.peterson

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



[issue13250] ctypes: reference leak in POINTER code

2011-10-23 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

The cause is ctypes caches POINTER types. You have to make sure to clear the 
cache.

--
nosy: +benjamin.peterson

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



[issue13274] heapq pure python version uses islice without guarding for negative counts

2011-10-27 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
nosy: +rhettinger

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



[issue12797] io.FileIO and io.open should support openat

2011-10-30 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Also, the documentation should indicate what exactly is supposed to be returned 
by "opener".

--
nosy: +benjamin.peterson

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



[issue13321] fstat doesn't accept an object with "fileno" method

2011-11-02 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
priority: normal -> low

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



[issue13332] execfile fixer produces code that does not close the file

2011-11-03 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Or you could just explicitly write out the exec(compile()) in your 2.x code.

--

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



[issue13342] input() builtin always uses "strict" error handler

2011-11-04 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

There's no reason you couldn't write your own input() function in Python to do 
this.

--
nosy: +benjamin.peterson

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



[issue13362] Many PEP 8 errors

2011-11-06 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Generally, we don't do style cleanups for the sake of style cleanups.

--
nosy: +benjamin.peterson
resolution:  -> rejected
status: open -> closed

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



[issue13362] Many PEP 8 errors

2011-11-07 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

2011/11/7 skreft :
>
> skreft  added the comment:
>
> Hi all again:
>
> in the original posting of this issue,  I asked what would be the best way to 
> address this issue. Additionally I proposed to use existing tools to check 
> the current code. These tools could be easily added to the tests in a non 
> failing mode, so developers who modify the code, could know that the source 
> code does not follow the coding style and probably she/he could improve the 
> code. This tool would also help newcomers to contribute better code.
>
> Unfortunately, by the decision of rejecting this issue without even answering 
> the full issue, I conclude that the Python team is not willing to improve its 
> own basecode.
>
> I repeat my posture, python source code should be a model of a python 
> project, hence if there are tools that can ensure or improve the quality of 
> the project, they should be incorporated to the development process.

It can be cleaned up and modernized as it is changed for some other
purpose. Ultimately, it doesn't matter in the least bit how many lines
are between inline comments and other code, which seems to be
principally what pep8.py cares about in Lib/*.

--

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



[issue13367] PyCapsule_New's argument *must* not a NULL.

2011-11-07 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

In this context, "may" means "allowed to". In other words, it is equivalent to 
"The pointer argument is not allowed to be NULL".

--
nosy: +benjamin.peterson
resolution:  -> works for me
status: open -> closed

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



[issue13375] Provide a namedtuple style interface for os.walk values

2011-11-09 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Perhaps Raymond has a different view, but I don't this patch makes anything 
more clear. There's only three things to remember and its convenient to unpack 
it in the loop like

for path, dirs, files in os.walk(somewhere):
...

--
nosy: +benjamin.peterson, rhettinger

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



[issue13375] Provide a namedtuple style interface for os.walk values

2011-11-09 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

2011/11/9 Nick Coghlan :
>
> Nick Coghlan  added the comment:
>
> Why provide any namedtuple interface in any context? After all, you can just 
> unpack them to individual variables.
>
> The point is that the values produced by os.walk() *aren't* just an arbitrary 
> 3-tuple - they have a definite API for describing a directory: the base path, 
> then lists of relative names for any subdirectories and the relative names 
> for any files. Why not make that explicit in the objects produced instead of 
> leaving it as merely implied?

You could make this argument for any function that returns a tuple to
return multiple distinct values. I claim that the API in this case is
already simple enough that adding a nametuple does nothing but feature
bloat. What does having a "dirinfo" object with attributes tell you
that simply unpacking the tuple doesn't? You have to remember names in
both cases.

>
> This idea actually came out of the proposal for providing an 
> itertools-inspired toolset for manipulating the output of os.walk() style 
> iteration (#13229 and https://bitbucket.org/ncoghlan/walkdir/overview).
>
> I'll be adding this feature to walkdir regardless, but it seems to make more 
> sense to offer it as standard behaviour.

Indeed, I think using a namedtuple seems more appropriate for your
"fancier" api.

--

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



[issue13381] compile fails to compile a ast module object giving a incomprehensible error

2011-11-10 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Fixed recently.

--
resolution:  -> out of date
status: open -> closed

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



[issue13384] Unnecessary __future__ import in random module

2011-11-11 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Things won't ever be removed from the __future__ module, but there's no harm in 
removing ones with no effect.

--
nosy: +benjamin.peterson

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



[issue13416] Python Tutorial, Section 3, Minor PEP 8 adjustment

2011-11-16 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

It's fine as it is; constants are often denoted with capital letters.

--
nosy: +benjamin.peterson
resolution:  -> rejected
status: open -> closed

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



[issue10980] http.server Header Unicode Bug

2011-11-18 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Please.

--

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



[issue13436] compile() doesn't work on ImportFrom with level=None

2011-11-20 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

LGTM.

--

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



[issue13436] compile() doesn't work on ImportFrom with level=None

2011-11-20 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
assignee: docs@python -> 

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



[issue12277] Missing comma in os.walk docs

2011-11-21 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

The reason is simply that 2.6 basically unmaintained.

--
nosy: +benjamin.peterson

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



[issue13462] Improve code and tests for Mixin2to3

2011-11-23 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Yes, last time I checked 2to3 doesn't work on 2.5 or 2.4. People will just have 
to run build_py2to3 on 2.6+.

--

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



[issue13468] Python 2.7.1 SegmentationFaults when given high recursion limit

2011-11-23 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Of course; that's what the recursion limit protects against.

--
nosy: +benjamin.peterson
resolution:  -> invalid
status: open -> closed

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



[issue13526] Deprecate the old Unicode API

2011-12-03 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Quoting the PEP "While the Py_UNICODE representation and APIs are deprecated 
with this PEP, no removal of the respective APIs is scheduled. The APIs should 
remain available at least five years after the PEP is accepted"

I don't think there should be warnings.

--
nosy: +benjamin.peterson

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



[issue13536] ast.literal_eval fails on sets

2011-12-05 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
resolution:  -> invalid
status: open -> closed
superseder:  -> ast.literal_eval does not handled new set literals

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




[issue13559] Use sendfile where possible in httplib

2011-12-08 Thread Benjamin Peterson

New submission from Benjamin Peterson :

HTTPConnection.send() should use os.sendfile when possible to avoid copying 
data into userspace and back.

--
components: Library (Lib)
keywords: easy
messages: 149052
nosy: benjamin.peterson
priority: normal
severity: normal
stage: needs patch
status: open
title: Use sendfile where possible in httplib
type: feature request
versions: Python 3.3

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



[issue13559] Use sendfile where possible in httplib

2011-12-08 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

2011/12/8 Giampaolo Rodola' :
>
> Giampaolo Rodola'  added the comment:
>
> This is not possible for two reasons:
>
> - on most POSIX systems, sendfile() works with mmap-like ("regular") files 
> only, while HTTPConnection.send() accepts any file-like object as long as it 
> provides a read() method
>
> - after read()ing a chunk of data from the file and before send()ing it over 
> the socket, the data can be subject to an intermediate conversion 
> (datablock.encode("iso-8859-1")):
> http://hg.python.org/cpython/file/87c6be1e393a/Lib/http/client.py#l839
> ...whereas sendfile() can only be used to send a binary file "as-is"

I presume you could check for a binary mode, though? Also, you can
catch EINVAl on invalid fds.

--

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



[issue13598] string.Formatter doesn't support empty curly braces "{}"

2011-12-14 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
assignee:  -> eric.smith
nosy: +eric.smith

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



[issue13603] Add prime-related and number theory functions to Python

2011-12-14 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

-1 in general. I think that's too domain specific to belong in stdlib.

--
nosy: +benjamin.peterson

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



[issue13603] Add prime-related and number theory functions to Python

2011-12-14 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Hardly, being a widely applicable mathematical function. Also, it's in a C math 
library which is what Python's is originally based on.

--

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



[issue13603] Add prime-related and number theory functions to Python

2011-12-14 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

2011/12/15 Meador Inge :
>
> Not just *a* C math library.  *The* Standard C library! :-)

Quite!

--

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



[issue13610] On Python parsing numbers.

2011-12-16 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

I think it's fairly harmless. Perhaps Python 4.

--
priority: normal -> low

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



[issue13607] Move generator specific sections out of ceval.

2011-12-16 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Seems mostly fine to me.

--
assignee:  -> benjamin.peterson

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



[issue13644] Python 3 crashes (segfaults) with this code.

2011-12-20 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Python isn't crashing; it's bailing out of an impossible situation. It's not 
clear what the correct behavior is, since you're basically preventing Python 
from aborting the recursive behavior.

--
nosy: +benjamin.peterson

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



[issue13644] Python 3 crashes (segfaults) with this code.

2011-12-21 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

The behavior of Python 2 is not anymore correct than that of Python 3.

--

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



[issue13644] Python 3 crashes (segfaults) with this code.

2011-12-22 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

There is no place for it to raise a RuntimeError which will continue to 
propogate!

--

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



[issue13652] Creating lambda functions in a loop has unexpected results when resolving variables used as arguments

2011-12-22 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
resolution:  -> invalid
status: open -> closed

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



[issue13653] reorder set.intersection parameters for better performance

2011-12-22 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
assignee:  -> rhettinger
nosy: +rhettinger

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



[issue13655] Python SSL stack doesn't have a default CA Store

2011-12-23 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

I'm not sure Python should be in the business of distributing CA certificates. 
I think it's better left to the application or Linux distribution.

--
nosy: +benjamin.peterson

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



[issue13644] Python 3 aborts with this code.

2011-12-23 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Nothing, but that would be pointless; the recursion would just start again.

--

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



[issue13644] Python 3 aborts with this code.

2011-12-24 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

2011/12/24 Georg Brandl :
>
> Georg Brandl  added the comment:
>
>> Nothing, but that would be pointless; the recursion would just start again.

Because it would be caught in the function call above in the stack?

--

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



[issue13644] Python 3 aborts with this code.

2011-12-24 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Basically forget my last 3 messages.

--

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



[issue13644] Python 3 aborts with this code.

2011-12-24 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

2011/12/24 Georg Brandl :
>
> Georg Brandl  added the comment:
>
> Would it?

(,)

--

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



[issue11638] python setup.py sdist --formats tar* crashes if version is unicode

2011-12-27 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

f0fcb82a88e9 broke bots. See 
http://www.python.org/dev/buildbot/all/builders/x86%20Gentoo%203.x/builds/1374/steps/test/logs/stdio

--
nosy: +benjamin.peterson

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



[issue12857] Expose called function on frame object

2011-12-27 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

What would you use the functionality provided by this patch for?

--
nosy: +benjamin.peterson

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



[issue13669] XATTR_SIZE_MAX and XATTR_LIST_MAX undefined on kfreebsd/debian with eglibc

2011-12-28 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Are you telling me that XATTR_SIZE_MAX is defined nowhere on eglibc?

--

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



[issue13667] __contains__ method behavior

2011-12-28 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

I think the idea has some merit. I think it should be well vetted on 
python-ideas, though. One thing that will certianly weigh against it is that 
implementation would not be trivial.

--

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



[issue13667] __contains__ method behavior

2011-12-28 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

2011/12/28 João Bernardo :
>
> João Bernardo  added the comment:
>
> I see that every other comparison operator (<, >, <=, >=, ==, !=) except for 
> `is` work the way I expect and is able to return anything.
>
> e.g.
>
>>>> numpy.arange(5) < 3
> array([ True,  True,  True, False, False], dtype=bool)
>
> I didn't checked the code (and probably I'm talking nonsense), but seems like 
> the `in` operator has an extra call to `PyObject_IsTrue` that maybe could be 
> dropped?

I'm not sure what you're referring to, but I doubt that would do the job.

>
> Of course it can break code relying on `x in y` being True/False but it would 
> only happen on customized classes.
>
> Another option that won't break code is to add a different method to handle 
> these cases. Something like "__contains_non_bool__", but that'd be a big api 
> change.

And completely hideous.

--

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



[issue13667] __contains__ method behavior

2011-12-28 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
resolution:  -> rejected
status: open -> closed

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



[issue13678] way to prevent accidental variable overriding

2011-12-29 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

I think this more the domain of pylint/pyflakes.

--
nosy: +benjamin.peterson
resolution:  -> rejected
status: open -> closed

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



[issue13678] way to prevent accidental variable overriding

2011-12-29 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

I suggest you mail python-ideas.

--

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



[issue13688] ast.literal_eval fails on octal numbers

2011-12-31 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
resolution: rejected -> invalid

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



[issue13703] Hash collision security issue

2012-01-03 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Barry, when this gets fixed, shall we coordinate release times?

--

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



[issue13706] Unicode fill characters no longer work in numeric formatting

2012-01-03 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

It's still possible; it's just apparently limited to ASCII characters.

--
nosy: +benjamin.peterson

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



[issue13710] hash() on strings containing only null characters returns the length of the strings

2012-01-03 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

No. Python's dictionary implementation is designed to handle hash functions 
with the properties of Python's.

--
nosy: +benjamin.peterson
resolution:  -> rejected
status: open -> closed

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



[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2012-01-05 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Closing now.

--
nosy: +benjamin.peterson
resolution:  -> out of date
status: open -> closed

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



[issue10521] str methods don't accept non-BMP fillchar on a narrow Unicode build

2012-01-05 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

I'm just going to close this and say "use 3.3".

--
nosy: +benjamin.peterson
resolution:  -> out of date
status: open -> closed

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



[issue13692] 2to3 mangles from . import frobnitz

2012-01-07 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
resolution:  -> out of date
status: open -> closed

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



[issue12736] Request for python casemapping functions to use full not simple casemaps per Unicode's recommendation

2012-01-07 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Here is a patch. I only dealt with case mappings and not titlecase. Doing 
titlecase properly requires word segmentation, which I think should be another 
patch/issue. This patch fixes swapcase(), capitalize(), upper(), and lower(). 
It does not include the changes to Objects/unicodetype_db.h because those are 
huge. Regenerate the database if you want to test it. Please review.

--
keywords: +patch
nosy: +benjamin.peterson
Added file: http://bugs.python.org/file24171/full-casemapping.patch

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



[issue13738] Optimize bytes.upper() and lower()

2012-01-08 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

LGTM.

--

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



[issue13748] Allow rb"" literals as an equivalent to br""

2012-01-09 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

I would be happier if there was precedent for this with "ur" = "ru" in 2.x, 
which is not true.

--

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



[issue13752] add a casefold() method

2012-01-09 Thread Benjamin Peterson

New submission from Benjamin Peterson :

See http://mail.python.org/pipermail/python-ideas/2012-January/013292.html

--
components: Unicode
messages: 150996
nosy: benjamin.peterson, ezio.melotti
priority: low
severity: normal
status: open
title: add a casefold() method
type: enhancement
versions: Python 3.3

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



[issue12736] Request for python casemapping functions to use full not simple casemaps per Unicode's recommendation

2012-01-09 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

New patch. I implemented it the way Antoine desired. It seems rather 
inefficient to be copying around so much data...

--
Added file: http://bugs.python.org/file24190/full-casemapping.patch

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



[issue12736] Request for python casemapping functions to use full not simple casemaps per Unicode's recommendation

2012-01-10 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

__ap__'s implementation method is about 2x faster than mine.

--

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



[issue12736] Request for python casemapping functions to use full not simple casemaps per Unicode's recommendation

2012-01-10 Thread Benjamin Peterson

Changes by Benjamin Peterson :


Added file: http://bugs.python.org/file24199/full-casemapping.patch

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



[issue13767] Would be nice to have a future import that turned off old except style

2012-01-11 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Unfortunately, that would be a new feature, so it is not acceptable to Python 
2.7.

--
nosy: +benjamin.peterson
resolution:  -> rejected
status: open -> closed

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



[issue12736] Request for python casemapping functions to use full not simple casemaps per Unicode's recommendation

2012-01-11 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

New patch with title casing mappings added.

--
Added file: http://bugs.python.org/file24204/full-casemapping.patch

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



[issue12736] Request for python casemapping functions to use full not simple casemaps per Unicode's recommendation

2012-01-11 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
resolution:  -> fixed
status: open -> closed

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



[issue13752] add a str.casefold() method

2012-01-12 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Patch for review.

--
keywords: +patch
title: add a unicode.casefold() method -> add a str.casefold() method
Added file: http://bugs.python.org/file24224/casefolding.patch

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



[issue12152] Parser/asdl_c.py relies on mercurial repository revision

2011-05-23 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Indeed, Include/Python-ast.c and Python/Python-ast.c should be touched to avoid 
this.

--

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



[issue12152] Parser/asdl_c.py relies on mercurial repository revision

2011-05-23 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

It's true that Python use to be the only dependency for asdl_c.py, but now 
Mercurial is, too.

--

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



[issue12159] Integer Overflow in __len__

2011-05-23 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Yep, len() has to return something less than sys.maxsize.

--
nosy: +benjamin.peterson
resolution:  -> works for me
status: open -> closed

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



[issue5715] listen socket close in SocketServer.ForkingMixIn.process_request()

2011-05-24 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

You change caused test_socketserver to hang. I attempted a fix, but I'm not 
sure if it's completely correct.

--
nosy: +benjamin.peterson

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



[issue5715] listen socket close in SocketServer.ForkingMixIn.process_request()

2011-05-24 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

2011/5/24 Charles-François Natali :
>
> Charles-François Natali  added the comment:
>
>> You change caused test_socketserver to hang. I attempted a fix, but I'm not 
>> sure if it's completely correct.
>
> I'm a morron.
> I don't know how I could miss this: closing the server socket is perfectly 
> fine in TCP, since a new one is returned by accept(). But in UDP, it's 
> definitely wrong, since it's used by the handler.
> I don't know however how I missed this, since I remember having run 
> test_socketserver...
>
> The best fix is simply to revert the patch.

Done.

> I'm really sorry about this...

Don't worry. It's a bit of a rite of passage for new developers to
break the buildbots. :)

--

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



[issue5715] listen socket close in SocketServer.ForkingMixIn.process_request()

2011-05-24 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

2011/5/24 STINNER Victor :
>
> STINNER Victor  added the comment:
>
>> It's a bit of a rite of passage for new developers to
>> break the buildbots. :)
>
> How long is this rite?

The approximate number of times you do it each year is e^(-x) + C where C >= 13.

--

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



[issue12106] reflect syntatic sugar in with ast

2011-05-24 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Here is an improved patch. Sans comments, I will apply in a few days.

--
Added file: http://bugs.python.org/file22100/fixwith2.patch

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



[issue12106] reflect syntatic sugar in with ast

2011-05-24 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

2011/5/24 Nick Coghlan :
>
> Nick Coghlan  added the comment:
>
> Just to articulate the rationale, I'm guessing the reasoning behind this is 
> to make it feasible for source->AST->source translators to retain the 
> original grouping?

Correct. It also allows my Python static analysis tool to detect when
someone could be using the double with shorthand instead of
nested-withs.

--

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



[issue12190] intern filenames in bytecode

2011-05-26 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

How exactly does it bring down your disk space?

--
nosy: +benjamin.peterson

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



[issue12190] intern filenames in bytecode

2011-05-26 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

2011/5/26 Mike Solomon :
>
> Mike Solomon  added the comment:
>
> If you have a file with say a hundred functions, and each function contains
> the full path of that file on disk, your pyc file will contain about
> (100*(path_size+overhead)) bytes. In some cases, this is pretty
> significant.

I see. The support for saving interned strings no longer exists in Py3
where this "feature" would have to be added.

--

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



[issue12190] intern filenames in bytecode

2011-05-27 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

As you can see, I've implemented a similar solution in 3.3. It should have the 
same memory savings but not disk space saving. (This would require 
reintroducing the marshal feature for interned strings.)

--

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



[issue11610] Improving property to accept abstract methods

2011-05-27 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

FWIW, if you still want to advance this, you could bring it up on Python-dev. I 
still feel uncomfortable with the API but could be convinced with others 
thought it was the best solution.

--

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



[issue12199] Unify TryExcept and TryFinally

2011-05-27 Thread Benjamin Peterson

New submission from Benjamin Peterson :

You can write them as one compound statement in Python, so there's no point in 
having two ast classes.

--
components: Interpreter Core
files: try.patch
keywords: patch
messages: 137097
nosy: benjamin.peterson, ncoghlan
priority: normal
severity: normal
status: open
title: Unify TryExcept and TryFinally
versions: Python 3.3
Added file: http://bugs.python.org/file22158/try.patch

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



[issue12190] intern filenames in bytecode

2011-05-27 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Okay, I'll close.

--
resolution:  -> fixed
status: open -> closed

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



[issue12199] Unify TryExcept and TryFinally

2011-05-28 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Thanks for the review. New patch.

--
Added file: http://bugs.python.org/file22170/try2.patch

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



[issue12203] isinstance not functioning as documented

2011-05-28 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Everything is an instance of object.

--
nosy: +benjamin.peterson
resolution:  -> invalid
status: open -> closed

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



  1   2   3   4   5   6   7   8   9   10   >