[issue28806] Improve the netrc library

2017-01-04 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +r.david.murray -haypo ___ Python tracker ___ ___

[issue26867] test_ssl test_options fails on ubuntu 16.04

2017-01-04 Thread Xiang Zhang
Xiang Zhang added the comment: This test still fails with lastest Py2.7 on Ubuntu 16.10. Could we backport the patch to silence the failure? ./python -m test.regrtest test_ssl [1/1] test_ssl test test_ssl failed -- Traceback (most recent call last): File

[issue29147] registry value to be cleared when python is uninstalled

2017-01-04 Thread jha.amit6666
jha.amit added the comment: Before I read your comment, I ran disk clean up which deleted everything. -- ___ Python tracker ___

[issue29166] Spam

2017-01-04 Thread Zachary Ware
Changes by Zachary Ware : -- components: -asyncio nosy: -Mama Mama title: AT tech email support number <1 855 338 0710 Spam versions: -Python 3.6 ___ Python tracker

[issue29166] AT tech email support number <1 855 338 0710<AT tech email support phone number

2017-01-04 Thread Xiang Zhang
Changes by Xiang Zhang : Removed file: http://bugs.python.org/file46152/1 855 338 0710 AT tech email support phone number AT email support number.jpg ___ Python tracker

[issue29166] AT tech email support number <1 855 338 0710<AT tech email support phone number

2017-01-04 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: -gvanrossum, yselivanov resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue29166] AT tech email support number <1 855 338 0710<AT tech email support phone number

2017-01-04 Thread Xiang Zhang
Changes by Xiang Zhang : -- Removed message: http://bugs.python.org/msg284711 ___ Python tracker ___

[issue29096] unicode_concatenate() optimization is not signal-safe (not atomic)

2017-01-04 Thread Armin Rigo
Changes by Armin Rigo : Added file: http://bugs.python.org/file46153/patch1.diff ___ Python tracker ___

[issue29166] AT tech email support number <1 855 338 0710<AT tech email support phone number

2017-01-04 Thread Mama Mama
New submission from Mama Mama: AT tech email support number <1 855 338 0710

[issue29096] unicode_concatenate() optimization is not signal-safe (not atomic)

2017-01-04 Thread Armin Rigo
Changes by Armin Rigo : Removed file: http://bugs.python.org/file46150/patch1.diff ___ Python tracker ___

[issue29096] unicode_concatenate() optimization is not signal-safe (not atomic)

2017-01-04 Thread Armin Rigo
Changes by Armin Rigo : Added file: http://bugs.python.org/file46151/patch2.diff ___ Python tracker ___

[issue29096] unicode_concatenate() optimization is not signal-safe (not atomic)

2017-01-04 Thread Armin Rigo
Armin Rigo added the comment: The signal handler is called between the INPLACE_ADD and the following STORE_FAST opcode, never from string_concatenate() itself. A fix would be to make sure signal handlers are not called between these two opcodes. See the minimal, proof-of-concept patch #1.

[issue29165] Use forward compatible macro in example code for creating new type

2017-01-04 Thread INADA Naoki
New submission from INADA Naoki: https://docs.python.org/2.7/extending/newtypes.html#the-basics uses PyObject_HEAD_INIT for type object header. static PyTypeObject noddy_NoddyType = { PyObject_HEAD_INIT(NULL) 0, /*ob_size*/ This code isn't compatible with

Re: Clickable hyperlinks

2017-01-04 Thread Terry Reedy
On 1/5/2017 12:11 AM, Deborah Swanson wrote: Terry Reedy wrote, on January 04, 2017 3:58 PM To have a string interpreted as a clickable link, you send the string to software capable of creating a clickable link, plus the information 'this is a clickable link'*. There are two ways to tag a

[issue29145] failing overflow checks in replace_*

2017-01-04 Thread Xiang Zhang
Xiang Zhang added the comment: > It would be better to write the code in the same form as in 3.x. This could > help backporting other patches if needed. Yes, it is. :-) I only had a fast glance at at 3.x codes and thought they didn't share much. :-( But apparently I was wrong. The new patch

