[issue23203] Aliasing import of sub-{module, package} from the package raises AttributeError on import.

2015-01-08 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +brett.cannon, eric.snow, ezio.melotti, ncoghlan type: -> behavior ___ Python tracker ___ ___ Pyth

[issue23086] Add start and stop parameters to the Sequence.index() ABC mixin method

2015-01-08 Thread Devin Jeanpierre
Devin Jeanpierre added the comment: I take it back, I don't want to copy what the list type does, because it's wrong: http://bugs.python.org/issue23204 -- ___ Python tracker ___

[issue23204] list.index and rest of list methods disagree if a value is in the list if it's mutated during the call

2015-01-08 Thread Devin Jeanpierre
New submission from Devin Jeanpierre: >>> class AppendOnUnequal(object): ... def __init__(self, append_to): ... self.append_to = append_to ... def __eq__(self, other): ... if self is other: ... return True ... self.append_to.append(self) ... ret

[issue23185] add inf and nan to math module

2015-01-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: May be make math.inf and math.nan special objects so that for all x (except inf and nan): x < math.inf x > -math.inf not (x < math.nan) not (x > math.nan) -- ___ Python tracker

[issue23203] Aliasing import of sub-{module, package} from the package raises AttributeError on import.

2015-01-08 Thread Franck Michea
New submission from Franck Michea: Hi, for those of you that prefer to read an example, you can read that commented demonstration of the bug[1]. Today I discovered what I think is a bug in the import system. Here is the basic setup: We have three nested packages: foo -> bar -> baz. The bar pa

[issue23202] pyvenv does not fail like documented when a venv already exists

2015-01-08 Thread Florian Bruhin
New submission from Florian Bruhin: https://docs.python.org/3/library/venv.html says: > If the target directory already exists an error will be raised, unless the > --clear or --upgrade option was provided. However, that doesn't seem to be the case: [florian@ginny ~]$ python --version Python

[issue23184] Unused imports, variables, file in IDLE

2015-01-08 Thread Al Sweigart
Al Sweigart added the comment: I've updated the patch. I've removed the EditorWindow deletion. Importing that and using it as a class variable instead of using an assignment statement wasn't picked up. (Is there a more opaque way to do this import?) I've left the RemoteDebugger.py change in.

[issue23184] Unused imports, variables, file in IDLE

2015-01-08 Thread Al Sweigart
Al Sweigart added the comment: *more transparent, that is. Not opaque. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue16192] ctypes - documentation example

2015-01-08 Thread Brian Thorne
Changes by Brian Thorne : -- nosy: -Thorney, chris.jerdonek, eric.araujo, ezio.melotti, georg.brandl status: open -> closed ___ Python tracker ___ __

[issue23201] Decimal(0)**0 is an error, 0**0 is 1, but Decimal(0) == 0

