[issue22401] argparse: 'resolve' conflict handler damages the actions of the parent parser

2014-09-18 Thread paul j3

Changes by paul j3 ajipa...@gmail.com:


Added file: http://bugs.python.org/file36648/sample3.py

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



[issue22401] argparse: 'resolve' conflict handler damages the actions of the parent parser

2014-09-18 Thread paul j3

Changes by paul j3 ajipa...@gmail.com:


Removed file: http://bugs.python.org/file36635/sample3.py

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



[issue22430] Build failure if configure flags --prefix or --exec-prefix is set

2014-09-18 Thread diff 812

diff 812 added the comment:

Found problem.
After generating Makefile if comment string, contain LD_CONFIG_PATH all build 
success.
Operating system Gentooo, python version 2.7.8 from ebuild and downloaded from 
origin site.

# gcc -v
Using built-in specs.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.3/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.8.3/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.8.3/work/gcc-4.8.3/configure 
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr 
--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.3 
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/include 
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.3 
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.3/man 
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.3/info 
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/include/g++-v4 
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.8.3/python 
--enable-languages=c,c++ --enable-obsolete --enable-secureplt --disable-werror 
--with-system-zlib --enable-nls --without-included-gettext 
--enable-checking=release --with-bugurl=https://bugs.gentoo.org/ 
--with-pkgversion='Gentoo 4.8.3 p1.1, pie-0.5.9' --enable-libstdcxx-time 
--enable-shared --enable-threads=posix --enable-__cxa_atexit 
--enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64 
--disable-altivec
  --disable-fixed-point --enable-targets=all --disable-libgcj --disable-libgomp 
--disable-libmudflap --disable-libssp --disable-libquadmath --enable-lto 
--without-cloog
Thread model: posix
gcc version 4.8.3 (Gentoo 4.8.3 p1.1, pie-0.5.9)

