[issue24056] Expose closure & generator status in function repr()

2015-05-03 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue24116] --with-pydebug has no effect when the final python binary is compiled

2015-05-03 Thread aleb

New submission from aleb:

This is how I configure and build:

$ ./configure --prefix=/usr \
  --with-threads \
  --with-computed-gotos \
  --enable-ipv6 \
  --with-system-expat \
  --with-dbmliborder=gdbm:ndbm \
  --with-system-ffi \
  --with-system-libmpdec \
  --enable-loadable-sqlite-extensions \
  --without-ensurepip \
  --with-pydebug

$ make "CFLAGS=-g -fno-inline -fno-strict-aliasing -O0"
...
gcc -pthread -c -Wno-unused-result -g -O0 -Wall -Wstrict-prototypes 
-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong 
--param=ssp-buffer-size=4 -g -fno-inline -fno-strict-aliasing -O0  
-Werror=declaration-after-statement   -I. -IInclude -I./Include 
-D_FORTIFY_SOURCE=2 -D_FORTIFY_SOURCE=2  -DPy_BUILD_CORE -o Modules/python.o 
./Modules/python.c
...
gcc -pthread -Wl,-O1,--sort-common,--as-needed,-z,relro 
-Wl,-O1,--sort-common,--as-needed,-z,relro -Xlinker -export-dynamic -o python 
Modules/python.o libpython3.4dm.a -lpthread -ldl  -lutil   -lm  

Notice the specified CFLAGS are used when building "-o Modules/python.o" for 
example (as many others), but are not used when building the "-o python" binary.

--
components: Build
messages: 242455
nosy: aleb
priority: normal
severity: normal
status: open
title: --with-pydebug has no effect when the final python binary is compiled
type: compile error
versions: Python 3.4

___
Python tracker 

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



[issue24115] PyObject_IsInstance() and PyObject_IsSubclass() can fail

2015-05-03 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue24116] --with-pydebug has no effect when the final python binary is compiled

2015-05-03 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis added the comment:

Set CFLAGS when calling configure, not make.

--
nosy: +Arfrever

___
Python tracker 

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



[issue24117] A small bug in GB18030 decoder.

2015-05-03 Thread Ma Lin

New submission from Ma Lin:

Hi,

There is a small bug in GB18030 decoder.

For 4-byte sequence, the legal range is:
0x81-0xFE for the 1st byte
0x30-0x39 for the 2nd byte
0x81-0xFE for the 3rd byte
0x30-0x39 for the 4th byte

The current code forgets to check 0xFE of the 1st and 3rd byte.
Therefore, there are 8630 illegal 4-byte sequences can be decoded by GB18030 
codec, here is an example:

# legal sequence 0x81319130 is decoded to U+060A, it's fine.
b = bytes([0x81, 0x31, 0x81, 0x30])
uchar = b.decode('gb18030')
print(ord(uchar))

# illegal sequence 0x8130FF30 can be decoded to U+060A as well.
b = bytes([0x81, 0x30, 0xFF, 0x30])  
uchar = b.decode('gb18030')
print(ord(uchar))

--
components: Unicode
files: forpy27.patch
keywords: patch
messages: 242457
nosy: Ma Lin, ezio.melotti, haypo
priority: normal
severity: normal
status: open
title: A small bug in GB18030 decoder.
versions: Python 2.7, Python 3.4, Python 3.5
Added file: http://bugs.python.org/file39277/forpy27.patch

___
Python tracker 

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



[issue24117] A small bug in GB18030 decoder.

2015-05-03 Thread Ma Lin

Changes by Ma Lin :


--
type:  -> behavior
Added file: http://bugs.python.org/file39278/forpy3.patch

___
Python tracker 

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



[issue24117] Wrong range checking in GB18030 decoder.

2015-05-03 Thread Ma Lin

Changes by Ma Lin :


--
title: A small bug in GB18030 decoder. -> Wrong range checking in GB18030 
decoder.

___
Python tracker 

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



[issue24117] Wrong range checking in GB18030 decoder.

2015-05-03 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +lemburg, loewis, serhiy.storchaka
stage:  -> patch review

___
Python tracker 

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



[issue24116] --with-pydebug has no effect when the final python binary is compiled

2015-05-03 Thread aleb

aleb added the comment:

It's confusing that the CFLAGS specified when running make are passed further 
sometimes but not always. So I guess that's a workaround? Or CFLAGS should 
never be specified to make directly?

--

___
Python tracker 

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



[issue22619] Possible implementation of negative limit for traceback functions

2015-05-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset eb6052605fd8 by Serhiy Storchaka in branch 'default':
Issue #22619: Added negative limit support in the traceback module.
https://hg.python.org/cpython/rev/eb6052605fd8

--
nosy: +python-dev

___
Python tracker 

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



[issue22619] Possible implementation of negative limit for traceback functions

2015-05-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you for your contribution Dmitry.

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

___
Python tracker 

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



[issue22881] show median in benchmark results