Re: Clickable hyperlinks

2017-01-04 Thread Steven D'Aprano
On Thursday 05 January 2017 14:22, Rustom Mody wrote: > This thread does lead to the question: > Is the Url type in python less first-class than it could be? > > In scheme I could point to something like this > https://docs.racket-lang.org/net/url.html Those docs say: "To access the text of a

RE: Clickable hyperlinks

2017-01-04 Thread Deborah Swanson
Terry Reedy wrote, on January 04, 2017 3:58 PM > > On 1/4/2017 4:32 AM, Deborah Swanson wrote: > > > My original question was whether python had anything to provide this > > functionality, and the answer appears to be a resounding NO!!! > > I would say 'Yes, but with user effort'. > > To have

Re: Hey, I'm new to python so don't judge.

2017-01-04 Thread Terry Reedy
On 1/4/2017 9:51 PM, Steven D'Aprano wrote: On Thursday 05 January 2017 10:21, Terry Reedy wrote: IDLE does this when one runs code from the editor, because it cannot/should not inject error messages into the editor buffer... AND it replaces the ^ with red highlighting of the code pointed to.

RE: Clickable hyperlinks

2017-01-04 Thread Deborah Swanson
Chris Angelico wrote, on January 04, 2017 8:27 PM > > On Thu, Jan 5, 2017 at 3:19 PM, Deborah Swanson > wrote: > > I downloaded the code from the Package Index, but there really wasn't > > much in it. This is the entire .py file: > > Ehh, wrong file. Try the one in

RE: Clickable hyperlinks

2017-01-04 Thread Deborah Swanson
Chris Angelico wrote, on January 04, 2017 3:49 PM > > On Thu, Jan 5, 2017 at 9:58 AM, Deborah Swanson > wrote: > > > > Thank you, thank you! Finally, at least one person on this list knows > > about something (anything) in the python world that is internet aware. >

[issue29164] make test always fail at 218/405 ( AssertionError: ', ' not found in '1234.5' )

2017-01-04 Thread Xiang Zhang
Xiang Zhang added the comment: Could you provide your default locale setting, the result of `locale.setlocale(locale.LC_ALL, '')`? -- nosy: +xiang.zhang ___ Python tracker

[issue29096] unicode_concatenate() optimization is not signal-safe (not atomic)

2017-01-04 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- nosy: +arigo ___ Python tracker ___ ___

Re: Clickable hyperlinks

2017-01-04 Thread Michael Torrie
On 01/04/2017 09:19 PM, Deborah Swanson wrote: > Or, take a look at import's code and figure out how it opens a url in a > browser. I imagine it's the 'webbrowser' module you mention. If it tries > several methods, just pick one that will work for you. webbrowser is part of the python standard

Re: Clickable hyperlinks

2017-01-04 Thread Chris Angelico
On Thu, Jan 5, 2017 at 3:19 PM, Deborah Swanson wrote: > I downloaded the code from the Package Index, but there really wasn't > much in it. This is the entire .py file: Ehh, wrong file. Try the one in the standard library:

[issue29162] pyshell.py: name 'sys' is not defined

2017-01-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: I agree that depending on the incidental import is a bug. Tkinter could change, or I might change 'from tkinter import *' to 'from tkinter import Tk, ...' or 'import tkinter as tk'. Serhiy, tkinter/__init__.py imports enum, sys, and re under their own names,

[issue29142] urllib: no_proxy variable values with leading dot not properly handled

2017-01-04 Thread Berker Peksag
Berker Peksag added the comment: Note: We don't officially use pull requests yet. Current way of contributing to Python is documented at https://docs.python.org/devguide/patch.html -- nosy: +berker.peksag ___ Python tracker

RE: Clickable hyperlinks

