[issue18314] Have os.unlink remove junction points

2014-05-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: Yes, new issue. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue1218234] inspect.getsource doesn't update when a module is reloaded

2014-05-05 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +yselivanov versions: +Python 3.5 -Python 3.2, Python 3.3 ___ Python tracker ___ ___ Python-bugs

[issue21435] Segfault with cyclic reference and asyncio.Future

2014-05-05 Thread Tim Peters
Tim Peters added the comment: Sorry for the earlier noise. I'm fighting a flu and my head is mush :-( Anyway, this doesn't look obvious. We get to this point: if (Py_REFCNT(op) == 1) { /* op will be destroyed */ gc = gc->gc.gc_prev; } a

[issue20752] Difflib should provide the option of overriding the SequenceMatcher

2014-05-05 Thread Chris Rose
Chris Rose added the comment: Ping? I'd like to know if the proposed solution passes muster, so that I can get this into ... well, whatever the right revision would be. -- ___ Python tracker __

[issue18314] Have os.unlink remove junction points

2014-05-05 Thread Kim Gräsman
Kim Gräsman added the comment: Thanks for helping me land this! eryksun: interesting, thanks! I seem to remember having problems without the \??\ prefix, but it could have been something else causing it (filling the buffer to DeviceIoControl's satisfaction was... challenging.) I have some ide

[issue1234674] filecmp.cmp's "shallow" option

2014-05-05 Thread Steven Barker
Steven Barker added the comment: Here's a patch against the default branch that fixes filecmp.cmp's behavior when "shallow" is True, including an update to the module's docs (correcting the previous ambiguity discussed in the 2011 python-dev thread mentioned by Sandro Tosi) and a couple of new

[issue17797] Visual C++ 11.0 reports fileno(stdin) == 0 for non-console program

2014-05-05 Thread Luke Dunstan
Changes by Luke Dunstan : -- nosy: +Luke.Dunstan versions: +Python 3.4 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue21435] Segfault with cyclic reference and asyncio.Future

2014-05-05 Thread Tim Peters
Tim Peters added the comment: Ah, fudge - I think I forgot that these circular lists also have dummy heads, in which case it's A Good Thing "the first element" is skipped, and it should be impossible for one to become physically empty (the dummy header should always survive intact). Never mi

[issue21435] Segfault with cyclic reference and asyncio.Future

2014-05-05 Thread Tim Peters
Tim Peters added the comment: Also noting that the loop "looks funny" because it appears never to process the first element in the input list (unless the input list contains only one element). That is, the loop starts by processing the second element in the list, and exits as soon as gc makes

[issue21435] Segfault with cyclic reference and asyncio.Future

2014-05-05 Thread Tim Peters
Tim Peters added the comment: Noting that in a Windows debug build, at death gc is 0xdbdbdbdb, so we are in reading up free'd memory (0xdb is pymalloc's "dead byte" marker). -- ___ Python tracker _

[issue21435] Segfault with cyclic reference and asyncio.Future

2014-05-05 Thread Tim Peters
Tim Peters added the comment: Thought question: suppose finalize_garbage() is called with a collectable list all of whose members are in fact going to be destroyed? I don't see how the loop iteration logic could reliably work then. For concreteness, suppose there's only object - A - in the l

[issue21435] Segfault with cyclic reference and asyncio.Future

2014-05-05 Thread Tim Peters
Tim Peters added the comment: Guido, that's no good. The outer loop is traversing a doubly-linked circular list, and it should be flatly impossible for gc to ever be NULL - the list structure is insanely damaged if any gc_next or gc_prev field reachable from it is NULL (gc always comes from a

[issue21435] Segfault with cyclic reference and asyncio.Future

2014-05-05 Thread Guido van Rossum
Guido van Rossum added the comment: So should we just add if (!gc) break; at the top of the for-loop body? That prevents the crash for me. But why is it needed? -- ___ Python tracker __

[issue21444] __len__ can't return big numbers

2014-05-05 Thread R. David Murray
R. David Murray added the comment: While this is classed as a CPython implementation detail (see issue 15718) it doesn't sound like it is likely to be changed (see issue 2723). -- nosy: +r.david.murray ___ Python tracker

[issue11380] Improve reporting of broken stdout pipe during interpreter shutdown

2014-05-05 Thread Christopher Heiny
Changes by Christopher Heiny : -- nosy: +Christopher.Heiny ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue1218234] inspect.getsource doesn't update when a module is reloaded