# emerge --info
Portage 2.2.8-r1 (default/linux/amd64/13.0, gcc-4.8.3, glibc-2.19-r1, 3.16.0 
x86_64)
=
System uname: 
Linux-3.16.0-x86_64-Intel-R-_Core-TM-_i5-4200M_CPU_@_2.50GHz-with-gentoo-2.2
KiB Mem: 7851264 total,   5629620 free
KiB Swap:   1424 total,   9632404 free
Timestamp of tree: Tue, 16 Sep 2014 07:15:01 +
ld GNU ld (Gentoo 2.23.2 p1.0) 2.23.2
ccache version 3.1.9 [disabled]
app-shells/bash:  4.2_p45
dev-java/java-config: 2.2.0
dev-lang/python:  2.7.8, 3.3.5-r1
dev-util/ccache:  3.1.9-r3
dev-util/cmake:   2.8.12.2-r1
dev-util/pkgconfig:   0.28-r1
sys-apps/baselayout:  2.2
sys-apps/openrc:  0.12.4
sys-apps/sandbox: 2.6-r1
sys-devel/autoconf:   2.13, 2.69
sys-devel/automake:   1.11.6, 1.13.4
sys-devel/binutils:   2.23.2
sys-devel/gcc:4.6.4, 4.7.3-r1, 4.8.3
sys-devel/gcc-config: 1.7.3
sys-devel/libtool:2.4.2-r1
sys-devel/make:   4.0-r1
sys-kernel/linux-headers: 3.13 (virtual/os-headers)
sys-libs/glibc:   2.19-r1
Repositories: gentoo qt local
ACCEPT_KEYWORDS=amd64
ACCEPT_LICENSE=*
CBUILD=x86_64-pc-linux-gnu
CFLAGS=-march=core-avx-i -msse4.2 -msse4.1 -maes -O2 -pipe
CHOST=x86_64-pc-linux-gnu
CONFIG_PROTECT=/etc /usr/share/gnupg/qualified.txt /var/lib/hsqldb
CONFIG_PROTECT_MASK=/etc/ca-certificates.conf /etc/dconf /etc/env.d 
/etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild 
/etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d 
/etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c
CXXFLAGS=-march=core-avx-i -msse4.2 -msse4.1 -maes -O2 -pipe
DISTDIR=/usr/portage/distfiles
EMERGE_DEFAULT_OPTS=--jobs 4 --load-average 8
FCFLAGS=-O2 -pipe
FEATURES=assume-digests binpkg-logs buildpkg config-protect-if-modified 
distlocks ebuild-locks fixlafiles merge-sync metadata-transfer news 
parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms 
strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv 
usersandbox usersync
FFLAGS=-O2 -pipe
GENTOO_MIRRORS=http://gentoo.kiev.ua/ftp/ http://portage.org.ua/ 
ftp://ftp.free.fr/mirrors/ftp.gentoo.org/;
LANG=en_US.utf8
LDFLAGS=-Wl,-O1 -Wl,--as-needed
MAKEOPTS=-j4
PKGDIR=/usr/portage/packages
PORTAGE_CONFIGROOT=/
PORTAGE_RSYNC_OPTS=--recursive --links --safe-links --perms --times 
--omit-dir-times --compress --force --whole-file --delete --stats 
--human-readable --timeout=180 --exclude=/distfiles --exclude=/local 
--exclude=/packages
PORTAGE_TMPDIR=/var/tmp
PORTDIR=/usr/portage
PORTDIR_OVERLAY=/usr/local/portage/qt /usr/local/portage/local
SYNC=rsync://rsync1.ua.gentoo.org/gentoo-portage
USE=X a52 aac acl acpi alsa amd64 berkdb bluetooth bzip2 cairo cdr chm cli 
cracklib crypt css cxx djvu dri dvb dvi freetype gd gdbm gif glibc-omitfp 
gnutls gpm gstreamer gtk iconv icu ipv6 jabber jpeg lame lm_sensors maildir mmx 
modules mp3 mp4 mplayer mtp multilib ncurses nfsv3 nls nptl ogg opengl pam pcre 
readline session slang sse sse2 ssl ssse3 tcpd theora tiff udev unicode v4l 
v4l2 vaapi wifi wimax win32codecs x264 xcomposite xinerama xv xvid zlib 
ABI_X86=64 ALSA_CARDS=hda-intel APACHE2_MODULES=authn_core authz_core 
socache_shmcb unixd actions alias auth_basic authn_alias 

[issue19380] Optimize parsing of regular expressions

2014-09-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Actually if x: is slightly faster than if x is not None: on current 
implementation.

--
Added file: http://bugs.python.org/file36649/re_parse_3.patch

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



[issue22410] Locale dependent regexps on different locales

2014-09-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Yes, it is possible to build full property table for bytes regexps at regexp 
compile time. But it is impossible for unicode regexps (issue22407). And in any 
case this doesn't solve original problem: re.match(pattern, string, re.L|re.I) 
can return unexpected result if the same pattern already was used with 
different locale.

--

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



[issue22415] Fix re debugging output

2014-09-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

If there are no objections I'll commit the patch soon.

--
assignee:  - serhiy.storchaka

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



[issue22434] Use named constants internally in the re module

2014-09-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

If there are no objections I'll commit the patch soon.

--
assignee:  - serhiy.storchaka

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



[issue22362] Warn about octal escapes 0o377 in re

2014-09-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Warning or exception? This is a question.

--
assignee:  - serhiy.storchaka

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



[issue20678] re does not allow back references in {} matching operator

2014-09-18 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
resolution:  - not a bug
stage:  - resolved
status: open - closed

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



[issue1519638] Unmatched Group issue - workaround

2014-09-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch which make unmatched groups to be replaced by empty string. 
These changes looks rather as new feature than bug fix and therefore can be 
applied only to 3.5.