2015-01-08 Thread Chris Rebert
Chris Rebert added the comment: This behavior seems to be required by the General Decimal Arithmetic Specification (http://speleotrove.com/decimal/daexcep.html ): > The following exceptional conditions can occur: > [...] > Invalid operation > This occurs and signals "invalid-oper

[issue23201] Decimal(0)**0 is an error, 0**0 is 1, but Decimal(0) == 0

2015-01-08 Thread Devin Jeanpierre
Devin Jeanpierre added the comment: Yes, also, it is documented: https://docs.python.org/3/library/decimal.html#decimal.InvalidOperation Still, the status quo is bad. At the very least there should be clear documentation on how Decimal differs in behavior from floats and ints. (Other than the

[issue23201] Decimal(0)**0 is an error, 0**0 is 1, but Decimal(0) == 0

2015-01-08 Thread Josh Rosenberg
Josh Rosenberg added the comment: Intentional, but really hard to justify from a consistency perspective. There appear to be several reasonable arguments to treat it as 1 regardless of the mathematical impurity ( https://www.math.hmc.edu/funfacts/ffiles/10005.3-5.shtml ), and since we clearly

[issue23201] Decimal(0)**0 is an error, 0**0 is 1, but Decimal(0) == 0

2015-01-08 Thread Ezio Melotti
Ezio Melotti added the comment: In the code there is this comment: # 0**0 = NaN (!), x**0 = 1 for nonzero x (including +/-Infinity) and raising the error for this specific case seems intentional. -- nosy: +ezio.melotti, facundobatista, mark.dickinson, rhettinger, skrah versions: -Py

[issue23201] Decimal(0)**0 is an error, 0**0 is 1, but Decimal(0) == 0

2015-01-08 Thread Devin Jeanpierre
Changes by Devin Jeanpierre : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue23201] Decimal(0)**0 is an error, 0**0 is 1, but Decimal(0) == 0

2015-01-08 Thread Devin Jeanpierre
New submission from Devin Jeanpierre: >>> import decimal >>> x = 0 >>> y = float(x) >>> z = decimal.Decimal(x) >>> x == y == z == x True >>> x ** x 1 >>> y**y 1.0 >>> z**z Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.7/decimal.py", line 2216, in __pow__ r

[issue23200] Clarify max_length and flush() for zlib decompression

2015-01-08 Thread Martin Panter
Martin Panter added the comment: The processing of unconsumed_tail in flush() was introduced via Issue 16411. Before that I suspect flush() was assumed to only be called when max_length was not used. The decompress() method changed from Z_NO_FLUSH to Z_SYNC_FLUSH in Feb 2001; see revision 01c

[issue23200] Clarify max_length and flush() for zlib decompression

2015-01-08 Thread Martin Panter
New submission from Martin Panter: This simple patch documents that max_length has to be non-zero. The implementation actually uses zero as a special value to indicate max_length was not specified. Also, I wonder what the point of the Decompressor.flush() method is. Reading the module code an

[issue23025] ssl.RAND_bytes docs should mention os.urandom

2015-01-08 Thread STINNER Victor
STINNER Victor added the comment: To be clear: rand.diff looks good to me, go ahead. -- ___ Python tracker ___ ___ Python-bugs-list ma

[issue22038] Implement atomic operations on non-x86 platforms

2015-01-08 Thread STINNER Victor
STINNER Victor added the comment: atomicv3.patch is wrong for GCC builtin atomic operations: the parenthesis is not closed. I fixed this typo in the commit. Vitor & Gustavo: Thanks for the patch, it's now applied to Python 3.5. I tested it on Fedora 21 (x86_64). I disabled manually HAVE_STD_AT

[issue22038] Implement atomic operations on non-x86 platforms

2015-01-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset fbe87fb071a6 by Victor Stinner in branch 'default': Issue #22038: pyatomic.h now uses stdatomic.h or GCC built-in functions for https://hg.python.org/cpython/rev/fbe87fb071a6 -- nosy: +python-dev ___ Pyth

[issue7676] IDLE shell shouldn't use TABs

2015-01-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: I believe I explained above the logical and technical factors that make the Idle shell inherently different from the console shell in this regard. As the title says, this issue is about not using tabs and not about mixing tabs and spaces. As I already said,

[issue22986] Improved handling of __class__ assignment

2015-01-08 Thread Nathaniel Smith
Nathaniel Smith added the comment: I hereby invoke the one month ping rule! Patch, be pinged! -- ___ Python tracker ___ ___ Python-bug

[issue23197] asyncio: check if a future is cancelled before calling set_result/set_exception

2015-01-08 Thread STINNER Victor
STINNER Victor added the comment: Oh, I forgot that the change in subprocess.py (check if waiter is cancelled before setting its result) is already part of the issue #23197 which comes with an unit test. The changes on the SSL handshake are still needed. -- __

[issue23199] libpython27.a in amd64 release is 32-bit

2015-01-08 Thread Zach Welch
New submission from Zach Welch: I tried to link a program against the libpython27.a provided by the latest 2.7.9 amd64 installer, only to discover that the provided library is a 32-bit version. I had to go through the gendef/dlltool dance in order to produce a useable 64-bit library from the

[issue7676] IDLE shell shouldn't use TABs

2015-01-08 Thread Al Sweigart
Al Sweigart added the comment: There are three pieces of user-specified configuration: (1) the number of spaces for a tab set in IDLE's config, (2) the sys.ps1 value, and (3) the sys.ps2 value. Currently IDLE's shell is ignoring (1) while the editor is not. IDLE's shell is ignoring (3) while

[issue23198] asyncio: refactor StreamReader

2015-01-08 Thread STINNER Victor
New submission from STINNER Victor: Attached patch refactors the asyncio.StreamReader class: - use the value None instead of True or False to wake up the waiter - add a new _wakeup_waiter() method - replace _create_waiter() method with a _wait_for_data() coroutine function The change adds a sub

[issue23197] asyncio: check if a future is cancelled before calling set_result/set_exception

2015-01-08 Thread STINNER Victor
New submission from STINNER Victor: set_result/set_exception methods of an asyncio.Future raise an exception if the future is cancelled. Attached patch adds the check in 3 remaining places. -- components: asyncio files: asyncio.patch keywords: patch messages: 233699 nosy: gvanrossum, h

[issue23086] Add start and stop parameters to the Sequence.index() ABC mixin method

2015-01-08 Thread Devin Jeanpierre
Devin Jeanpierre added the comment: I'm going to add a test case that changes the sequence length during .index(), and just do whatever list does in that case. -- ___ Python tracker ___

[issue22560] Add loop-agnostic SSL implementation to asyncio

2015-01-08 Thread STINNER Victor
STINNER Victor added the comment: For STARTTLS, see also this issue: https://code.google.com/p/tulip/issues/detail?id=79 -- ___ Python tracker ___ ___

[issue22970] Cancelling wait() after notification leaves Condition in an inconsistent state

2015-01-08 Thread STINNER Victor
STINNER Victor added the comment: threading.Condition.wait() implementation is very similar to asyncio.Condition.wait(), and the threading code only call acquire() once, it doesn't loop or ignore exceptions. Does it mean that threading.Condition.wait() has the same issue? --

[issue23086] Add start and stop parameters to the Sequence.index() ABC mixin method

2015-01-08 Thread Josh Rosenberg
Josh Rosenberg added the comment: Note: index returns without the caller having a chance to execute code that would change the sequence length directly. But other threads could change it, as could a custom __eq__ on an object stored in the sequence (or a poorly implemented __getitem__ or __len

[issue22970] Cancelling wait() after notification leaves Condition in an inconsistent state

2015-01-08 Thread STINNER Victor
STINNER Victor added the comment: I don't like the idea of ignoring exceptions (CancelledError). An option may be to store the latest exception and reraise it when the condition is acquired. I'm not sure that it's safe or correct to "retry" to acquire the condition. I don't know what I should

[issue23086] Add start and stop parameters to the Sequence.index() ABC mixin method

2015-01-08 Thread Josh Rosenberg
Josh Rosenberg added the comment: I think it avoids len because the length might change during iteration due to side-effects of other code. Since a shrinking sequence would raise an IndexError anyway when you overran the end, it may as well not assume the length is static and just keep indexin

[issue23185] add inf and nan to math module

2015-01-08 Thread STINNER Victor
STINNER Victor added the comment: Except of my small suggestion on the doc (see the review), math_inf_nan4.patch looks good to me. -- ___ Python tracker ___

[issue23195] Sorting with locale (strxfrm) does not work properly with Python3 on BSD or OS X

2015-01-08 Thread STINNER Victor
STINNER Victor added the comment: > The postresq discussion and some earlier Python issues suggest using ICU to > properly implement Unicode functions like collation across all platforms. In my experience, the locale module is error-prone and not reliable, especially if you want portability. I

[issue23195] Sorting with locale (strxfrm) does not work properly with Python3 on BSD or OS X

2015-01-08 Thread Ned Deily
Changes by Ned Deily : -- title: Sorting with locale (strxfrm) does not work properly with Python3 on Macos -> Sorting with locale (strxfrm) does not work properly with Python3 on BSD or OS X ___ Python tracker _

[issue23195] Sorting with locale (strxfrm) does not work properly with Python3 on Macos

2015-01-08 Thread Ned Deily
Ned Deily added the comment: The initial difference appears to be a long-standing BSD (including OS X) versus GNU/Linux platform difference. See, for example: http://www.postgresql.org/message-id/18c8a481-33a6-4483-8c24-b8ce70db7...@eggerapps.at Why there is no difference between en and fr UTF

[issue23196] Greek letters not sorted properly

2015-01-08 Thread R. David Murray
R. David Murray added the comment: Oops, I meant issue 23195. -- superseder: Greek letters not sorted properly -> Sorting with locale (strxfrm) does not work properly with Python3 on Macos ___ Python tracker _

[issue23196] Greek letters not sorted properly

2015-01-08 Thread R. David Murray
R. David Murray added the comment: This appears to be a duplicate of issue 23196 (the strxfrm issue). -- nosy: +r.david.murray resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Greek letters not sorted properly ___ P

[issue23195] Sorting with locale (strxfrm) does not work properly with Python3 on Macos

2015-01-08 Thread R. David Murray
Changes by R. David Murray : -- nosy: +r.david.murray ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue23195] Sorting with locale (strxfrm) does not work properly with Python3 on Macos

2015-01-08 Thread R. David Murray
Changes by R. David Murray : -- title: Sorting with locale does not work properly with Python3 on Macos -> Sorting with locale (strxfrm) does not work properly with Python3 on Macos ___ Python tracker

[issue23195] Sorting with locale does not work properly with Python3 on Macos

2015-01-08 Thread STINNER Victor
STINNER Victor added the comment: locale.strxfrm() have a different implementation in Python 2 and in Python 3: - Python 2 uses strxfrm(), so works on bytes strings - Python 3 uses wcsxfrm(), so works on multibyte strings ("unicode" strings) It looks like Python 2 and 3 have the same behaviour o

[issue23196] Greek letters not sorted properly

2015-01-08 Thread Pierre Nugues
New submission from Pierre Nugues: Greek letters are not properly sorted when a locale is set. I tested a French and a Greek locales. Here is an output obtained from the Python interactive shell available from the python.org home page: In [22]: a Out[22]: ('Ά', 'Γ', 'Η', 'Κ', 'Ν', 'Ο',

[issue23195] Sorting with locale does not work properly with Python3 on Macos

2015-01-08 Thread Ned Deily
Changes by Ned Deily : -- nosy: +ned.deily ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue23195] Sorting with locale does not work properly with Python3 on Macos

2015-01-08 Thread Pierre Nugues
New submission from Pierre Nugues: The sorted() function does not work properly with macosx. Here is a script to reproduce the issue: import locale locale.setlocale(locale.LC_ALL, "fr_FR.UTF-8") a = ["A", "E", "Z", "a", "e", "é", "z"] sorted(a) sorted(a, key=locale.strxfrm) The execution on Ma

[issue23086] Add start and stop parameters to the Sequence.index() ABC mixin method

2015-01-08 Thread Devin Jeanpierre
Devin Jeanpierre added the comment: Are you sure? I noticed that __iter__ went out of its way to avoid calling len(). -- ___ Python tracker ___ _

[issue23194] Antigravity prints osascript errors in OS X Yosemite

2015-01-08 Thread Ned Deily
Ned Deily added the comment: P.S. See https://discussions.apple.com/thread/4355847?start=0&tstart=0 -- ___ Python tracker ___ ___ Pyth

[issue23194] Antigravity prints osascript errors in OS X Yosemite

2015-01-08 Thread Ned Deily
Ned Deily added the comment: The solution is to either remove or update /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit. -- resolution: -> third party stage: -> resolved status: open -> closed ___ Python tracker

[issue23194] Antigravity prints osascript errors in OS X Yosemite

2015-01-08 Thread Ned Deily
Ned Deily added the comment: My guess is that you have an older 32-bit-only Scripting Addition from Adobe installed. This has nothing to do with Python. -- ___ Python tracker _

[issue23194] Antigravity prints osascript errors in OS X Yosemite

2015-01-08 Thread Ezio Melotti
Ezio Melotti added the comment: Does anything change if you use open/open_new/open_new_tab, and/or use different urls (http and https)? -- nosy: +hynek, ned.deily, ronaldoussoren ___ Python tracker ___

[issue23194] Antigravity prints osascript errors in OS X Yosemite

2015-01-08 Thread Jim Kubicek
Jim Kubicek added the comment: No, the behavior is the same in all cases -- ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue23194] Antigravity prints osascript errors in OS X Yosemite