2014-05-05 Thread Jean-Paul Calderone
Changes by Jean-Paul Calderone : -- nosy: -exarkun ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue21444] __len__ can't return big numbers

2014-05-05 Thread Ram Rachum
New submission from Ram Rachum: I want to use big numbers for length. >>> class A: ... __len__ = lambda self: 10 ** 20 >>> len(A()) Traceback (most recent call last): File "", line 1, in len(A()) OverflowError: cannot fit 'int' into an index-sized integer -- components: Inter

[issue21435] Segfault with cyclic reference and asyncio.Future

2014-05-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is the gdb backtrace. The `gc` variable is equal to NULL. 0x0043d254 in finalize_garbage (collectable=0x7fffdc40, old=0x8fdae0 ) at Modules/gcmodule.c:788 788 if (!_PyGCHead_FINALIZED(gc) && (gdb) bt #0 0x0043d254 in fi

[issue18314] Have os.unlink remove junction points

2014-05-05 Thread Tim Golden
Tim Golden added the comment: Thanks for the research, eryksun. As long as it doesn't hurt let's leave it as is for now. -- ___ Python tracker ___ __

[issue21316] mark test_devpoll to be meaningful only for Solaris

2014-05-05 Thread R. David Murray
R. David Murray added the comment: There's no pressing reason to revisit this, but...I think it would be better to say "works only on systems that support devpoll (ie: Solaris and derivatives)" Also, as long as you are changing the try/except, you could use skipUnless(hasattr(select, 'devpoll

[issue18314] Have os.unlink remove junction points

2014-05-05 Thread eryksun
eryksun added the comment: For a junction reparse point, Sysinternals junction.exe shows the "Print Name" and "Substitute Name" are the same and it's not an NT \?? path (i.e. \DosDevices, i.e. \Global??). OTOH, the substitute name does use an NT DosDevices path when I use cmd's mklink or os.sy

[issue21443] asyncoio logging documentation clarifications.

2014-05-05 Thread steven Michalske
New submission from steven Michalske: The asyncio documentation should comment on how to mute and increase some of it's logging. 18.5.7.3. Logging The asyncio module logs information with the logging module in the logger 'asyncio'. Adding a bit of text that mentions the following line would

[issue1218234] inspect.getsource doesn't update when a module is reloaded

2014-05-05 Thread Jason R. Coombs
Jason R. Coombs added the comment: This issue appears implicated in https://bitbucket.org/pypa/setuptools/issue/201 -- nosy: +jason.coombs ___ Python tracker ___ __

[issue17735] inspect.findsource raises IndexError

2014-05-05 Thread Jason R. Coombs
Jason R. Coombs added the comment: This issue appears implicated in https://bitbucket.org/pypa/setuptools/issue/201 -- nosy: +jason.coombs ___ Python tracker ___

[issue18314] Have os.unlink remove junction points

2014-05-05 Thread Tim Golden
Tim Golden added the comment: Buildbots seem happy. Thanks very much for the patches! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker _

[issue18314] Have os.unlink remove junction points

2014-05-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset e791a36ab6a2 by Tim Golden in branch 'default': Issue18314 ACKS & NEWS http://hg.python.org/cpython/rev/e791a36ab6a2 -- ___ Python tracker

[issue1628987] inspect trouble when source file changes

2014-05-05 Thread Jason R. Coombs
Jason R. Coombs added the comment: This issue appears implicated in https://bitbucket.org/pypa/setuptools/issue/201 -- nosy: +jason.coombs ___ Python tracker ___ __

[issue21440] Use support.rmtree in test_zipfile

2014-05-05 Thread Tim Golden
Tim Golden added the comment: Thanks. I get them enough that it stops a test run being particularly useful, especially when I've just touched something (eg unlink) which might conceivably affect something like tarfile. -- ___ Python tracker

[issue21440] Use support.rmtree in test_zipfile

2014-05-05 Thread Zachary Ware
Zachary Ware added the comment: I don't see the intermittent failures (this machine may well just be too slow). The patch looks good and doesn't cause failures, though, so +1 from me. -- ___ Python tracker __

[issue21393] Python/random.c: close hCryptProv at exit

2014-05-05 Thread Zachary Ware
Zachary Ware added the comment: LGTM, Tim. -- nosy: +zach.ware ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18314] Have os.unlink remove junction points