--
components: +Library (Lib)
keywords: +patch
nosy: +serhiy.storchaka
stage:  - patch review
type:  - enhancement
versions: +Python 3.5 -Python 2.6, Python 2.7
Added file: http://bugs.python.org/file36650/re_sub_unmatched_group.patch

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



[issue22410] Locale dependent regexps on different locales

2014-09-18 Thread Matthew Barnett

Matthew Barnett added the comment:

When you lookup the pattern in the cache, include the current locale as part of 
the key if the pattern is locale-sensitive (you can let it be None if the 
pattern is not locale-sensitive).

--

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



[issue22362] Warn about octal escapes 0o377 in re

2014-09-18 Thread STINNER Victor

STINNER Victor added the comment:

 Warning or exception? This is a question.

Using -Werror, warnings raise exceptions :-)

--

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



[issue22382] sqlite3 connection built from apsw connection should raise IntegrityError, not DatabaseError

2014-09-18 Thread william tonkin

Changes by william tonkin wmton...@gmail.com:


--
nosy: +ghaering

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



[issue22362] Warn about octal escapes 0o377 in re

2014-09-18 Thread Antoine Pitrou

Antoine Pitrou added the comment:

This is an error, so it should really be an exception. There's no use case for 
being lenient, IMO.

--

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



[issue22435] socketserver.TCPSocket leaks socket to garbage collector if server_bind() fails

2014-09-18 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +neologix

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



[issue19380] Optimize parsing of regular expressions

2014-09-18 Thread Antoine Pitrou

Antoine Pitrou added the comment:

is not None is more readable, though. When using plain boolean testing, it's 
never obvious whether you can have a zero-length string, a null number, etc.

--

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



[issue16827] Remove the relatively advanced content from section 2 in tutorial

2014-09-18 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2e3a81a0fa14 by Senthil Kumaran in branch '2.7':
Issue #16827: Make Interpreter introduction section of the tutorial more
https://hg.python.org/cpython/rev/2e3a81a0fa14

New changeset 1e81c7a261a7 by Senthil Kumaran in branch '3.4':
Issue #16827: Make Interpreter introduction section of the tutorial more
https://hg.python.org/cpython/rev/1e81c7a261a7

New changeset ea401e7c55e4 by Senthil Kumaran in branch 'default':
merge from 3.4
https://hg.python.org/cpython/rev/ea401e7c55e4

--
nosy: +python-dev

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



[issue16827] Remove the relatively advanced content from section 2 in tutorial

2014-09-18 Thread Senthil Kumaran

Senthil Kumaran added the comment:

I addressed Berker Peksag's review comments on Jame's patch, tested the local 
building of docs, verified the content and looks.

Committed this in 2.7, 3.4 and 3.5.

Thank you all!

--
assignee: docs@python - orsenthil
resolution:  - fixed
stage: patch review - resolved
status: open - closed

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



[issue22410] Locale dependent regexps on different locales

2014-09-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch which implements Matthew's suggestion. It significant slow down 
the use of locale-sensitive regular expressions, there is a possibility for 
race condition between compiling and matching, and it doesn't solve the issue 
for explicitly cached expressions. Also I prefer that matching depends on 
locale at the time of matching, not at the time of compiling.

This patch can be considered as nonperfect solution for 3.4 and 2.7. But for 
3.5 I'll try to implement better solution.

Microbenchmark:
$ ./python -m timeit -s 'import re' -- 're.match(br\w+, babc, re.L)'

Before patch: 10 loops, best of 3: 10.4 usec per loop

After patch: 1 loops, best of 3: 37.5 usec per loop

--
keywords: +patch
stage:  - patch review
Added file: http://bugs.python.org/file36651/re_locale_caching.patch

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



[issue22410] Locale dependent regexps on different locales

2014-09-18 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Rather than introduce a perf regression in 2.7 and 3.4, I would suggest to 
simply fix the issue in 3.5.

--

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



[issue22410] Locale dependent regexps on different locales

2014-09-18 Thread Matthew Barnett

Matthew Barnett added the comment:

@Serhiy: You're overlooking that the LOCALE flag could be inline, e.g. 
r'(?L)\w+'.

Basically, if you've seen the pattern before, you know whether it has an inline 
LOCALE flag; if you haven't seen the pattern before, you'll need to parse it 
anyway, and then you'll discover whether it has an inline LOCALE flag.

--

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



[issue22436] logging geteffectivelevel does not document its return value

2014-09-18 Thread R. David Murray

New submission from R. David Murray:

https://docs.python.org/3/library/logging.html#logging.Logger.getEffectiveLevel

This says the logging level is returned, but it doesn't mention that what is 
returned is an integer, nor does it link to whatever method is needed to 
convert the integer return value into the symbolic name that the user has been 
using elsewhere in interacting with logging.  Indeed, the section that shows 
the mapping between names and numbers implies that the user of the library 
never needs to worry about the numbers unless they are creating a new level, 
but if they want to use getEffectiveLevel, this is not true.

--
assignee: docs@python
components: Documentation
messages: 227047
nosy: docs@python, r.david.murray, vinay.sajip
priority: normal
severity: normal
status: open
title: logging geteffectivelevel does not document its return value
type: behavior
versions: Python 2.7, Python 3.4, Python 3.5

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



[issue22278] urljoin duplicate slashes

2014-09-18 Thread Demian Brecht

Demian Brecht added the comment:

Antoine: On (finally) getting back to this and re-reading your test case, the 
current behaviour is incorrect and is corrected by the patch. I've added a few 
more test cases to ensure trailing slashes are handled correctly.

--
Added file: http://bugs.python.org/file36652/issue22278_2.patch

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



[issue22434] Use named constants internally in the re module

2014-09-18 Thread Guido van Rossum

Guido van Rossum added the comment:

Hm. Could you not use the new Enum class?

--

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



[issue22410] Locale dependent regexps on different locales

2014-09-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Good catch Matthew!

After fixing this and yet one bug (LC_CTYPE should be used instead of LC_ALL), 
and adding more optimizations, the performance is increased. Now the result of 
above microbenchmark is 18.5 usec per loop.

--
Added file: http://bugs.python.org/file36653/re_locale_caching2.patch

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



[issue22434] Use named constants internally in the re module

2014-09-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Answering Guido's question about the Enum class. No, it is not appropriate 
here. It has too cumbersome repr (OPCODES.IN_IGNORE: 16 instead of 
IN_IGNORE). Enum function syntax can't by used because it enumerates values 
from 1. We need three Enum subclasses for three groups of constants, and fourth 
class for MAXREPEAT, and fifth base abstract class. To fit the Enum class to 
our need we need more boilerplate code than to implement minimal needed 
functionality from scratch. And I'm not sure that this will not create circular 
dependency.

--

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



[issue22410] Locale dependent regexps on different locales

2014-09-18 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


Removed file: http://bugs.python.org/file36651/re_locale_caching.patch

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



[issue22436] logging geteffectivelevel does not document its return value

2014-09-18 Thread Vinay Sajip

Vinay Sajip added the comment:

Users generally use integer values when specifying logging levels, unless they 
are e.g. using the configuration machinery, when they will specify strings 
(just because the configuration is in text files).

I will update the documentation to try to make things clearer.

--

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



[issue19380] Optimize parsing of regular expressions

2014-09-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Well, then please look at re_parse_2.patch (it is still applied cleanly).

--

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



[issue22436] logging geteffectivelevel does not document its return value

2014-09-18 Thread Roundup Robot

Roundup Robot added the comment:

New changeset dd17c3eda73c by Vinay Sajip in branch '2.7':
Issue #22436: Improved documentation for getEffectiveLevel() and getLevelName().
https://hg.python.org/cpython/rev/dd17c3eda73c

New changeset 72a91df86b07 by Vinay Sajip in branch '3.4':
Issue #22436: Improved documentation for getEffectiveLevel() and getLevelName().
https://hg.python.org/cpython/rev/72a91df86b07