2015-01-08 Thread Jim Kubicek
Jim Kubicek added the comment: I do. I was just coming back here to post that very thing. -- ___ Python tracker ___ ___ Python-bugs-li

[issue23194] Antigravity prints osascript errors in OS X Yosemite

2015-01-08 Thread Ezio Melotti
Ezio Melotti added the comment: Do you see the same messages if you use the webbrowser module directly? -- components: +Library (Lib) -Extension Modules nosy: +ezio.melotti ___ Python tracker __

[issue23194] Antigravity prints osascript errors in OS X Yosemite

2015-01-08 Thread Jim Kubicek
New submission from Jim Kubicek: Python 3.4.2 (default, Dec 29 2014, 14:03:16) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import antigravity 2015-01-08 10:45:03.771 osascript[47250:12

[issue22411] Embedding Python on Windows

2015-01-08 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +steve.dower, tim.golden, zach.ware ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue22411] Embedding Python on Windows

2015-01-08 Thread Rickard Englund
Rickard Englund added the comment: I have also had this problem. The way I solved it was to undef _DEBUG before including python and then redefine it again: #undef _DEBUG //Prevent linking debug build of python #include #define _DEBUG 1 This is just a hack though and it would be

[issue23187] Segmentation fault, possibly asyncio related

2015-01-08 Thread Rickard Englund
Changes by Rickard Englund : -- nosy: +r-englund ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue23185] add inf and nan to math module