2014-05-05 Thread Tim Golden
Tim Golden added the comment: Thanks, Zach. I was aware that calloc was in the air, but I wasn't sure if it had been committed and I'd delayed on this enough so I thought I'd push for now. We can always revisit. -- ___ Python tracker

[issue21442] Win32 compiler warning in PyBytes_Concat

2014-05-05 Thread Zachary Ware
New submission from Zachary Ware: Issue #21377 introduced a compiler warning on Windows: ..\Objects\bytesobject.c(2824): warning C4018: '>' : signed/unsigned mismatch [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj] -- components: Build, Windows messages: 217942 nosy: haypo, nikratio, pi

[issue18314] Have os.unlink remove junction points

2014-05-05 Thread Zachary Ware
Zachary Ware added the comment: Just skimming, I noticed something about replacing calloc() with PyMem_RawAlloc; note that there is now PyMem_Calloc or PyMem_RawCalloc that you should be able to use if you prefer. See #21233. -- nosy: +zach.ware __

[issue18314] Have os.unlink remove junction points

2014-05-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5c1c14ff1f13 by Tim Golden in branch 'default': Issue18314 Allow unlink to remove junctions. Includes support for creating junctions. Patch by Kim Gräsman http://hg.python.org/cpython/rev/5c1c14ff1f13 -- ___

[issue21441] Buffer Protocol Documentation Error

2014-05-05 Thread Jake Vanderplas
New submission from Jake Vanderplas: The ``obj`` and ``buf`` structure elements are switched in the documentation of the Buffer Protocol. Compare https://docs.python.org/3.3/c-api/buffer.html#Py_buffer to https://github.com/python/cpython/blob/master/Include/object.h#L179-180 -- assig

[issue21440] Use support.rmtree in test_zipfile

2014-05-05 Thread Tim Golden
Tim Golden added the comment: Adding Zach as another Windows dev -- nosy: +zach.ware ___ Python tracker ___ ___ Python-bugs-list maili

[issue21440] Use support.rmtree in test_zipfile

2014-05-05 Thread Tim Golden
Tim Golden added the comment: Same goes for test_tarfile (updated patch attached) -- Added file: http://bugs.python.org/file35157/issue21440.test_tarzipfile.patch ___ Python tracker

[issue21440] Use support.rmtree in test_zipfile

2014-05-05 Thread Tim Golden
Changes by Tim Golden : -- keywords: +patch Added file: http://bugs.python.org/file35156/issue21440.test_zipfile.patch ___ Python tracker ___

[issue21435] Segfault with cyclic reference and asyncio.Future

2014-05-05 Thread Guido van Rossum
Guido van Rossum added the comment: Confirmed too (OSX 10.9 again, CPython 3.4 or 3.5; but it doesn't crash with CPython 3.3). There is no C code in asyncio, so I'm not sure how asyncio can be directly responsible for this crash. Probably some of the GC improvements have an edge case that is t

[issue21440] Use support.rmtree in test_zipfile

2014-05-05 Thread Tim Golden
New submission from Tim Golden: At present test_zipfile uses shutil.rmtree to remove its test artefacts. This intermittently but frequently fails to remove cleanly on a Windows development box. Changing it to use the test.support helper functions should reduce the incidence. -- assign

[issue21393] Python/random.c: close hCryptProv at exit

2014-05-05 Thread Tim Golden
Changes by Tim Golden : -- resolution: fixed -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue21393] Python/random.c: close hCryptProv at exit

2014-05-05 Thread Tim Golden
Tim Golden added the comment: Unfortunately it looks as though this wasn't the correct way to close a Crypto handle. It isn't a conventional handle and we be using CryptReleaseContext to "close" it. cf http://msdn.microsoft.com/en-us/library/windows/desktop/aa382041%28v=vs.85%29.aspx for exam

[issue21393] Python/random.c: close hCryptProv at exit

2014-05-05 Thread Tim Golden
Changes by Tim Golden : -- status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue6839] zipfile can't extract file

2014-05-05 Thread Adam Polkosnik
Adam Polkosnik added the comment: Both. Other programs, and in python scripts when raise() is removed in zipfile.py. Unless your results are different. -- ___ Python tracker ___

[issue6839] zipfile can't extract file

2014-05-05 Thread Ethan Furman
Ethan Furman added the comment: Ah, so when you (Adam) said "extraction works fine", what you meant was "extraction works fine *in other programs*". Okay. -- ___ Python tracker