New changeset 49dfe2630ae3 by Vinay Sajip in branch 'default':
Closes #22436: Merged documentation update from 3.4.
https://hg.python.org/cpython/rev/49dfe2630ae3

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

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



[issue22437] re module: number of named groups is limited to 100 max

2014-09-18 Thread Yury Selivanov

New submission from Yury Selivanov:

While writing a lexer for javascript language, I managed to hit the limit of 
named groups in one regexp, it's 100.  The check is in sre_compile.py:compile() 
function, and there is even an XXX comment on this.

Unfortunately, I'm not an expert in this module, so I'm not sure if this check 
can be lifted, or at least if the number can be bumped to 200 or 500 (why is 
100 btw?)

Please share your thoughts.

--
components: Library (Lib), Regular Expressions
messages: 227055
nosy: ezio.melotti, haypo, mrabarnett, pitrou, serhiy.storchaka, yselivanov
priority: normal
severity: normal
status: open
title: re module: number of named groups is limited to 100 max
type: enhancement

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



[issue22436] logging geteffectivelevel does not document its return value

2014-09-18 Thread R. David Murray

R. David Murray added the comment:

Ah, yes, I was just being dense, because the context I was in was exactly that 
context: configuration via strings.  Probably no change is required, but if can 
think of way of making it obvious to someone thinking crooked like I was that 
would be great.

--

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



[issue22436] logging geteffectivelevel does not document its return value

2014-09-18 Thread R. David Murray

R. David Murray added the comment:

Woops, should have looked at the rest of my email.  Yes, that change looks 
great.

--

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



[issue22437] re module: number of named groups is limited to 100 max

2014-09-18 Thread R. David Murray

R. David Murray added the comment:

It is 100 to avoid a syntactic ambiguity between numbered groups and octal 
numbers, if I remember correctly.  I can't remember if that constraint still 
applies in python3, where the octal notation was made more strict in general.

--
nosy: +r.david.murray

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



[issue22427] TemporaryDirectory attempts to clean up twice

2014-09-18 Thread Jakub Wilk

Changes by Jakub Wilk jw...@jwilk.net:


--
nosy: +jwilk

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



[issue22417] PEP 476: verify HTTPS certificates by default

2014-09-18 Thread Jakub Wilk

Changes by Jakub Wilk jw...@jwilk.net:


--
nosy: +jwilk

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



[issue22434] Use named constants internally in the re module

2014-09-18 Thread Guido van Rossum

Guido van Rossum added the comment:

I think you are too casual in rejecting a standard approach over a custom
clever hack. Making the values enums gives them a standard interface that
goes beyond what you implemented, and just the fact that we can say these
are IntEnum instances specifies a lot more of the semantics than pointing
to your class hack.

 It's easy to make a subclass of IntEnum that overrides __repr__ and
__str__. It's also easy enough to override the constructor to make the
values start at 0 (though it would be a nice feature if we could add a
keyword arg to the EnumMeta.__call__() definition to override the start
position). I don't really care that this is more code.

I don't see where there would be a circular dependency; the enum module
doesn't import the re module.

There is one thing that might be less convenient: defining an enum doesn't
automatically make the values globals. But wouldn't the code be better if
the values weren't globals?

Finally. You objected to adding __all__ in the code review. That too,
suggests a somewhat casual attitude. This code may be maintained by your
grandchildren. Give them something future-proof, please.

On Thu, Sep 18, 2014 at 9:14 AM, Serhiy Storchaka rep...@bugs.python.org
wrote:


 Serhiy Storchaka added the comment:

 Answering Guido's question about the Enum class. No, it is not appropriate
 here. It has too cumbersome repr (OPCODES.IN_IGNORE: 16 instead of
 IN_IGNORE). Enum function syntax can't by used because it enumerates values
 from 1. We need three Enum subclasses for three groups of constants, and
 fourth class for MAXREPEAT, and fifth base abstract class. To fit the Enum
 class to our need we need more boilerplate code than to implement minimal
 needed functionality from scratch. And I'm not sure that this will not
 create circular dependency.

 --

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue22434
 ___