2015-01-08 Thread Mark Dickinson
Mark Dickinson added the comment: New patch, addressing review comments. -- Added file: http://bugs.python.org/file37647/math_inf_nan4.patch ___ Python tracker ___ __

[issue23192] Generator return value ignored in lambda function

2015-01-08 Thread Chris Angelico
Chris Angelico added the comment: I'm not sure what to look for in the code generation. In compile.c lines 3456 and following, there's a LOAD_CONST None coming through, in the else branch of "if (e->v.Yield.value)", but nothing talking about lambda functions. There are constants COMPILER_SCOPE

[issue23193] Please support "numeric_owner" in tarfile

2015-01-08 Thread STINNER Victor
STINNER Victor added the comment: "(...) if there is a chance that this patch goes in I'm happy to write the required test (mocking os.chown()) for this to go in." We don't accept changes without test. So you must write a test. Implementing the feature in Python makes sense. -- nosy:

[issue22919] Update PCBuild for VS 2015

2015-01-08 Thread Steve Dower
Steve Dower added the comment: Just emailed Jeremy about the buildbot. It looks like the last time tests were run something didn't clean up properly and left the build output locked. There's nothing wrong with the project files. -- ___ Python tracke

[issue23119] Remove unicode specialization from set objects

2015-01-08 Thread Ezio Melotti
Ezio Melotti added the comment: Without changesets information (not included in the git format) rietveld will try to apply the patch on default and if it applies clearly it will work, so creating the patch against an up to date py3 clone should work even with the git format. -- _