[issue21435] Segfault with cyclic reference and asyncio.Future

2014-05-05 Thread Tim Golden
Tim Golden added the comment: I can confirm that this crashes on Windows as well. Failure actually occurs in gcmodule.c:finalize_garbage. Adding Guido as it looks as it's tied to asyncio. -- nosy: +Guido.van.Rossum, tim.golden ___ Python tracker

[issue18604] Consolidate gui available checks in test.support

2014-05-05 Thread Zachary Ware
Zachary Ware added the comment: Thanks Ned. Unfortunately, I don't have a Mac to test on, so I can't help much with figuring out what's going on. -- ___ Python tracker ___

[issue21366] Document that return in finally overwrites prev value

2014-05-05 Thread R. David Murray
R. David Murray added the comment: I would remove the parenthetical (it was so stated in immediately preceding paragraph and thus is redundant), and instead of "win", I would say "will always be the last one executed". -- ___ Python tracker

[issue21366] Document that return in finally overwrites prev value

2014-05-05 Thread Zachary Ware
Changes by Zachary Ware : -- stage: -> patch review type: behavior -> enhancement versions: +Python 3.4, Python 3.5 ___ Python tracker ___ __

[issue21366] Document that return in finally overwrites prev value

2014-05-05 Thread Zachary Ware
Zachary Ware added the comment: How's this, or is it too much? -- keywords: +patch nosy: +zach.ware Added file: http://bugs.python.org/file35154/issue21366.diff ___ Python tracker __

[issue14019] Unify tests for str.format and string.Formatter

2014-05-05 Thread Eric V. Smith
Eric V. Smith added the comment: The issue is about tests for str.format and string.Formatter, but in http://bugs.python.org/msg194709 and the associated patch there are tests for the formatter module to increase its coverage. I suggested on the mentorship list that we break this into two issu

[issue21439] Numerous minor issues in Language Reference

2014-05-05 Thread Zachary Ware
Changes by Zachary Ware : -- nosy: +docs@python ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue21439] Numerous minor issues in Language Reference