--

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



[issue22437] re module: number of named groups is limited to 100 max

2014-09-18 Thread Matthew Barnett

Matthew Barnett added the comment:

In the regex module, I borrowed the \g... escape from .sub's replacement 
string to provide an alternative way to refer to a group in a pattern, and that 
let me remove the limit.

--

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



[issue21308] PEP 466: backport ssl changes

2014-09-18 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

Note that this change broke eventlet: 
https://github.com/eventlet/eventlet/issues/135

--
nosy: +barry

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



[issue22430] Build failure if configure flags --prefix or --exec-prefix is set

2014-09-18 Thread Ned Deily

Ned Deily added the comment:

Sorry, I don't see where you have shown exactly what Python ./configure and 
make commands you are using and it is not at all obvious to me what you mean by 
After generating Makefile if comment string, contain LD_CONFIG_PATH all build 
success.  But, if it is the case that you are using Gentoo tools to build 
(python version 2.7.8 from ebuild) then perhaps you should be asking on a 
Gentoo forum as we have no control or specific knowledge of how Gentoo packages 
things.  If you can show exactly how a Python build fails using an unpacked 
Python source package, the Python's ./configure and make, then we can 
investigate.  In other words, we would need to see the exact sequence of the 
exact commands you use.  There are just too many variables to try to guess what 
you might be seeing (other than my original speculation about Issue21166).  Did 
you try the recommendations above in msg227011?

--

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



[issue22437] re module: number of named groups is limited to 100 max

2014-09-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

There is two reasons for this limitation. First reason is mentioned by David. 
There is no syntax to backreference a group with number  99 (but there is a 
syntax for conditional groups and for substitutions). Second reason is that 
current implementation of regexp engine uses an array of constant size for 
groups.

Here is a patch which increases static limit to 1000 groups. It also allows to 
specify arbitrary group number in form of (?P=number). This is conformed to 
the syntax of conditional groups and for substitutions.

--
keywords: +patch
Added file: http://bugs.python.org/file36654/re_maxgroups.patch

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



[issue22437] re module: number of named groups is limited to 100 max

2014-09-18 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
assignee:  - serhiy.storchaka
stage:  - patch review
versions: +Python 3.5

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



[issue22437] re module: number of named groups is limited to 100 max

2014-09-18 Thread Yury Selivanov

Yury Selivanov added the comment:

Serhiy,

This is awesome!

Is is possible to split the patch in two, and commit the one that just 
increases the groups limit to 3.4 as well?

Thank you

--

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



[issue22364] Unify error messages of re and regex

2014-09-18 Thread Mark Lawrence

Mark Lawrence added the comment:

How can anything that's in the stdlib be unified with something that's not in 
the stdlib and currently has no prospects of getting in the stdlib?

--
nosy: +BreamoreBoy

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



[issue22437] re module: number of named groups is limited to 100 max

2014-09-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This is definitely not a bug fix. May be Matthew will commit it to the regex 
module and then you could use regex instead of re.

--

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



[issue21308] PEP 466: backport ssl changes

2014-09-18 Thread Alex Gaynor

Alex Gaynor added the comment:

Filed http://bugs.python.org/issue22438 to track it.

--

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



[issue22438] eventlet broke by python 2.7.x

2014-09-18 Thread Alex Gaynor

New submission from Alex Gaynor:

https://github.com/eventlet/eventlet/issues/135

--
components: Library (Lib)
messages: 227067
nosy: alex, benjamin.peterson, christian.heimes, dstufft, giampaolo.rodola, 
janssen, pitrou
priority: normal
severity: normal
status: open
title: eventlet broke by python 2.7.x
versions: Python 2.7

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



[issue22438] eventlet broke by python 2.7.x