2017-01-04 Thread Deborah Swanson
Chris Angelico wrote, on January 04, 2017 4:16 AM > > Yeah, there's no simple answer; however, you'll find that > Python on many platforms is entirely capable of popping a URL > up in the user's default browser. Check this out: > > >>> import antigravity I downloaded the code from the Package

[issue29162] pyshell.py: name 'sys' is not defined

2017-01-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 52d671684342 by Terry Jan Reedy in branch '3.6': Issue #29162: Don't depend on 'from tkinter import *' importing sys. https://hg.python.org/cpython/rev/52d671684342 -- nosy: +python-dev ___ Python

Re: Clickable hyperlinks

2017-01-04 Thread Chris Angelico
On Thu, Jan 5, 2017 at 2:24 PM, D'Arcy Cain wrote: > Think of it this way. You drop a ring down a drain. You can ask two > questions, "How do I remove a drain trap?" or "How do I recover a ring that > I dropped down the drain?" If you ask the first question you will get lots >

[issue29162] pyshell.py: name 'sys' is not defined

2017-01-04 Thread Berker Peksag
Berker Peksag added the comment: I misread your comment. I think we need to add "import sys" to that file so I'm reopening this. -- keywords: +easy resolution: not a bug -> stage: resolved -> needs patch status: closed -> open versions: +Python 3.7

[issue29142] urllib: no_proxy variable values with leading dot not properly handled

2017-01-04 Thread Milan Oberkirch
Milan Oberkirch added the comment: I added a line stripping dots from name, I think it makes sense to strip at the end as well (`example.com` is the same domain as `example.com.`). -- nosy: +zvyn pull_requests: +8 ___ Python tracker

[issue29162] pyshell.py: name 'sys' is not defined

2017-01-04 Thread Berker Peksag
Berker Peksag added the comment: Great, thanks for following up with us. -- resolution: -> not a bug stage: -> resolved ___ Python tracker ___

[issue29021] Custom functions in sqlite receive None on invalid UTF-8

2017-01-04 Thread Berker Peksag
Berker Peksag added the comment: We can just fallback to the current behavior (i.e. return None) if the return type of text_factory(val_str) is not str, bytes or bytearray. I think this is also somewhat similar to what we do for the return values of sqlite3_column_text(). -- nosy:

[issue29159] Regression in bytes constructor

2017-01-04 Thread INADA Naoki
INADA Naoki added the comment: @belopolsky It is backported behavior from Python 3.5, to fix regression. See code review discussion in #27704. The first patch kept the behavior, but we simplified it in second patch. That cause this regression. --

[issue29162] pyshell.py: name 'sys' is not defined

2017-01-04 Thread OO O
OO O added the comment: to msg284696 - (view): OK~ Sorry I found i forget to install tkinter before I run make. so the "from tkinter import *" failed. ( sys not import ). -- status: open -> closed ___ Python tracker

Is there a good process or library for validating changes to XML format?

2017-01-04 Thread Sayth Renshaw
Afternoon Is there a good library or way I could use to check that the author of the XML doc I am using doesn't make small changes to structure over releases? Not fully over this with XML but thought that XSD may be what I need, if I search "python XSD" I get a main result for PyXB and

[issue28180] sys.getfilesystemencoding() should default to utf-8

2017-01-04 Thread INADA Naoki
INADA Naoki added the comment: On Linux, I think most people wants UTF-8:surrogateescape by default, without fighting against locale and environment variables. There are already `#if defined(__APPLE__) || defined(__ANDROID__)` path for it. How about adding configure option to use same logic?

Re: Clickable hyperlinks

2017-01-04 Thread Rustom Mody
This thread does lead to the question: Is the Url type in python less first-class than it could be? In scheme I could point to something like this https://docs.racket-lang.org/net/url.html Is there something equivalent in python? -- https://mail.python.org/mailman/listinfo/python-list

Re: Clickable hyperlinks