2014-05-05 Thread Zachary Ware
New submission from Zachary Ware: Reported by Feliks Kluzniak on docs@: """ Hello! I have been reading the Language Reference Manual in order to teach myself Python 3. I noticed several minor errors, and a much larger number of linguistic or editorial infelicities. I have listed them all in

[issue20383] Add a keyword-only spec argument to types.ModuleType

2014-05-05 Thread Brett Cannon
Brett Cannon added the comment: My current thinking on this it to introduce in importlib.util: def module_from_spec(spec, module=None): """Create/initialize a module based on the provided spec. If a module is provided then spec.loader.create_module() will not be consulted. """

[issue17756] test_syntax_error fails when run in the installed location

2014-05-05 Thread Martin Pitt
Martin Pitt added the comment: I can reproduce this here. In that test, I added the following: with open('/tmp/debug', 'w') as f: for call in self.stderr.method_calls: f.write('call: %s\n' % str(call)) This gives: === 8< call: call.writ

[issue21436] Consider leaving importlib.abc.Loader.load_module()

2014-05-05 Thread Brett Cannon
Brett Cannon added the comment: So it's not quite as bad as you think as SourceFileLoader.load_module() doesn't need an argument (I've opened http://bugs.python.org/issue21438 to fix the documentation). Admittedly it is a longer command than imp.load_source() to type, but there is no extra inf

[issue21438] Document which importlib.machinery loaders don't require an argument for load_module()

2014-05-05 Thread Brett Cannon
New submission from Brett Cannon: Multiple loaders don't require an argument for load_module() because the module name is provided as part of instance initialization. As such it doesn't hurt to document this fact to help shorten manual calls to the instances as when people do when transitionin

[issue21437] document that asyncio.ProactorEventLoop doesn't support SSL

2014-05-05 Thread akira
New submission from akira: In Lib/asyncio/proactor_events.py:419 [1]: def _start_serving(self, protocol_factory, sock, ssl=None, server=None): if ssl: raise ValueError('IocpEventLoop is incompatible with SSL.') [1]: http://hg.python.org/cpython/file/4f26430b03fd/Lib/asyncio/proacto

[issue21392] Python on Cygwin: subprocess.call BlockingIOError: [Errno 11] Resource temporarily unavailable

2014-05-05 Thread dellair jie
dellair jie added the comment: Eric, Very much appreciated for your offer to help. This issue is with Cygwin fork(), documented here: http://cygwin.com/faq.html#faq.using.fixing-fork-failures I am closing the issue. Have a great day! -- resolution: -> not a bug status: open -> closed

[issue21436] bring back importlib.load_source() et al.

2014-05-05 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +brett.cannon, eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue21436] bring back importlib.load_source() et al.

2014-05-05 Thread Claudiu.Popa
Changes by Claudiu.Popa : -- nosy: +Claudiu.Popa ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue21436] bring back importlib.load_source() et al.

2014-05-05 Thread Sebastian Rittau
New submission from Sebastian Rittau: It was very easy to load plugin files in Python 2: import imp my_module = imp.load_source("what.ever", "foo.py") Unfortunately, this became much more obscure in Python 3.3: import importlib.machinery loader = importlib.machinery.SourceFileLoader("what.ever

[issue21435] Segfault with cyclic reference and asyncio.Future

2014-05-05 Thread Peter Inglesby
New submission from Peter Inglesby: The following code causes a segfault when run under Python3.4+ on OSX10.9. # segfaulter.py import asyncio class A: pass class B: def __init__(self, future): self.future = future def __del__(self): self.a = None @asyncio.coro

[issue17756] test_syntax_error fails when run in the installed location

2014-05-05 Thread Matthias Klose
Matthias Klose added the comment: seen this again in our autopkg tester https://jenkins.qa.ubuntu.com/view/Utopic/view/AutoPkgTest/job/utopic-adt-python3.4/12/ however now I can't reproduce this locally, and the test succeeds during the build. -- status: pending -> open __

[issue21427] installer not working

2014-05-05 Thread Uwe
Uwe added the comment: I guess this is merely describing the problem and not the solution? (by the way I had no difficulties with the 64bit version on a 64bit win7 system) Would it be possible to produce the binairies myself using the mingw compiler? The readme says visual c++ is required. ---

[issue21121] -Werror=declaration-after-statement is added even for extension modules through setup.py

2014-05-05 Thread Stefan Krah
Stefan Krah added the comment: The current patch allows the user to specify e.g.: CFLAGS_NODIST="-march=core2" ./configure So it would be surprising to get: >>> import sysconfig >>> sysconfig.get_config_var('CFLAGS_NODIST') '' Now, we could restrict ourselves entirely to internal PY_CFLAGS_

[issue21434] python -3 documentation is outdated

2014-05-05 Thread Berker Peksag
New submission from Berker Peksag: https://docs.python.org/2.7/using/cmdline.html#cmdoption-3 Currently, lib2to3 provides fixers for dict.has_key(), apply(), callable(), execfile() and reduce() functions. The "reload" fixer was added to Python 3.4 in issue 11797, but not backported to 2.7. --

[issue21422] int << 0: return the number unmodified

2014-05-05 Thread Mark Dickinson
Mark Dickinson added the comment: BTW, there's also a behaviour change here. Before the patch: >>> True << 0 1 After the patch: >>> True << 0 True Which demonstrates another good reason to avoid trivial-looking optimisations: it's far too easy to accidentally change behaviour. --

[issue21132] Failure to import win32api

2014-05-05 Thread David Woakes
David Woakes added the comment: This issue is not related to anything in the Python 3.4 release. It's a problem with the installer not asking to be installed as administrator. Running C:\Python34\Scripts\pywin32_postinstall.py as administrator after installing fixes this. -- resolutio

[issue7850] platform.system() should be "macosx" instead of "Darwin" on OSX

2014-05-05 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Removing 2.7 as target, since this is a new feature. -- versions: -Python 2.7 ___ Python tracker ___ ___

[issue7850] platform.system() should be "macosx" instead of "Darwin" on OSX

2014-05-05 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Caelyn: Thanks for the patch. Some comments: * Please use aliased=False instead of aliased=0 in the patch. * It would be great if you could enhance the test a bit to actually check the return value. This would need a mock of the os.uname API for the test.

[issue20866] segfailt with os.popen and SIGPIPE

2014-05-05 Thread akira
akira added the comment: Victor, where can you reproduce it (OS, python version, what C lib)? I don't receive segfault, only sigpipe (see msg217818 ). Here's gdb backtrace after the signal: Program received signal SIGPIPE, Broken pipe. 0x771e1040 in __write_nocancel () at ../sysdeps/u