[issue23119] Remove unicode specialization from set objects

2015-01-08 Thread STINNER Victor
STINNER Victor added the comment: @Raymond: Please disable git format for patches, because Rietveld doesn't support such patch and so we don't get the "review" button. -- nosy: +haypo ___ Python tracker __

[issue23192] Generator return value ignored in lambda function

2015-01-08 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue23192] Generator return value ignored in lambda function

2015-01-08 Thread Guido van Rossum
Guido van Rossum added the comment: Hm, looks like nobody bothered to update the lambda code generation to use the value from yield. I almost feel like there is some unnecessary check "if we are in a lambda" in the code generation for yield. Have you looked through the code generation yet? --

[issue23119] Remove unicode specialization from set objects

2015-01-08 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue23189] Set docstrings to empty string when optimizing with -OO.

2015-01-08 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: That's a backward compatibility break since existing code may be expecting None. At least it needs to be carefully considered, and should have no possibility of be applied to anything before Python 3.5. -- nosy: +barry versions: -Python 2.7, Python

[issue23119] Remove unicode specialization from set objects

2015-01-08 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 08.01.2015 15:46, Serhiy Storchaka wrote: > >> Sets of strings are very common when trying to create a unique set of >> strings or optimizing "name in set_of_names" lookups. > > This is not nearly so common as attributes or globals access, or passing >

[issue23192] Generator return value ignored in lambda function

2015-01-08 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +benjamin.peterson, gvanrossum, serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list ma

[issue22906] PEP 479: Change StopIteration handling inside generators