2015-05-03 Thread Stefan Behnel

Stefan Behnel added the comment:

> for the even number case, I think you shouldn't do // 2, but / 2.

Right. I updated the patch.

--
Added file: http://bugs.python.org/file39279/show_median.patch

___
Python tracker 

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



[issue24117] Wrong range checking in GB18030 decoder.

2015-05-03 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

Adding Hye-Shik who wrote the codec.

--
nosy: +hyeshik.chang

___
Python tracker 

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



[issue22881] show median in benchmark results

2015-05-03 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Have you found the median to be more stable than the minimum here?

--

___
Python tracker 

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



[issue22881] show median in benchmark results

2015-05-03 Thread Stefan Behnel

Stefan Behnel added the comment:

I'm actually not sure how it relates to the minimum. The more runs you have, 
the higher the chance of hitting the actual minimum at least once. And if none 
of the runs hits the real minimum, you're simply out of luck.

However, it should tend to give a much better result than the (currently 
printed) average, which suffers from outliers. And outliers are almost always 
too high for benchmarks and never too low, due to various external influences.

--

___
Python tracker 

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



[issue22881] show median in benchmark results

2015-05-03 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Then let's just replace the average with the median? I don't think it makes 
sense to add more statistical information to the output (IMHO, there is already 
too much of it :-)).

--

___
Python tracker 

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



[issue22881] show median in benchmark results

2015-05-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

May be just drop 5% of largest values to avoid the impact of outliers?

See also issue23552.

--

___
Python tracker 

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



[issue22881] show median in benchmark results

2015-05-03 Thread Stefan Behnel

Stefan Behnel added the comment:

Well, we can apply a kludge, or apply statistics.

--

___
Python tracker 

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



[issue24116] --with-pydebug has no effect when the final python binary is compiled

2015-05-03 Thread R. David Murray

R. David Murray added the comment:

Sounds like this is a duplicate of issue 9189?  (--with-pydebug certainly works 
for me).

--
nosy: +r.david.murray

___
Python tracker 

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



[issue22881] show median in benchmark results

2015-05-03 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> May be just drop 5% of largest values to avoid the impact of outliers?

In fast mode (option "-f"), there may not be enough samples for that.

--

___
Python tracker 

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



[issue23330] h2py.py regular expression missing

2015-05-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b32ca610c9e6 by Serhiy Storchaka in branch '2.7':
Issue #23330: h2py now supports arbitrary filenames in #include.
https://hg.python.org/cpython/rev/b32ca610c9e6

New changeset 0079465a9425 by Serhiy Storchaka in branch '3.4':
Issue #23330: h2py now supports arbitrary filenames in #include.
https://hg.python.org/cpython/rev/0079465a9425

New changeset f49e7e315d65 by Serhiy Storchaka in branch 'default':
Issue #23330: h2py now supports arbitrary filenames in #include.
https://hg.python.org/cpython/rev/f49e7e315d65

--
nosy: +python-dev

___
Python tracker 

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



[issue20179] Derby #10: Convert 50 sites to Argument Clinic across 4 files

2015-05-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1eaaf27b3956 by Serhiy Storchaka in branch 'default':
Issue #20179: Converted the _ssl module to Argument Clinic.
https://hg.python.org/cpython/rev/1eaaf27b3956

--

___
Python tracker 

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



[issue20168] Derby: Convert the _tkinter module to use Argument Clinic

2015-05-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b22ced894d51 by Serhiy Storchaka in branch 'default':
Issue #20168: Converted the _tkinter module to Argument Clinic.
https://hg.python.org/cpython/rev/b22ced894d51

--
nosy: +python-dev

___
Python tracker 

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



[issue20148] Derby: Convert the _sre module to use Argument Clinic

2015-05-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d5f78a855355 by Serhiy Storchaka in branch 'default':
Issue #20148: Converted the _sre module to Argument Clinic.
https://hg.python.org/cpython/rev/d5f78a855355

--
nosy: +python-dev

___
Python tracker 

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



[issue20175] Derby #6: Convert 50 sites to Argument Clinic across 8 files

2015-05-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thanks Peter for the fix. Applied by Christian in 743c54a2830f.

--

___
Python tracker 

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



[issue20179] Derby #10: Convert 50 sites to Argument Clinic across 4 files

2015-05-03 Thread Christian Heimes

Christian Heimes added the comment:

I'm with Alex. The move to argument clinic is going to make it very hard to 
port patches to older versions of Python, especially Python 2.7.

--

___
Python tracker 

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



[issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files

2015-05-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Added new comments. issue20182.signalmodule.patch LGTM.

--

___
Python tracker 

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



[issue23330] h2py.py regular expression missing

2015-05-03 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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

___
Python tracker 

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



[issue20179] Derby #10: Convert 50 sites to Argument Clinic across 4 files

2015-05-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Sorry. Should I rollback 1eaaf27b3956?

--

___
Python tracker 

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



[issue20168] Derby: Convert the _tkinter module to use Argument Clinic

2015-05-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

wantobjects() was not converted due to a bug in Argument Clinic (issue24051).

--
dependencies:  -Argument Clinic no longer works with single optional argument
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue20148] Derby: Convert the _sre module to use Argument Clinic