2014-09-18 Thread Alex Gaynor

Alex Gaynor added the comment:

It looks like something was removed from the `_ssl` module; is that considered 
an implementation detail, or does it need to be added back?

--

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



[issue22438] eventlet broke by python 2.7.x

2014-09-18 Thread Alex Gaynor

Alex Gaynor added the comment:

(It didn't have any direct tests as far as I can tell, which is why I didn't 
catch the regression)

--

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



[issue22438] eventlet broke by python 2.7.x

2014-09-18 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Certainly not an official API anyway. Let eventlet get their stuff straight.

--

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



[issue16007] Improved Error message for failing re expressions

2014-09-18 Thread Mark Lawrence

Mark Lawrence added the comment:

The original try/except that leads to the raise does not exist in the latest 
3.5 code.  I'd be inclined to close this as out of date for compatibility 
reasons if nothing else.

--
nosy: +BreamoreBoy

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



[issue22378] SO_MARK support for Linux

2014-09-18 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ca0aa0d89273 by Charles-François Natali in branch 'default':
Issue #22378: socket module: add SO_MARK.
https://hg.python.org/cpython/rev/ca0aa0d89273

--
nosy: +python-dev

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



[issue22378] SO_MARK support for Linux

2014-09-18 Thread Charles-François Natali

Charles-François Natali added the comment:

Thanks, I committed a simpler version of the patch.

--
resolution:  - fixed
stage: test needed - resolved
status: open - closed

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



[issue22378] SO_MARK support for Linux

2014-09-18 Thread STINNER Victor

STINNER Victor added the comment:

 Patch for python 2.7 and 3.4

Only Python 3.5 accept new features.

--
nosy: +haypo

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



[issue19380] Optimize parsing of regular expressions

2014-09-18 Thread Josh Rosenberg

Changes by Josh Rosenberg shadowranger+pyt...@gmail.com:


--
nosy: +josh.rosenberg

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



[issue22439] subprocess.PIPE.stdin.flush() causes to hang while subprocess.PIPE.stdin.close() not

2014-09-18 Thread Sworddragon

New submission from Sworddragon:

On sending something to stdin of a process that was called with subprocess (for 
example diff) I have figured out that all is working fine if stdin is closed 
but flushing stdin will cause a hang (the same as nothing would be done). In 
the attachments is a testcase that shows this problem. If executed the 
application will hang but if #pipe.stdin.close() will be uncommented (and 
optionally pipe.stdin.flush() commented out) all is working fine.

--
components: Library (Lib)
files: test.py
messages: 227076
nosy: Sworddragon
priority: normal
severity: normal
status: open
title: subprocess.PIPE.stdin.flush() causes to hang while 
subprocess.PIPE.stdin.close() not
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file36655/test.py

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



[issue22366] urllib.request.urlopen shoudl take a context (SSLContext) argument

2014-09-18 Thread Alex Gaynor

Alex Gaynor added the comment:

Just wanted to ping you on this Senthil about committing this.

--

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



[issue22439] subprocess.PIPE.stdin.flush() causes to hang while subprocess.PIPE.stdin.close() not

2014-09-18 Thread R. David Murray

R. David Murray added the comment:

This has nothing to do with subprocess.  If you call a (blocking and unlimited) 
read() on a file, the read will not return until the file is closed.

--
nosy: +r.david.murray
resolution:  - not a bug
stage:  - resolved
status: open - closed

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



[issue22438] eventlet broke by python 2.7.x

2014-09-18 Thread Barry A. Warsaw

Changes by Barry A. Warsaw ba...@python.org:


--
nosy: +barry

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



[issue22438] eventlet broke by python 2.7.x

2014-09-18 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

I tend to agree.  I don't even think it was documented.  I wonder though if it 
makes sense to at least mention this in the PEP and/or release notes for 2.7.9.

--

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



[issue22438] eventlet broke by python 2.7.x

2014-09-18 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
nosy: +Arfrever

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