2015-01-08 Thread Chris Angelico
Chris Angelico added the comment: Okay! I think I have something here. DEFINITELY needs more eyeballs, but all tests pass, including a new one that tests StopIteration leakage both with and without the __future__ directive. Some docs changes have been made (I grepped for 'stopiteration' and 'g

[issue23193] Please support "numeric_owner" in tarfile

2015-01-08 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +lars.gustaebel, serhiy.storchaka stage: -> patch review versions: +Python 3.5 ___ Python tracker ___

[issue23119] Remove unicode specialization from set objects

2015-01-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Sets of strings are very common when trying to create a unique set of strings > or optimizing "name in set_of_names" lookups. This is not nearly so common as attributes or globals access, or passing keyword arguments. -- _

[issue23193] Please support "numeric_owner" in tarfile

2015-01-08 Thread Michael Vogt
New submission from Michael Vogt: Please consider adding a option to extract a tarfile with the uid/gid instead of the lookup for uname/gname in the tarheader (i.e. what tar --numeric-owner provides). One use-case is if you unpack a chroot tarfile that contains a /etc/{passwd,group} file with

[issue23192] Generator return value ignored in lambda function

2015-01-08 Thread Chris Angelico
Changes by Chris Angelico : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue23192] Generator return value ignored in lambda function

2015-01-08 Thread Chris Angelico
New submission from Chris Angelico: As yield is an expression, it's legal in a lambda function, which then means you have a generator function. But it's not quite the same as the equivalent function made with def: $ python3 Python 3.5.0a0 (default:1c51f1650c42+, Dec 29 2014, 02:29:06) [GCC 4.7.2

[issue15955] gzip, bz2, lzma: add option to limit output size

2015-01-08 Thread Martin Panter
Martin Panter added the comment: It turns out that GzipFile.read() etc is also susceptible to decompression bombing. Here is a patch to test and fix that, making use of the existing “max_length” parameter in the “zlib” module. -- Added file: http://bugs.python.org/file37644/gzip-bomb.p

[issue23119] Remove unicode specialization from set objects

2015-01-08 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: I'm not sure I follow: Sets of strings are very common when trying to create a unique set of strings or optimizing "name in set_of_names" lookups. Regarding your benchmark numbers: I have a hard time following how they work. A simply "word in set_of_one_w

[issue23191] fnmatch regex cache use is not threadsafe

2015-01-08 Thread M. Schmitzer
M. Schmitzer added the comment: @serhiy.storchaka: My thoughts exactly, especially regarding the caching being implicit. From the outside, fnmatch really doesn't look like it could have threading issues. The patch also looks exactly like what I had in mind. --

[issue23119] Remove unicode specialization from set objects

2015-01-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: +1 for removing unicode specialization. Dictionaries with string keys is a part of the language, but sets of strings are not special. -- nosy: +serhiy.storchaka ___ Python tracker

[issue23188] Exception chaining should trigger for non-normalised exceptions

2015-01-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: _PyErr_ChainExceptions() was added because exceptions raised in C code are not implicitly chained. The code for explicit chaining is error prone, so it was extracted in separate function. Even with _PyErr_ChainExceptions() chaining exceptions look complex. M

[issue23191] fnmatch regex cache use is not threadsafe

2015-01-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is easy to make fnmatch caching thread safe without locks. Here is a patch. The problem with fnmatch is that the caching is implicit and a user don't know that any lock are needed. So either the need of the lock should be explicitly documented, or fnmatch

[issue23191] fnmatch regex cache use is not threadsafe

2015-01-08 Thread STINNER Victor
STINNER Victor added the comment: It would be nice to fix the issue, but I don't know how it is handled in other stdlib modules. -- ___ Python tracker ___ __

[issue23191] fnmatch regex cache use is not threadsafe

2015-01-08 Thread M. Schmitzer
M. Schmitzer added the comment: Ok, if that is the attitude in such cases, feel free to close this. -- ___ Python tracker ___ ___ Pyth

[issue23152] fstat64 required on Windows

2015-01-08 Thread Steve Dower
Steve Dower added the comment: I prefer your patch too. (I've posted on the other thread about the build problems, and I'll test this when I get a chance.) -- ___ Python tracker ___

[issue22919] Update PCBuild for VS 2015

2015-01-08 Thread Steve Dower
Steve Dower added the comment: You will need Windows 7 *SP1*, as I don't think VS will run without the updates. There is also a service pack for VS 2010 that may enable opening the newer solution - it certainly worked for me. We decided not to keep the old project files as they weren't being m

[issue23191] fnmatch regex cache use is not threadsafe

2015-01-08 Thread STINNER Victor
STINNER Victor added the comment: I guess that a lot of stdlib modules are not thread safe :-/ A workaround is to protect calls to fnmatch with your own lock. -- nosy: +haypo ___ Python tracker ___

[issue23191] fnmatch regex cache use is not threadsafe

2015-01-08 Thread M. Schmitzer
New submission from M. Schmitzer: The way the fnmatch module uses its regex cache is not threadsafe. When multiple threads use the module in parallel, a race condition between retrieving a - presumed present - item from the cache and clearing the cache (because the maximum size has been reache

[issue7676] IDLE shell shouldn't use TABs

2015-01-08 Thread Al Sweigart
Changes by Al Sweigart : -- nosy: +Al.Sweigart ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue23190] OpenSSL fails building with build.bat

2015-01-08 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- resolution: -> rejected status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue23190] OpenSSL fails building with build.bat