2015-05-03 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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

___
Python tracker 

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



[issue24095] Use after free during json encoding a dict (2)

2015-05-03 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
resolution:  -> duplicate
status: open -> closed
superseder:  -> Use after free during json encoding (PyType_IsSubtype)

___
Python tracker 

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



[issue24105] Use after free during json encoding a dict (3)

2015-05-03 Thread Benjamin Peterson

Benjamin Peterson added the comment:

I applied a very similar patch for #24094.

--
nosy: +benjamin.peterson
resolution:  -> duplicate
status: open -> closed
superseder:  -> Use after free during json encoding (PyType_IsSubtype)

___
Python tracker 

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



[issue20179] Derby #10: Convert 50 sites to Argument Clinic across 4 files

2015-05-03 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I have no opinion on whether this is a good thing or not. Security backports 
should be few and far between, so I don't think it's a big problem if they are 
a bit more difficult.

--

___
Python tracker 

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



[issue20179] Derby #10: Convert 50 sites to Argument Clinic across 4 files

2015-05-03 Thread Larry Hastings

Larry Hastings added the comment:

How often are patches backported to 2.7?  While I understand the sentiment, I'd 
like to understand the scale of the objection being raised.  I suspect it's 
infrequent, making the objection a minor one.

--

___
Python tracker 

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



[issue20180] Derby #11: Convert 50 sites to Argument Clinic across 9 files

2015-05-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

For now almost all generated code are written in separate file, so it doesn't 
attract attention (if you believe Argument Clinic).

--

___
Python tracker 

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



[issue24118] http.client example is no longer valid

2015-05-03 Thread Steven D'Aprano

New submission from Steven D'Aprano:

The example code for http.client shows www.python.org/parrot.spam return a 404:

https://docs.python.org/3/library/http.client.html#examples

>>> # Example of an invalid request
>>> conn.request("GET", "/parrot.spam")
>>> r2 = conn.getresponse()
>>> print(r2.status, r2.reason)
404 Not Found


However it no longer does that, instead it returns a 301 Moved Permanently.

--
assignee: docs@python
components: Documentation
messages: 242483
nosy: docs@python, steven.daprano
priority: normal
severity: normal
status: open
title: http.client example is no longer valid
versions: Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue24105] Use after free during json encoding a dict (3)

2015-05-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a disadvantage of opening several issues for similar bugs.

--

___
Python tracker 

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



[issue24119] Carry comments with the AST

2015-05-03 Thread Brett Cannon

New submission from Brett Cannon:

One thing about https://www.python.org/dev/peps/pep-0484/ is that it makes 
comments potentially semantically meaningful. Unfortunately the AST doesn't 
carry comments with it in any way, making it difficult to build a tool to 
implement a linter for PEP 484 using purely the ast module. Even if comments 
were carried along side-band and could do correlation by line number would be 
useful in this scenario.

I thought an issue had previously existed for this topic but I could find it.

--
components: Library (Lib)
messages: 242485
nosy: brett.cannon
priority: normal
severity: normal
stage: test needed
status: open
title: Carry comments with the AST
type: enhancement
versions: Python 3.5

___
Python tracker 

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



[issue24096] Use after free in get_filter