2017-01-04 Thread D'Arcy Cain
On 2017-01-04 07:07 PM, Deborah Swanson wrote: D'Arcy Cain wrote, on Wednesday, January 04, 2017 5:03 AM In all the messages in this thread I still don't understand what this "teensy advantage" is supposed to be. Do you want to be able to do this: make_web_link(http://...) instead of:

[issue29162] pyshell.py: name 'sys' is not defined

2017-01-04 Thread Berker Peksag
Berker Peksag added the comment: I think the OP is talking about Lib/idlelib/pyshell.py. The relevant changeset is 76f831e4b806. "from tkinter import *" imports the sys module as a side-effect. OO O, did you notice this by reading the code or by using a tool like flake8? -- nosy:

[issue29162] pyshell.py: name 'sys' is not defined

2017-01-04 Thread Milan Oberkirch
Milan Oberkirch added the comment: pyshell.py is not part of CPython, this is the wrong place to report a bug like this. -- nosy: +zvyn ___ Python tracker

[issue29160] pow with three int arguments works like it had two arguments

2017-01-04 Thread Pavel Chuvakhov
Pavel Chuvakhov added the comment: Sorry about script, n1 should be n, and n2 should be m. Updated script is attached. Ofc mpz is a way out. One also could cast int( np.int32 ) explicitly. I just wanted to underline that the best way is to hide all this stuff from a user and not make the

Re: Clickable hyperlinks

2017-01-04 Thread D'Arcy Cain
On 2017-01-04 05:58 PM, Deborah Swanson wrote: the user to go and authenticate, you can simply webbrowser.open("http://.../;) and it'll DTRT. Thank you, thank you! Finally, at least one person on this list knows about something (anything) in the python world that is internet aware. Lots

Re: Hey, I'm new to python so don't judge.

2017-01-04 Thread Steven D'Aprano
On Thursday 05 January 2017 10:21, Terry Reedy wrote: > On 1/3/2017 10:15 PM, Dennis Lee Bieber wrote: > >> And that statement tells us you are trying to run from within some >> IDE/editor which is trapping Python exceptions and producing a dialog >> box for them. > > IDLE does this when one

[issue29161] random.SystemRandom(seed) documentation issue

2017-01-04 Thread Gary E. Miller
Gary E. Miller added the comment: > The docs are clear that System Random uses os.urandom() for creating random > numbers, that there is not state, that sequences aren't reproducible, and > that seed method has no effect and is ignored. Agreed, but not relevant. I have anecdotal proof that

[issue29164] make test always fail at 218/405 ( AssertionError: ', ' not found in '1234.5' )

2017-01-04 Thread OO O
New submission from OO O: make test always fail at 218/405 at test_format.py line 426 message: [218/405/1] test test_format failed -- Traceback (most recent call last): File "/home/vm00/Downloads/Python-3.6.0/Lib/test/test_format.py", line 426, in test_locale self.assertIn(sep, text)

[issue29152] unittest subTest does not call addFailure

2017-01-04 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the report. That's because TestResult.addSubTest() updates TestResult.errors and TestResult.failures itself instead of calling the addError() and addFailure() methods respectively: if issubclass(err[0], test.failureException): errors =

[issue29161] random.SystemRandom(seed) documentation issue

2017-01-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thank you for the submission. I respect what you're trying to do, but disagree that there is any issue here. The docs are clear that System Random uses os.urandom() for creating random numbers, that there is not state, that sequences aren't

[issue29159] Regression in bytes constructor

2017-01-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Inada, Can you explain what your patch does? I don't understand why you single out the OverflowError. When is __index__ expected to raise it? >>> (2**300).__index__()

[issue29161] random.SystemRandom(seed) documentation issue

2017-01-04 Thread Gary E. Miller
Gary E. Miller added the comment: Is there a better place to submit documentation problems to? After my programming team spends a lot of valuable time figuring what the Python doc failed to mention I would like this knowledge to be put to good use by others. Paying it forward if you will.

[issue29157] random.c: Prefer getrandom() over getentropy(), handle ENOSYS in py_getentropy()

2017-01-04 Thread Nick Coghlan
Nick Coghlan added the comment: Aside from a couple of outdated comments and the EPERM question, the attached patch looks good to me. Regarding EPERM, I think it would make sense to make py_getrandom and py_getentropy handle that consistently, otherwise I can see future maintainers readily

[issue29161] random.SystemRandom(seed) documentation issue

2017-01-04 Thread Gary E. Miller
Gary E. Miller added the comment: > > why have an ignored parameter that is not plainly documented as ignored. > Because it improves the substitutability of one RNG for another (i.e. the > same reason that we even have a seed() method). I understand why it the parameter it there. I think the

[issue29157] random.c: Prefer getrandom() over getentropy(), handle ENOSYS in py_getentropy()

2017-01-04 Thread Nick Coghlan
Changes by Nick Coghlan : -- nosy: +ncoghlan ___ Python tracker ___ ___ Python-bugs-list

[issue29163] shlex error in posix mode and empty quotes

2017-01-04 Thread Michal Ostrowski
Changes by Michal Ostrowski : -- components: +Library (Lib) type: -> behavior versions: +Python 2.7, Python 3.4 ___ Python tracker

[issue29163] shlex error in posix mode and empty quotes

2017-01-04 Thread Michal Ostrowski
New submission from Michal Ostrowski: Three examples below. I believe the second is wrong, because it reorders the "echo" and "," tokens. >>> list(shlex.shlex('echo b="a",echo bar', posix=True)) ['echo', 'b', '=', 'a', ',', 'echo', 'bar'] >>> list(shlex.shlex('echo b="",echo bar', posix=True))

[issue29162] pyshell.py: name 'sys' is not defined

2017-01-04 Thread OO O
New submission from OO O: Sorry for my bad English. line 7, 13 at pyshell.py. Call sys befor import sys. Cause name 'sys' is not defined -- assignee: terry.reedy components: IDLE messages: 284684 nosy: OO O, terry.reedy priority: normal severity: normal status: open title: pyshell.py:

[issue29161] random.SystemRandom(seed) documentation issue

2017-01-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: > why have an ignored parameter that is not plainly documented as ignored. Because it improves the substitutability of one RNG for another (i.e. the same reason that we even have a seed() method). -- priority: normal -> low resolution: -> not a

[issue29148] Inheritance behaviour ambiguos

2017-01-04 Thread Berker Peksag
Berker Peksag added the comment: You may find Raymond Hettinger's "super() considered super" article helpful to understand how Python's super() works: https://rhettinger.wordpress.com/2011/05/26/super-considered-super/ -- nosy: +berker.peksag ___

[issue29161] random.SystemRandom(seed) documentation issue

2017-01-04 Thread Gary E. Miller
Gary E. Miller added the comment: I would change: "Accordingly, the seed() method has no effect and is ignored." To: "Accordingly, the optional seed parameter and the seed() method have no effect and are ignored." It was not obvious to me that the seed paramrter got passed to the seed()

Re: Clickable hyperlinks

2017-01-04 Thread Michael Torrie
On 01/04/2017 03:58 PM, Deborah Swanson wrote: > Thank you, thank you! Finally, at least one person on this list knows > about something (anything) in the python world that is internet aware. > It's also occurred to me that Beautifulsoup downloads data from a url, > so that code must have access

[issue29159] Regression in bytes constructor

2017-01-04 Thread INADA Naoki
Changes by INADA Naoki : -- keywords: +patch Added file: http://bugs.python.org/file46147/29159-index-fallback.patch ___ Python tracker

[issue29161] random.SystemRandom(seed) documentation issue

2017-01-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: >From the docs at >https://docs.python.org/3/library/random.html#alternative-generator : """ class random.SystemRandom([seed]) Class that uses the os.urandom() function for generating random numbers from sources provided by the operating system. Not

[issue29161] random.SystemRandom(seed) documentation issue

2017-01-04 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger nosy: +rhettinger ___ Python tracker ___

RE: Clickable hyperlinks

2017-01-04 Thread Deborah Swanson
D'Arcy Cain wrote, on Wednesday, January 04, 2017 5:03 AM > > Deborah - please trim your quoted text. Yes, I will. Some lists want to have it all to review in one message, some want it trimmed to just the lines you are responding to. I was just waiting to see what this list wants. > On

MySQL schema sync or diff

2017-01-04 Thread Charles Heizer
Hello, I have a MySQL database that is not managed (yet) and I would like to get an output or diff against my new model file. I'm using flask-sqlalchemy. Are there any modules that would help me discover the differences so that I can script a migration to begin using flask-migrate? Thanks! --

[issue29160] pow with three int arguments works like it had two arguments

2017-01-04 Thread Case Van Horsen
Case Van Horsen added the comment: This is a bug/limitation in numpy. If x and y are Python integers, and type(z) is of another numeric type, pow calls the nb_power slot of the underlying type. Here a quick example using numpy.int32 and gmpy2.mpz: >>> import numpy, gmpy2 >>> pow(11,13,7) 4

Re: Clickable hyperlinks

2017-01-04 Thread Terry Reedy
On 1/4/2017 4:32 AM, Deborah Swanson wrote: My original question was whether python had anything to provide this functionality, and the answer appears to be a resounding NO!!! I would say 'Yes, but with user effort'. To have a string interpreted as a clickable link, you send the string to

Re: Clickable hyperlinks

2017-01-04 Thread Chris Angelico
On Thu, Jan 5, 2017 at 9:58 AM, Deborah Swanson wrote: > Chris Angelico wrote, on January 04, 2017 4:16 AM >> This uses the 'webbrowser' module, which knows about a number >> of different ways to open a browser, and will attempt them >> all. So if you can figure out the

[issue29161] random.SystemRandom(seed) documentation issue

2017-01-04 Thread Gary E. Miller
New submission from Gary E. Miller: The man page for random.SystemRandom([seed]]) fails to mention that the parameter 'seed' is never used. This should be prominent in the documentation. I have found several cases where a seed was provided to SystemRandom().

[issue29023] Results of random.seed() call with integer argument should be claimed deterministic.

2017-01-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: The wording can perhaps be made more precise. However, this needs to be the end of this series of tracker items which are turning into time wasters. -- assignee: docs@python -> rhettinger nosy: +rhettinger priority: normal -> low

[issue29160] pow with three int arguments works like it had two arguments

2017-01-04 Thread Jim Fasarakis-Hilliard
Changes by Jim Fasarakis-Hilliard : -- components: +Interpreter Core -Distutils title: `pow` with three int arguments works like it had two arguments -> pow with three int arguments works like it had two arguments ___ Python

Re: Hey, I'm new to python so don't judge.

2017-01-04 Thread Terry Reedy
On 1/3/2017 10:15 PM, Dennis Lee Bieber wrote: And that statement tells us you are trying to run from within some IDE/editor which is trapping Python exceptions and producing a dialog box for them. IDLE does this when one runs code from the editor, because it cannot/should not inject error

[issue29160] `pow` with three int arguments works like it had two arguments

2017-01-04 Thread Benjamin Pollak
Benjamin Pollak added the comment: I tried running your script, but it crashes on the last two lines (variables n2 and n1 appear to be undefined). Could you please update that script so we can have a better idea of the behavior of your bug? Thanks, BP -- nosy: +Benjamin Pollak

Re: Choosing a Python IDE. what is your Pythonish recommendation? I do not know what to choose.

2017-01-04 Thread William Ray Wing
> On Jan 4, 2017, at 3:44 PM, Dietmar Schwertberger > wrote: > > On 04.01.2017 15:41, William Ray Wing wrote: >> I use Wing, and I think you will like it. It *is* pythonic, and for what it >> is worth, offers remote debugging as one of its more recently added

RE: Clickable hyperlinks

2017-01-04 Thread Deborah Swanson
Chris Angelico wrote, on January 04, 2017 4:16 AM > > On Wed, Jan 4, 2017 at 10:43 PM, Deborah Swanson > wrote: > > I'm quite well aware by now that there is no one-sentence > answer to my > > original question, if there's any coherent answer at all. > Them's the

[issue29160] `pow` with three int arguments works like it had two arguments

2017-01-04 Thread Pavel Chuvakhov
New submission from Pavel Chuvakhov: Standard `pow` function of three integer arguments should result in a reminder `(x**y) % z`. It seems that `pow(x,y,z)` ignores `%z` operation if type(z) is not `int`. This happens also in the cases when `z` has type numpy.int32, numpy.int64, etc. I

Re: Choosing a Python IDE. what is your Pythonish recommendation? I do not know what to choose.

2017-01-04 Thread Hans-Peter Jansen
On Montag, 2. Januar 2017 03:38:53 Antonio Caminero Garcia wrote: > Hello, I am having a hard time deciding what IDE or IDE-like code editor > should I use. This can be overwhelming. > > So far, I have used Vim, Sublime, Atom, Eclipse with PyDev, Pycharm, > IntelliJ with Python plugin. Well,

[issue29158] Possible glitch in the interaction of a thread and a multiprocessing manager

2017-01-04 Thread Davin Potts
Davin Potts added the comment: There are too many things going on in this example -- it would be far easier to digest if the example could be simplified. The general programming rule of thumb (completely unrelated to but still just as relevant to Python) that I think David might have been

Work between multiple processes

2017-01-04 Thread zxpatric
Hi everyone, I ran into a case that I need to create a work process of an application (Jython so has to call using java.exe) which will collect the data based on what main process indicates. (1) I tried multiprocessing package, no luck. Java.exe can't be called from Process class? (2) I

[issue29021] Custom functions in sqlite receive None on invalid UTF-8

2017-01-04 Thread Aviv Palivoda
Aviv Palivoda added the comment: The problem is in _pysqlite_build_py_params function at connection.c. In case we have text we do the following code: case SQLITE_TEXT: val_str = (const char*)sqlite3_value_text(cur_value); cur_py_value = PyUnicode_FromString(val_str); /* TODO:

[issue29159] Regression in bytes constructor

2017-01-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Also relevant: * #20895 - Add bytes.empty_buffer and deprecate bytes(17) for the same purpose * PEP 467 - Minor API improvements for binary sequences -- ___ Python tracker

[issue29159] Regression in bytes constructor

2017-01-04 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +ncoghlan ___ Python tracker ___

[issue29159] Regression in bytes constructor

2017-01-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I don't think we should put too much effort into preserving numpy behavior. Consider this python 3.5 session: >>> import numpy >>> a = numpy.array([1]) >>> bytes(a) __main__:1: VisibleDeprecationWarning: converting an array with ndim > 0 to an index

Re: Choosing a Python IDE. what is your Pythonish recommendation? I do not know what to choose.

2017-01-04 Thread Dietmar Schwertberger
On 04.01.2017 15:41, William Ray Wing wrote: I use Wing, and I think you will like it. It *is* pythonic, and for what it is worth, offers remote debugging as one of its more recently added features. Obviously, you had no other choice than using Wing ;-) The remote debugging has been around

Re: Choosing a Python IDE. what is your Pythonish recommendation? I do not know what to choose.

2017-01-04 Thread Dietmar Schwertberger
On 04.01.2017 07:54, Antonio Caminero Garcia wrote: Unfortunately most of the time I am still using print and input functions. I know that sucks, I did not use the pdb module, I guess that IDE debuggers leverage such module. pdb is actually quite useful. On my Windows PCs I can invoke python

[issue29070] Integration tests for pty.spawn on Linux and all other platforms

2017-01-04 Thread Martin Panter
Martin Panter added the comment: Ignore my comment about contrib agreement, that must have come through recently :) -- ___ Python tracker ___

[issue29070] Integration tests for pty.spawn on Linux and all other platforms

2017-01-04 Thread Martin Panter
Martin Panter added the comment: Hi Cornelius and thanks for the work. Since the patch adds a significant amount of code, I think you might have to sign the contributor agreement: . You can do it in a web browser. I would like to review your

[issue26851] android compilation and link flags

2017-01-04 Thread Xavier de Gaye
Xavier de Gaye added the comment: Latest patch committed with the following simplification: BASECFLAGS and LDFLAGS are now set for armv7 at the same place, as suggested by Martin in msg271518. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed

[issue26851] android compilation and link flags

2017-01-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset fa2bc63e64c6 by Xavier de Gaye in branch '3.6': Issue #26851: Set Android compilation and link flags. https://hg.python.org/cpython/rev/fa2bc63e64c6 New changeset af363b5200ff by Xavier de Gaye in branch 'default': Issue #26851: Merge 3.6.

[issue26851] android compilation and link flags

2017-01-04 Thread Xavier de Gaye
Changes by Xavier de Gaye : -- versions: +Python 3.6 ___ Python tracker ___ ___

[issue29159] Regression in bytes constructor

2017-01-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ah, if numpy arrays are affected, this should be restored. But swallowing an arbitrary exception doesn't look good to me. -- ___ Python tracker

[issue29159] Regression in bytes constructor

2017-01-04 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +inada.naoki ___ Python tracker ___ ___

[issue29159] Regression in bytes constructor

2017-01-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Indeed, there is behavior change. It is easy to revert the old behavior. But was the old behavior designed? It looks as a side effect of the implementation. What is a reason of making an array an integer type? --

[issue29159] Regression in bytes constructor

2017-01-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: My test code may seem contrived, but numpy arrays exhibit similar behavior: >>> a = numpy.array([2, 2]) >>> bytes(a) Traceback (most recent call last): File "", line 1, in TypeError: only integer arrays with one element can be converted to an index

[issue29159] Regression in bytes constructor

2017-01-04 Thread Alexander Belopolsky
New submission from Alexander Belopolsky: Consider the following code: $ cat bug.py from array import array class C(array): def __new__(cls): return array.__new__(cls, 'B', b'abc') def __index__(self): raise TypeError x = C() print(bytes(x)) It works under python 3.5:

[issue29158] Possible glitch in the interaction of a thread and a multiprocessing manager

2017-01-04 Thread R. David Murray
R. David Murray added the comment: My understanding is that the basic rule of thumb is: don't mix threads and multiprocessing. You may find that if you use spawn, it won't ever work. But I haven't used multiprocessing myself. -- nosy: +r.david.murray type: crash -> behavior

[issue29158] Possible glitch in the interaction of a thread and a multiprocessing manager

2017-01-04 Thread Luciano Dionisio
New submission from Luciano Dionisio: After spending a lot of time trying to understand why my code will not execute as expected and after not getting any help from StackOverflow:

Re: Screwing Up looping in Generator

2017-01-04 Thread Sayth Renshaw
For completeness I was close this is the working code. def get_list_of_names(generator_arg): name_set = set() for name in generator_arg: base = os.path.basename(name.name) filename = os.path.splitext(base)[0] name_set.add(filename) return name_set def

Re: Simulating int arithmetic with wrap-around

2017-01-04 Thread Rob Gaddi
On 01/03/2017 10:00 PM, Gregory Ewing wrote: Paul Rubin wrote: My first thought is towards the struct module, especially if you want to handle a bunch of such integers at the same time. Or maybe the array module or some combination. Or possibly numpy. Agreed. If you had to do a lot of

[issue29157] random.c: Prefer getrandom() over getentropy(), handle ENOSYS in py_getentropy()

2017-01-04 Thread STINNER Victor
STINNER Victor added the comment: Python 2.7, 3.5, 3.6 and 3.7 are impacted: they should fail on Linux if compiled with a recent glibc which has getentropy(). -- ___ Python tracker

  1   2   >