2015-01-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Hmm, probably the svn export had failed for some reason. I deleted the OpenSSL directory, re-ran get_externals.bat and then everything went fine. -- ___ Python tracker ___

[issue22919] Update PCBuild for VS 2015

2015-01-08 Thread Mark Lawrence
Mark Lawrence added the comment: @Victor I don't know what version you need for Windows 7 or earlier but I can tell you that VS 2013 Community edition is *NOT* free, I fell into that trap myself, you need the Express edition. -- ___ Python tracker

[issue23190] OpenSSL fails building with build.bat

2015-01-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Z:\cpython\default>dir Z:\cpython\default\externals\openssl-1.0.1j\ Volume in drive Z is antoine Volume Serial Number is 2FA8-F31C Directory of Z:\cpython\default\externals\openssl-1.0.1j 01/08/2015 11:59 AM . 01/08/2015 12:10 PM

[issue23190] OpenSSL fails building with build.bat

2015-01-08 Thread Antoine Pitrou
New submission from Antoine Pitrou: With "PCbuild\build.bat -d -e", OpenSSL fails building: nasm: fatal: unable to open input file `Z:\cpython\default\externals\openssl- 1.0.1j\tmp32\aes-586.asm' Detailed build log is: "Z:\cpython\default\PCbuild\libeay.vcxproj" (default target) (32:3) ->

[issue22906] PEP 479: Change StopIteration handling inside generators

2015-01-08 Thread Chris Angelico
Chris Angelico added the comment: Nick, any particular reason for pointing to https://hg.python.org/cpython/annotate/bbf16fd024df/Lib/__future__.py rather than https://hg.python.org/cpython/annotate/tip/Lib/__future__.py ? I'm looking at both, anyhow. -- _

[issue22919] Update PCBuild for VS 2015

2015-01-08 Thread STINNER Victor
STINNER Victor added the comment: > Visual Studio 2013 Professional works fine under Windows 7 SP1 here. Ok, good to know. But is it correct that the free version of VS 2013 (community) requires Windows 8.1 or newer? It's not cool to require to upgrade Windows to being able to freely compile P

[issue22919] Update PCBuild for VS 2015

2015-01-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Visual Studio 2013 Professional works fine under Windows 7 SP1 here. -- nosy: +pitrou ___ Python tracker ___ ___

[issue19102] Add tests for CLI of the tabnanny module

2015-01-08 Thread Al Sweigart
Al Sweigart added the comment: Since tabnanny is also a module in the standard library (it is imported by the idle code), wouldn't moving it to lib/test/test_tools make it un-importable? This would be a good case for leaving it where it is. -- nosy: +Al.Sweigart __

[issue22919] Update PCBuild for VS 2015

2015-01-08 Thread STINNER Victor
STINNER Victor added the comment: Oh by the way, 2 Windows buildbot slaves are no more able to compile Python. I don't know if it's related to this issue or not. Builder "AMD64 Windows7 SP1 3.x", owned by Jeremy Kloth: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x 2>LIN

[issue22906] PEP 479: Change StopIteration handling inside generators

2015-01-08 Thread Chris Angelico
Changes by Chris Angelico : Added file: http://bugs.python.org/file37641/stopiter.py ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue22906] PEP 479: Change StopIteration handling inside generators

2015-01-08 Thread Chris Angelico
Chris Angelico added the comment: PyErr_Restore doesn't seem to trigger exception chaining. But thanks for the tip about explicitly setting the traceback; not sure how I missed that, but now the StopIteration traceback is visible. Minor point: The previous patch was setting the __context__ of

  1   2   >