2015-05-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ffc1f9d1c8b3 by Benjamin Peterson in branch '3.3':
be more robust against the filters list changing under us (closes #24096)
https://hg.python.org/cpython/rev/ffc1f9d1c8b3

New changeset 47f4c3a5d86a by Benjamin Peterson in branch '3.4':
merge 3.3 (#24096)
https://hg.python.org/cpython/rev/47f4c3a5d86a

New changeset bfea101f9402 by Benjamin Peterson in branch 'default':
merge 3.4 (#24096)
https://hg.python.org/cpython/rev/bfea101f9402

--
nosy: +python-dev
resolution:  -> fixed
stage: needs patch -> resolved
status: open -> closed

___
Python tracker 

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



[issue10965] dev task of documenting undocumented APIs

2015-05-03 Thread Brett Cannon

Brett Cannon added the comment:

The issue is still valid and waiting for someone to submit a patch to the 
devguide.

--

___
Python tracker 

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



[issue1182143] making builtin exceptions more informative

2015-05-03 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +berker.peksag
stage: test needed -> patch review

___
Python tracker 

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



[issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files

2015-05-03 Thread Tal Einat

Tal Einat added the comment:

Do you mean the v2.patch file, or the one before it?

--

___
Python tracker 

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



[issue9517] Make test.script_helper more comprehensive, and use it in the test suite

2015-05-03 Thread Berker Peksag

Changes by Berker Peksag :


--
stage: patch review -> commit review

___
Python tracker 

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



[issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files

2015-05-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I don't see the v2 patch for the signal module.

--

___
Python tracker 

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



[issue10965] dev task of documenting undocumented APIs

2015-05-03 Thread Carol Willing

Carol Willing added the comment:

Add key points from linked email in msg126662 to documentation section of the 
devguide. 

* provide developers guidance on how to document undocumented APIs
* when and how to use __all__
* include rules from the linked email
* highlight "do no harm" to existing users as discussed in email

--
assignee:  -> docs@python
components: +Devguide
nosy: +docs@python, ezio.melotti, willingc

___
Python tracker 

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



[issue24082] Obsolete note in argument parsing (c-api/arg.rst)

2015-05-03 Thread Petr Viktorin

Petr Viktorin added the comment:

The note is *correct* concerning the length, but I don't think it's relevant: 
in a NUL-terminated string without embedded NULs, the length is unambiguous.

The other issues are about "u" itself, not the note. (I have nothing against 
the "it is recommended to use u# or U instead" part, but the reasons the note 
gives are wrong and irrelevant, respectively.)

--

___
Python tracker 

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



[issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files

2015-05-03 Thread Tal Einat

Tal Einat added the comment:

Sorry, my mistake, got mixed up with selectmodule.

--

___
Python tracker 

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



[issue20179] Derby #10: Convert 50 sites to Argument Clinic across 4 files

2015-05-03 Thread Christian Heimes

Christian Heimes added the comment:

You are right, patches are seldomly backported to Python 2.7. Features are 
never backported. Well, except for one exception: the ssl module. :)

--

___
Python tracker 

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



[issue20179] Derby #10: Convert 50 sites to Argument Clinic across 4 files

2015-05-03 Thread Donald Stufft

Donald Stufft added the comment:

I think it's worthwhile to maintain the ability to easily backport patches from 
3.x to 2.7, especially given the security sensitive nature of the ssl module.

--

___
Python tracker 

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



[issue24118] http.client example is no longer valid

2015-05-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 71ec881d8347 by Benjamin Peterson in branch '3.4':
update example, since python.org is HTTPS-only now (closes #24118)
https://hg.python.org/cpython/rev/71ec881d8347

New changeset 376c2d81d0e2 by Benjamin Peterson in branch '2.7':
update example, since python.org is HTTPS-only now (closes #24118)
https://hg.python.org/cpython/rev/376c2d81d0e2

New changeset 07571d2968b0 by Benjamin Peterson in branch 'default':
merge 3.4 (#24118)
https://hg.python.org/cpython/rev/07571d2968b0

--
nosy: +python-dev
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue24120] pathlib.(r)glob stops on PermissionDenied exception

2015-05-03 Thread Gregorio

New submission from Gregorio:

Debian 8
Python 3.4.3

Path.(r)glob stops when it encounters a PermissionDenied exception.

However, os.walk just skips files/directories it does not have permission to 
access. 

In my opinion, the os.walk behavior is better because it doesn't prevent usage 
in situations where a single file/directory in a tree has restricted 
permissions.

--
components: Library (Lib)
messages: 242496
nosy: Gregorio
priority: normal
severity: normal
status: open
title: pathlib.(r)glob stops on PermissionDenied exception
type: behavior
versions: Python 3.4

___
Python tracker 

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



[issue24113] shlex constructor unreachable code

2015-05-03 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the report.

> Users should either be permitted to set debug on via an optional __init__ 
> parameter,

This is already possible via the debug attribute 
(https://docs.python.org/3/library/shlex.html#shlex.shlex.debug), so I don't 
think adding a debug parameter to __init__ is necessary.

> or debug should be taken out of the initializer altogether.

+1. We can just remove the unreachable code.

--
keywords: +easy
nosy: +berker.peksag
stage:  -> needs patch
type: behavior -> enhancement
versions:  -Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.6

___
Python tracker 

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



[issue10435] Document unicode C-API in reST

2015-05-03 Thread Mark Lawrence

Mark Lawrence added the comment:

Py_UNICODE_TOLOWER, Py_UNICODE_TOUPPER and Py_UNICODE_TOTITLE are all labelled 
deprecated in 3.3 and presumably can be removed completely.  Alternatively 
should these like many others be scheduled for removal in 4.0?

--

___
Python tracker 

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



[issue24119] Carry comments with the AST

2015-05-03 Thread Mark Shannon

Mark Shannon added the comment:

Comments don't belong on the AST. Where would you attach them?

The tokenizer module provides all information about comments. Tools can get the 
information quite easily if they need it.

--
nosy: +Mark.Shannon

___
Python tracker 

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



[issue24051] Argument Clinic no longer works with single optional argument

2015-05-03 Thread Larry Hastings

Larry Hastings added the comment:

Optional groups were designed to support two specific legacy use cases:
  * functions that have groups of parameters that are 
  * functions with optional parameters to the left of required parameters

They are not intended to be used in cases like this.  I really, really wish you 
would stop using them except for these specific legacy cases.

Furthermore, the argument parsing for tkinter.tkapp.wantobjects has a very 
clear translation into Argument Clinic:

value: int = -1
/


Optional groups should not be used for single-argument functions.  I have no 
interest in fixing this bug.

--

___
Python tracker 

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



[issue24121] collections page doesn't mention that deques are mutable

2015-05-03 Thread lf

Changes by lf :


--
title: collections page doesn't -> collections page doesn't mention that deques 
are mutable

___
Python tracker 

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



[issue24121] collections page doesn't

2015-05-03 Thread lf

Changes by lf :


--
assignee: docs@python
components: Documentation
nosy: docs@python, lf
priority: normal
severity: normal
status: open
title: collections page doesn't
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue24051] Argument Clinic no longer works with single optional argument

2015-05-03 Thread Larry Hastings

Larry Hastings added the comment:

Sorry, I forgot to finish the first bullet point.  It should have read:

  * functions that have groups of parameters that are optional only as a group 
(e.g. curses.window.getch)

--

___
Python tracker 

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



[issue20148] Derby: Convert the _sre module to use Argument Clinic

2015-05-03 Thread Steve Dower

Steve Dower added the comment:

This broke Windows builds because of unnecessary "static" qualifiers on the 
forward declarations at lines 1429, 2472 and 2715 (as discussed on #20323).

Removing "static" from these lines fixes the build.

--
nosy: +steve.dower

___
Python tracker 

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



[issue20148] Derby: Convert the _sre module to use Argument Clinic

2015-05-03 Thread Steve Dower

Changes by Steve Dower :


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

___
Python tracker 

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



[issue20168] Derby: Convert the _tkinter module to use Argument Clinic

2015-05-03 Thread Steve Dower

Steve Dower added the comment:

This broke Windows builds because of unnecessary "static" qualifiers on the 
forward declarations at lines 2685 and 3006 (as discussed on #20323).

Removing "static" from these lines fixes the build.

--
nosy: +steve.dower
resolution: fixed -> 
status: closed -> open

___
Python tracker 

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



[issue24122] Install fails after configure sets the extending/embedding install directory to NONE

2015-05-03 Thread Xavier de Gaye

New submission from Xavier de Gaye:

Running configure without the '--prefix' option creates the Makefile with the 
following line:
LIBPL= NONE/lib/python3.5/config-$(VERSION)$(ABIFLAGS)

As a result 'make install' fails to install the library and the stuff needed 
for extending/embedding.

The attached patch fixes the problem.

--
components: Installation
files: configure.patch
keywords: patch
messages: 242504
nosy: twouters, xdegaye
priority: normal
severity: normal
status: open
title: Install fails after configure sets the extending/embedding install 
directory to NONE
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file39280/configure.patch

___
Python tracker 

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



[issue20148] Derby: Convert the _sre module to use Argument Clinic

2015-05-03 Thread Larry Hastings

Larry Hastings added the comment:

Removing "static" breaks GCC on Linux (gcc 4.9.2 on Ubuntu 15.04 x86-64):

./Modules/_sre.c:2780:20: error: static declaration of ‘pattern_methods’ 
follows non-static declaration
 static PyMethodDef pattern_methods[] = {
^
./Modules/_sre.c:1429:13: note: previous declaration of ‘pattern_methods’ was 
here
 PyMethodDef pattern_methods[];
 ^

IMO MSVS is the one being unreasonable here.  But obviously we need to find 
some way of doing this that makes both compilers happy.

--

___
Python tracker 

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



[issue20148] Derby: Convert the _sre module to use Argument Clinic

2015-05-03 Thread Larry Hastings

Larry Hastings added the comment:

Steve, does this patch fix the build for Windows?  By all rights it oughta.

--
Added file: 
http://bugs.python.org/file39281/larry.fix.sre.build.on.windows.diff.1.txt

___
Python tracker 

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



[issue2943] Distutils should generate a better error message when the SDK is not installed

2015-05-03 Thread Ralf Gommers

Changes by Ralf Gommers :


--
nosy: +ralf.gommers

___
Python tracker 

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



[issue20168] Derby: Convert the _tkinter module to use Argument Clinic

2015-05-03 Thread Larry Hastings

Larry Hastings added the comment:

As mentioned on #20148, removing the "static" from the forward declarations 
breaks it on GCC.  (And, of the two, I think GCC is the one being reasonable 
here.)

Attached is a patch that should fix the build for tkinter.

--
Added file: 
http://bugs.python.org/file39282/larry.fix.tkinter.build.on.windows.diff.1.txt

___
Python tracker 

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



[issue20148] Derby: Convert the _sre module to use Argument Clinic

2015-05-03 Thread Steve Dower

Steve Dower added the comment:

This line (1429 before patch, 1433 after patch) is still being troublesome:

static PyMethodDef pattern_methods[];

--

___
Python tracker 

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



[issue20148] Derby: Convert the _sre module to use Argument Clinic

2015-05-03 Thread Steve Dower

Steve Dower added the comment:

But looks like it's unnecessary and just wasn't removed in the patch. 
Everything builds fine without it

--

___
Python tracker 

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



[issue20148] Derby: Convert the _sre module to use Argument Clinic

2015-05-03 Thread Larry Hastings

Larry Hastings added the comment:

Sorry--you can simply remove that line, it's no longer needed.

--

___
Python tracker 

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



[issue20148] Derby: Convert the _sre module to use Argument Clinic

2015-05-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Does your patch just move type definition to the end of the file? I think this 
is only the way to make happy GCC and MS compiler.

Strange that no IRC bot complained about compilation failure.

--

___
Python tracker 

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



[issue20148] Derby: Convert the _sre module to use Argument Clinic

2015-05-03 Thread Larry Hastings

Larry Hastings added the comment:

Yes, it moves the type declaration to the bottom of the file, and adds forward 
static declarations for the types to the top of the file.

--

___
Python tracker 

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



[issue20148] Derby: Convert the _sre module to use Argument Clinic

2015-05-03 Thread Steve Dower

Steve Dower added the comment:

AFAIK the only buildbot with a nearly-up-to-date MSVC is still marked as 
unstable (http://buildbot.python.org/all/builders/AMD64%20Windows8%203.x). I 
keep meaning to get it promoted, but haven't quite gotten around to it yet...

--

___
Python tracker 

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



[issue20148] Derby: Convert the _sre module to use Argument Clinic

2015-05-03 Thread Larry Hastings

Larry Hastings added the comment:

Oh, this is only happening on the *beta* compiler?  In that case, I genuinely 
suggest you file a bug.

We can still check in the workaround, but I really do think MSVS's behavior is 
wrong here.  (Why is it only for forward static declarations of arrays of 
unspecified size?)

--

___
Python tracker 

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



[issue24051] Argument Clinic no longer works with single optional argument

2015-05-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Then it would be better to not convert wantobjects() to Argument Clinic. Using 
-1 as a value for not passed argument is a hack (added in 1ab9978123be) and I 
don't want to propagate it to the signature.

But I afraid that there are other functions that suffer from this bug (may be 
in the curses module).

--
status: open -> languishing

___
Python tracker 

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



[issue24051] Argument Clinic no longer works with single optional argument

2015-05-03 Thread Larry Hastings

Larry Hastings added the comment:

If the argument currently uses a default value of -1, then I see no problem 
with converting it to Argument Clinic using a default value of -1.  If you 
claim it's a "hack" then you should discuss that with the author of 
1ab9978123be.

--

___
Python tracker 

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



[issue24051] Argument Clinic no longer works with single optional argument

2015-05-03 Thread Larry Hastings

Larry Hastings added the comment:

Closing as wontfix.  This is not a supported use of optional groups.

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

___
Python tracker 

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



[issue20148] Derby: Convert the _sre module to use Argument Clinic

2015-05-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Then the patch LGTM. It is easier to make these changes by hand than make a 
review for moved code on Rietveld.

I'm not sure, but may be forward static declarations of arrays of unspecified 
size is C99-ism?

--

___
Python tracker 

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



[issue20148] Derby: Convert the _sre module to use Argument Clinic

2015-05-03 Thread Steve Dower

Steve Dower added the comment:

It fails on VC10, 11, 12 and 14, so I doubt it's going to be changed. That 
said, it looks like the non-static forward definition may be some sort of 
extension, since it causes a redefinition error (mismatched storage class) on 
all versions when using /Za to disable extensions.

It could be a C99 feature ("tentative definitions" I think), as Serhiy 
suggests, but if so then it's very likely not going to be added between the RC 
(released last week) and final versions of the compiler.

--

___
Python tracker 

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



[issue20148] Derby: Convert the _sre module to use Argument Clinic

2015-05-03 Thread Steve Dower

Steve Dower added the comment:

According to 
http://compgroups.net/comp.std.c/why-does-the-standard-prohibit-static-int-a/2569729,
 it's invalid in both C89 and C99, but some compilers accept it as an extension.

IMO we should avoid relying on compiler extensions, at least in the code files 
that are supposed to be portable.

--

___
Python tracker 

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



[issue20148] Derby: Convert the _sre module to use Argument Clinic

2015-05-03 Thread Larry Hastings

Larry Hastings added the comment:

I agree.  I looked it up in the C99 standard.  6.9.2.2 says:

"If the declaration of an identifier for an object is a tentative definition 
and has internal linkage, the declared type shall not be an incomplete type."

And if you'd hurry up and bless my patch for Modules/_tkinter.c in bug #20168, 
I'd check this fix in ;-)

--

___
Python tracker 

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



[issue20148] Derby: Convert the _sre module to use Argument Clinic

2015-05-03 Thread Larry Hastings

Larry Hastings added the comment:

(sorry, 6.9.2.3)

--

___
Python tracker 

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



[issue20179] Derby #10: Convert 50 sites to Argument Clinic across 4 files

2015-05-03 Thread Larry Hastings

Larry Hastings added the comment:

We discussed it in IRC a bit (and I got a little education).  I can propose 
three remedies:

A) back out the Clinic conversion in _ssl.c
B) support Clinic in 2.7 just for _ssl.c
C) do a one-time backport of the Clinic generated code for _ssl.c

IMO these are in my reverse order of preference; I'd prefer C, then B, then A.  
But I'm not supporting _ssl.c, you guys are.  And I want you maintainers to be 
happy.  So I'll abide by / help you in implementing whatever you prefer.

FWIW, option C would mean doing an otherwise-inert backport of the current 
_ssl.c from trunk to 2.7, so that we could also backport (by hand) 
Modules/clinic/_ssl.c.  Then, if in the future, when you change _ssl.c you 
still copy that file over and tweak it.  But: if you change the arguments to a 
function, you'd have to *hand-edit* Modules/clinic/_ssl.c to match.

--

___
Python tracker 

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



[issue20179] Derby #10: Convert 50 sites to Argument Clinic across 4 files

2015-05-03 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Le 03/05/2015 23:06, Larry Hastings a écrit :
> 
> Larry Hastings added the comment:
> 
> We discussed it in IRC a bit (and I got a little education).

Can we have a transcript somewhere?

--

___
Python tracker 

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



[issue20179] Derby #10: Convert 50 sites to Argument Clinic across 4 files

2015-05-03 Thread Larry Hastings

Larry Hastings added the comment:

Attached.  Glad you asked right away, it would have been a lot harder to get 
later!

--
Added file: 
http://bugs.python.org/file39283/irc.transcript.of._ssl.clinic.discussion.txt

___
Python tracker 

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



[issue20179] Derby #10: Convert 50 sites to Argument Clinic across 4 files

2015-05-03 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Thank you!

--

___
Python tracker 

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



[issue24113] shlex constructor unreachable code

2015-05-03 Thread Andrew Barnert

Andrew Barnert added the comment:

Presumably ESR thought that information was useful enough to send Guido a patch 
to add it. But apparently nobody's missed it in the 15 years it's been checked 
in but unreachable. If anyone needed to know the `instream` and `lineno` right 
after initialization, presumably they just printed them directly. So, yeah, 
seems unnecessary to me.

--
nosy: +abarnert

___
Python tracker 

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



[issue20168] Derby: Convert the _tkinter module to use Argument Clinic

2015-05-03 Thread Steve Dower

Steve Dower added the comment:

LGTM

--

___
Python tracker 

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



[issue20148] Derby: Convert the _sre module to use Argument Clinic

2015-05-03 Thread Steve Dower

Steve Dower added the comment:

Sorry, wasn't watching the other issue. :)

--

___
Python tracker 

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



[issue20168] Derby: Convert the _tkinter module to use Argument Clinic

2015-05-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7a76c462c7f6 by Larry Hastings in branch 'default':
Fix Windows build breakage from checkins on Issues #20148 and #20168.
https://hg.python.org/cpython/rev/7a76c462c7f6

--

___
Python tracker 

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



[issue20148] Derby: Convert the _sre module to use Argument Clinic

2015-05-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7a76c462c7f6 by Larry Hastings in branch 'default':
Fix Windows build breakage from checkins on Issues #20148 and #20168.
https://hg.python.org/cpython/rev/7a76c462c7f6

--

___
Python tracker 

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



[issue20148] Derby: Convert the _sre module to use Argument Clinic

2015-05-03 Thread Larry Hastings

Larry Hastings added the comment:

Steve, please close this issue when you've confirmed it's now building 
correctly on Windows.

--

___
Python tracker 

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



[issue20168] Derby: Convert the _tkinter module to use Argument Clinic

2015-05-03 Thread Larry Hastings

Larry Hastings added the comment:

Steve, please close this issue when you've confirmed it's now building 
correctly on Windows.

--

___
Python tracker 

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



[issue24123] Python 2.7 Tutorial Conflicting behavior with WeakValueDictionary.

2015-05-03 Thread Jesse Bacon

New submission from Jesse Bacon:

https://docs.python.org/2/tutorial/stdlib2.html
Section 11.6. Weak References

The example code below from the python tutorial suggests that the value of a is 
no persistent when cast into a WeakValueDictionary as entry 'primary'

The value persisted in the dictionary aver 'a' was deleted and garbage 
collection had been called.  I did not see a bug report for this already 
forgive me if there was one already put in.  

import weakref, gc
class A:
def __init__(self, value):
self.value = value
def __repr__(self):
return str(self.value)

a = A(10)   # create a reference
d = weakref.WeakValueDictionary()
d['primary'] = a# does not create a reference
d['primary']# fetch the object if it is still alive

del a   # remove the one reference
gc.collect()# run garbage collection right away

d['primary']# entry was automatically removed

--
components: Demos and Tools
messages: 242534
nosy: jessembacon
priority: normal
severity: normal
status: open
title: Python 2.7 Tutorial Conflicting behavior  with WeakValueDictionary.
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue24123] Python 2.7 Tutorial Conflicting behavior with WeakValueDictionary.

2015-05-03 Thread Jesse Bacon

Jesse Bacon added the comment:

https://docs.python.org/2/tutorial/stdlib2.html
Section 11.6. Weak References

The example code below from the python tutorial suggests that the value of 'a' 
is not persistent when cast into a WeakValueDictionary as entry 'primary'

The value persisted in the dictionary aver 'a' was deleted and garbage 
collection had been called.  I did not see a bug report for this already 
forgive me if there was one already put in.  

import weakref, gc
class A:
def __init__(self, value):
self.value = value
def __repr__(self):
return str(self.value)

a = A(10)   # create a reference
d = weakref.WeakValueDictionary()
d['primary'] = a# does not create a reference
d['primary']# fetch the object if it is still alive

del a   # remove the one reference
gc.collect()# run garbage collection right away

d['primary']# entry was automatically removed

--

___
Python tracker 

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



[issue24123] Python 2.7 Tutorial Conflicting behavior with WeakValueDictionary.

2015-05-03 Thread Jesse Bacon

Jesse Bacon added the comment:

https://docs.python.org/2/tutorial/stdlib2.html
Section 11.6. Weak References

The example code below from the python tutorial suggests that the value of 'a' 
is not persistent when cast into a WeakValueDictionary as entry 'primary'

The value persisted in the dictionary after 'a' was deleted and garbage 
collection had been called.  I did not see a bug report for this already 
forgive me if there was one already put in.  

import weakref, gc
class A:
def __init__(self, value):
self.value = value
def __repr__(self):
return str(self.value)

a = A(10)   # create a reference
d = weakref.WeakValueDictionary()
d['primary'] = a# does not create a reference
d['primary']# fetch the object if it is still alive

del a   # remove the one reference
gc.collect()# run garbage collection right away

d['primary']# entry was automatically removed

--

___
Python tracker 

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



[issue24121] collections page doesn't mention that deques are mutable

2015-05-03 Thread Raymond Hettinger

New submission from Raymond Hettinger:

Mutability is conferred by the presence of mutating methods.  Deques are 
documented to have append, pop, extend, appendleft, popleft, extendleft, and 
rotate.   Also the examples all show mutations.

--
nosy: +rhettinger
resolution:  -> not a bug
status: open -> closed

___
Python tracker 

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



[issue21800] Implement RFC 6855 (IMAP Support for UTF-8) in imaplib.

2015-05-03 Thread R. David Murray

R. David Murray added the comment:

Here is an updated patch based on Milan's work, including docs.  I've tweaked 
the API slightly: no dedicated method for doing the enable (instead it is 
inlined in authenticate), I added 'enable' to the exposed API (with a doc 
caveat about not using it for UTF8=ACCEPT), added None as a valid value for 
enable_UTF8 with the meaning "enable if possible" (True is now "must enable"), 
and exposed a utf8_enabled attribute so the program can easily tell what mode 
to use when specifying enable_UTF8=None.  Someday, None should become the 
default.  "None" is not the best choice for value, especially when it is not 
the default, so perhaps someone could suggest better values for that keyword.

It would be great if Milan or Maciej could give me a review (or anyone else who 
feels like it).  I want to get this in before the beta deadline.

--
nosy: +eric.smith, maciej.szulik
stage: needs patch -> patch review
Added file: http://bugs.python.org/file39284/imaplib_utf8_issue21800.patch

___
Python tracker 

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



[issue24123] Python 2.7 Tutorial Conflicting behavior with WeakValueDictionary.

2015-05-03 Thread R. David Murray

R. David Murray added the comment:

If I run the example code you pasted using 2.7, I get a KeyError.  So the 
example looks correct to me.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue24123] Python 2.7 Tutorial Conflicting behavior with WeakValueDictionary.

2015-05-03 Thread Jesse Bacon

Jesse Bacon added the comment:

Thank you for the second eyes. 
I just verified that it works using the standard python shell.  It looks like 
the bug is in IPython.  I’ll post it there.

In [7]: class A:
   ...: def __init__(self, value):
   ...: self.value = value
   ...: def __repr__(self):
   ...: return str(self.value)
   ...: 

In [8]: a = A(10)

In [9]: d = weakref.WeakValueDictionary()

In [10]: d['primary'] = a

In [11]: d['primary'] 
Out[11]: 10

In [12]: del a

In [13]: gc.collect()
Out[13]: 148

In [14]: d['primary']
Out[14]: 10

In [15]: 

sincerely,

Jesse Bacon

> On May 3, 2015, at 8:54 PM, R. David Murray  wrote:
> 
> 
> R. David Murray added the comment:
> 
> If I run the example code you pasted using 2.7, I get a KeyError.  So the 
> example looks correct to me.
> 
> --
> nosy: +r.david.murray
> 
> ___
> Python tracker 
> 
> ___

--
title: Python 2.7 Tutorial Conflicting behavior  with WeakValueDictionary. -> 
Python 2.7 Tutorial Conflicting behavior with WeakValueDictionary.

___
Python tracker 

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



  1   2   >