[issue34874] Python 3.6.3 command script wrapped in single quotes produces NameError: name 'A' is not defined

2018-10-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I can reproduce this problem when use double quotes as both outer and internal quotes. $ echo -n '{"A":"a"}' | python3 -c "import sys,json; j=json.load(sys.stdin); print(j["A"])" Traceback (most recent call last): File "", line 1, in NameError: name

[issue34876] Python3.8 changes how decorators are traced

2018-10-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: On other hand, consider the following example of multiline assignment: $ rlwrap ./python -m dis a = [ x, y, ] In 3.7: 2 0 LOAD_NAME0 (x) 3 2 LOAD_NAME1 (y) 4 BUILD_LIST

[issue34876] Python3.8 changes how decorators are traced

2018-10-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is because the first line of the function definition was the line of the last decorator in 3.7, and it is the line of the first decorator in 3.8. $ rlwrap ./python -m dis @decorator @decorator @decorator def func(): pass In 3.7: 2 0

[issue34874] Python 3.6.3 command script wrapped in single quotes produces NameError: name 'A' is not defined

2018-10-02 Thread Benjamin Peterson
Benjamin Peterson added the comment: I cannot reproduce this problem with exactly Python 3.6.3. This may be some strange situation specific to your configuration, which should be supported to RedHat. -- nosy: +benjamin.peterson ___ Python tracker

[issue34879] bytesobject.c: Possible null pointer dereference due to formatfloat()

2018-10-02 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch pull_requests: +9069 stage: -> patch review ___ Python tracker ___ ___

[issue34879] bytesobject.c: Possible null pointer dereference due to formatfloat()

2018-10-02 Thread Zackery Spytz
New submission from Zackery Spytz : The PyBytes_FromStringAndSize() call in formatfloat() is not checked for failure. -- components: Interpreter Core messages: 326933 nosy: ZackerySpytz priority: normal severity: normal status: open title: bytesobject.c: Possible null pointer

[issue34878] Lock Objects documentation bug

2018-10-02 Thread Benjamin Peterson
Benjamin Peterson added the comment: The current documentation is correct. While conceptually one may think of a lock as being held ("owned") by a particular thread, the lock internally has no idea what thread owns it—operations on a lock are influenced only by its current state not what

[issue32174] nonASCII punctuation characters can not display in python363.chm.

2018-10-02 Thread Sangbae Nam
Sangbae Nam added the comment: This issue still persists in 3.6 and 3.7. -- assignee: -> docs@python components: +Documentation nosy: +Sangbae Nam, docs@python versions: +Python 3.7 Added file: https://bugs.python.org/file47844/py37chm.png ___

[issue2771] Test issue

2018-10-02 Thread Ezio Melotti
Ezio Melotti added the comment: another test -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

Re: Creating Win .exe file from *.py on Linux

2018-10-02 Thread William Ray Wing via Python-list
> On Oct 2, 2018, at 3:03 PM, John Doe wrote: > > Hello World > > Is it possible to create on Linux win .exe file from *.py file? > -- > https://mail.python.org/mailman/listinfo/python-list As was pointed out here a day or so ago, the answer is yes, but it is a two step process. First

[issue34751] Hash collisions for tuples

2018-10-02 Thread Tim Peters
Tim Peters added the comment: > SeaHash seems to be designed for 64 bits. Absolutely. > I'm guessing that replacing the shifts by > > x ^= ((x >> 16) >> (x >> 29)) > > would be what you'd do for a 32-bit hash. My guess too. But "the prime" is a puzzle. As noted before, the 64-bit prime

Re: This thread is closed [an actual new thread]

2018-10-02 Thread Ben Finney
Ethan Furman writes: > On 10/01/2018 04:26 PM, Ben Finney wrote: > > If there is some specific formal meaning to the above statement, I > > don't know where it's documented. If it's not a specific formal > > statement, that is itself troubling, because it's not clear what > > would constitute a

[issue34872] investigate task/future cancellation in asynciomodule.c

2018-10-02 Thread Yury Selivanov
Yury Selivanov added the comment: Ned, will we have 3.7.1rc2? If so, would it be possible to include the fix for this one? -- nosy: +ned.deily ___ Python tracker ___

[issue34874] Python 3.6.3 command script wrapped in single quotes produces NameError: name 'A' is not defined

2018-10-02 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34877] Inconsistent Behavior Of futures.ProcessPoolExecutor

2018-10-02 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34751] Hash collisions for tuples

2018-10-02 Thread Tim Peters
Tim Peters added the comment: FYI, this appears to be a good overview of what SMHasher is looking for: https://github.com/aappleby/smhasher/wiki/SMHasher Someg of everything: performance, correctness, statistical measures, and specific kinds of keysets that have proved problematic for other

[issue34878] Lock Objects documentation bug

2018-10-02 Thread ulrich.stern
New submission from ulrich.stern : The first sentence of the documentation for Lock Objects (https://docs.python.org/2/library/threading.html#lock-objects) seems incorrect. It currently states "A primitive lock is a synchronization primitive that is not owned by a particular thread when

[issue12458] Tracebacks should contain the first line of continuation lines

2018-10-02 Thread Ned Batchelder
Ned Batchelder added the comment: The other drawback is changing how the trace function is notified in a few scenarios. -- nosy: +nedbat ___ Python tracker ___

[issue34872] investigate task/future cancellation in asynciomodule.c

2018-10-02 Thread Elvis Pranskevichus
Change by Elvis Pranskevichus : -- keywords: +patch pull_requests: +9068 stage: -> patch review ___ Python tracker ___ ___

[issue34876] Python3.8 changes how decorators are traced

2018-10-02 Thread Ammar Askar
Ammar Askar added the comment: It looks like this is caused by https://github.com/python/cpython/commit/da8d72c953369b872a12c13f136ada77a786714a Adding Serhiy to the nosy list. -- nosy: +ammar2, serhiy.storchaka ___ Python tracker

[issue34875] Change .js mime to "test/javascript"

2018-10-02 Thread Ammar Askar
Ammar Askar added the comment: It should be noted that the HTML spec also says: The term "JavaScript" is used to refer to ECMA-262, rather than the official term ECMAScript, since the term JavaScript is more widely known. Similarly, the MIME type used to refer to JavaScript in this

[issue34877] Inconsistent Behavior Of futures.ProcessPoolExecutor

2018-10-02 Thread Tom Ashley
New submission from Tom Ashley : Not sure if this goes in core or modules. There is an inconsistency in the output of the attached script. From the docs I read it's supposed to have the behavior of: "If something happens to one of the worker processes to cause it to exit unexpectedly, the

[issue34876] Python3.8 changes how decorators are traced

2018-10-02 Thread Ned Batchelder
New submission from Ned Batchelder : When decorating a function, the sequence of lines reported to the trace function is different in Python3.8 than with previous versions $ cat -n decorator.py 1 def decorator(f): 2 return f 3 4 def f(): 5 @decorator

Re: Re : So apparently I've been banned from this list

2018-10-02 Thread Ethan Furman
On 10/02/2018 03:40 PM, armand.fouca...@telecom-bretagne.eu wrote: Hello there, I'm quite new here. Welcome! I'm sorry to interfere, but this thread is only creating noise on this list. You are correct. This thread is now closed. Is there a place where such topics can be debated, other

Re: Program to find Primes of the form prime(n+2) * prime(n+1) - prime(n) +- 1.

2018-10-02 Thread Gary Herron
On 10/02/2018 01:23 PM, tomusa...@gmail.com wrote: Primes of the form prime(n+2) * prime(n+1) - prime(n) +- 1. DATA 31, 71, 73, 137, 211, 311, 419, 421, 647, 877, 1117, 1487, 1979, 2447, 3079, 3547, 4027, 7307, 7309, 12211, 14243, 18911, 18913, 23557, 25439, 28729, 36683, 37831,

[issue34875] Change .js mime to "test/javascript"

2018-10-02 Thread Myles Borins
Change by Myles Borins : -- keywords: +patch pull_requests: +9066 stage: -> patch review ___ Python tracker ___ ___

[issue34875] Change .js mime to "test/javascript"

2018-10-02 Thread Myles Borins
New submission from Myles Borins : I propose to change the mapping of file extension .js to mime type "text/javascript" from "application/javascript. "text/javascript" is the currently documented best practice in the whatwg HTML spec.

Re: Replacing : with "${" at the beginning of the word and adding "}" at the end of the word

2018-10-02 Thread Cameron Simpson
On 02Oct2018 06:04, zljubi...@gmail.com wrote: I have to execute the same sql in two different programs. Each of them marks parameters differently. Then you are MUCH better off assembling the SQL using come kind of query constructor, which correctly inserts parameter placeholders is the

[issue34711] Fix test_httpservers on AIX (trailingSlashOK)

2018-10-02 Thread Martin Panter
Martin Panter added the comment: Hi Michael, I agree with Victor that the best place to fix the problem is in the HTTP server module. In other words, the “medium fix” you mentioned in your original post. Your recent proposal to just skip the test means that AIX will continue to suffer from

Re: Program to find Primes of the form prime(n+2) * prime(n+1) - prime(n) +- 1.

2018-10-02 Thread Martin Musatov
I am drafting a sequence for OEIS. I was told Python was most accesible for beginners. On Tue, Oct 2, 2018, 4:48 PM Bob Gailer wrote: > On Oct 2, 2018 4:59 PM, "Musatov" wrote: > > > > Primes of the form prime(n+2) * prime(n+1) - prime(n) +- 1. > > DATA > > > > 31, 71, 73, 137, 211,

Re: Program to find Primes of the form prime(n+2) * prime(n+1) - prime(n) +- 1.

2018-10-02 Thread Max Zettlmeißl via Python-list
On Tue, Oct 2, 2018 at 10:23 PM, Musatov wrote: > Primes of the form prime(n+2) * prime(n+1) - prime(n) +- 1. > DATA > > 31, 71, 73, 137, 211, 311, 419, 421, 647, 877, 1117, 1487, 1979, 2447, 3079, > 3547, 4027, 7307, 7309, 12211, 14243, 18911, 18913, 23557, 25439, 28729, > 36683,

Re: Program to find Primes of the form prime(n+2) * prime(n+1) - prime(n) +- 1.

2018-10-02 Thread Bob Gailer
On Oct 2, 2018 4:59 PM, "Musatov" wrote: > > Primes of the form prime(n+2) * prime(n+1) - prime(n) +- 1. > DATA > > 31, 71, 73, 137, 211, 311, 419, 421, 647, 877, 1117, 1487, 1979, 2447, 3079, 3547, 4027, 7307, 7309, 12211, 14243, 18911, 18913, 23557, 25439, 28729, 36683, 37831, 46853,

[issue34751] Hash collisions for tuples

2018-10-02 Thread Tim Peters
Tim Peters added the comment: > So it seems that this SMHasher test suite doesn't > catch the problem that we're seeing with negative integers. Seems to be so, but I've never run SMHasher myself. I believe it's focused on statistical properties, like avalanche and bit independence. >

Re: So apparently I've been banned from this list

2018-10-02 Thread Ethan Furman
On 10/02/2018 02:24 PM, Mark Lawrence wrote: I fully support Steven D'Aprano.  This disgraceful behaviour by the moderators has been perpetuated by Ethan Thurman who doesn't have the guts to say things online but has instead sent me a message to my personal inbox.  Please can we get rid of

[issue34751] Hash collisions for tuples

2018-10-02 Thread Tim Peters
Tim Peters added the comment: > >>> from itertools import product > >>> len(set(map(hash, product([0.5, 0.25], repeat=20 > 32 > Good catch! Would you like me to add this to the testsuite? It's in mine already ;-) I've added all the "bad examples" in all the messages here. Sooner or

[issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted

2018-10-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: (tzickel, sorry for mistyping your handle :-/) -- ___ Python tracker ___ ___ Python-bugs-list

[issue34874] Python 3.6.3 command script wrapped in single quotes produces NameError: name 'A' is not defined

2018-10-02 Thread Tim McDonough
New submission from Tim McDonough : I found an odd behavior that seems to be limited to Python 3.6.3. Python 3.6.3 command scripts seem to prefer wrapping in double quotes instead of single quotes. Here is an example of the error. $ echo -n '{"A":"a"}' | python3 -c 'import sys,json;

[issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted

2018-10-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks tzickler for the report and pull request, and sorry for the delay. This is now fixed in all 3.x branches. I will close this now as multiprocessing in 2.7 diverges quite a bit from 3.x. If you want to fix the issue in 2.7 as well, please say so and

[issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted

2018-10-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset 07b96a95db78eff3557d1bfed1df9ebecc40815b by Antoine Pitrou (Miss Islington (bot)) in branch '3.6': bpo-34172: multiprocessing.Pool leaks resources after being deleted (GH-8450) (GH-9677)

[issue34873] re.finditer behaviour in re.MULTILINE mode fails to match first 7 characters

2018-10-02 Thread Tom Dawes
Tom Dawes added the comment: Please ignore, re.finditer and REGEX.finditer aren't the same. I was passing re.MULTILINE (= 8) to endPos. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue34873] re.finditer behaviour in re.MULTILINE mode fails to match first 7 characters

2018-10-02 Thread Tom Dawes
New submission from Tom Dawes : re.finditer appears to fail to match within the first 7 characters in a string when re.MULTILINE is used: >>> REGEX = re.compile("y") >>> [list(m.start() for m in REGEX.finditer("{}y".format("x"*i), re.MULTILINE)) >>> for i in range(10)] [[], [], [], [], [],

Re: So apparently I've been banned from this list

2018-10-02 Thread Mark Lawrence
On 02/10/18 19:11, Roel Schroeven wrote: Jon Ribbens schreef op 2/10/2018 om 1:20: On 2018-10-01, Roel Schroeven wrote: I'm not very active here, but I've been lurking for years. In my eyes Steven has always been active and helpful. Now he has *once* been a *tiny bit* rude, and he's banned

[issue34751] Hash collisions for tuples

2018-10-02 Thread Tim Peters
Tim Peters added the comment: >> For that reason, I've only been looking at those that >> scored 10 (best possible) on Appleby's SMHasher[1] test suite > Do you have a list of such hash functions? A world of searching. The ones rated "Excellent" here (previously cited) for a start:

[issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted

2018-10-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset 97f998a4dfd6db6d867f446daa62445d0782bf39 by Antoine Pitrou (Miss Islington (bot)) in branch '3.7': bpo-34172: multiprocessing.Pool leaks resources after being deleted (GH-8450) (GH-9676)

[issue34751] Hash collisions for tuples

2018-10-02 Thread Tim Peters
Tim Peters added the comment: >> I've noted before, e.g., that sticking to a prime >> eliminates a world of regular bit patterns in the >> multiplier. > Why do you think this? 0x1fff is prime :-) Point taken ;-) But "a world of" is not the same as "the universe". For example,

[issue34751] Hash collisions for tuples

2018-10-02 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > For that reason, I've only been looking at those that scored 10 (best > possible) on Appleby's SMHasher[1] test suite Do you have a list of such hash functions? -- ___ Python tracker

[issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted

2018-10-02 Thread miss-islington
Change by miss-islington : -- pull_requests: +9064 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34751] Hash collisions for tuples

2018-10-02 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: >>> from itertools import product >>> len(set(map(hash, product([0.5, 0.25], repeat=20 32 Good catch! Would you like me to add this to the testsuite? -- ___ Python tracker

[issue34751] Hash collisions for tuples

2018-10-02 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > For that reason, I've only been looking at those that scored 10 (best > possible) on Appleby's SMHasher[1] test suite, which is used by everyone who > does recognized work in this field. So it seems that this SMHasher test suite doesn't catch the problem

[issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted

2018-10-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset 97bfe8d3ebb0a54c8798f57555cb4152f9b2e1d0 by Antoine Pitrou (tzickel) in branch 'master': bpo-34172: multiprocessing.Pool leaks resources after being deleted (GH-8450)

Program to find Primes of the form prime(n+2) * prime(n+1) - prime(n) +- 1.

2018-10-02 Thread Musatov
Primes of the form prime(n+2) * prime(n+1) - prime(n) +- 1. DATA 31, 71, 73, 137, 211, 311, 419, 421, 647, 877, 1117, 1487, 1979, 2447, 3079, 3547, 4027, 7307, 7309, 12211, 14243, 18911, 18913, 23557, 25439, 28729, 36683, 37831, 46853, 50411, 53129, 55457, 57367, 60251, 67339,

[issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted

2018-10-02 Thread miss-islington
Change by miss-islington : -- pull_requests: +9065 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34751] Hash collisions for tuples

2018-10-02 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > I've noted before, e.g., that sticking to a prime eliminates a world of > regular bit patterns in the multiplier. Why do you think this? 0x1fff is prime :-) Having regular bit patterns and being prime are independent properties. To be clear:

[issue34313] IDLE crashes with Tk-related error on macOS with ActiveTcl 8.6

2018-10-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: Current Mac installers do contain hopefully tested tcl/tk installers. (This has always been true for the Windows installers.) We are not responsible if users use anything else with Python. -- ___ Python tracker

[issue34711] Fix test_httpservers on AIX (trailingSlashOK)

2018-10-02 Thread Eryk Sun
Eryk Sun added the comment: > I confirm that in a junction point This path-parsing bug that strips a trailing slash occurs when a traversed directory is a reparse point, such as a mount-point (junction) or directory symbolic link. It may be limited to just the NTFS and ReFS file-system

[issue34313] IDLE crashes with Tk-related error on macOS with ActiveTcl 8.6

2018-10-02 Thread Vlad Tudorache
Vlad Tudorache added the comment: @terry.reedy Maybe "users are urged to install the most recent bug-fix releases" is a little bit misleading. As I wrote, Tcl/Tk 8.5.18 does not give crashes on macOS, when both 8.5.17 and 8.5.19 (bug-fix) do. Some times ago, if I remember well, the same

[issue34872] investigate task/future cancellation in asynciomodule.c

2018-10-02 Thread Vladimir Matveev
Change by Vladimir Matveev : -- nosy: +v2m ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34711] Fix test_httpservers on AIX (trailingSlashOK)

2018-10-02 Thread Michael Felt
Michael Felt added the comment: Changed the title to reflect the requested change is only in Tests. -- components: -IO title: return ENOTDIR when open() accepts filenames with a trailing slash -> Fix test_httpservers on AIX (trailingSlashOK) ___

Re: Creating Win .exe file from *.py on Linux

2018-10-02 Thread Grant Edwards
On 2018-10-02, John Doe wrote: > Hello World > > Is it possible to create on Linux win .exe file from *.py file? Yes... if you run on Linux a VM instance that's running Windows? -- Grant Edwards grant.b.edwardsYow! Do you guys know we at

Creating Win .exe file from *.py on Linux

2018-10-02 Thread John Doe
Hello World Is it possible to create on Linux win .exe file from *.py file? -- https://mail.python.org/mailman/listinfo/python-list

[issue34751] Hash collisions for tuples

2018-10-02 Thread Tim Peters
Tim Peters added the comment: > If we, e.g., tested tuples of little floats instead ... Speaking of which: >>> from itertools import product >>> len(set(map(hash, product([0.5, 0.25], repeat=20 32 32 hash codes out of 1048576 distinct two-tuples isn't exactly confidence-inspiring

Re: python not working on RHEL6

2018-10-02 Thread Chris Angelico
On Wed, Oct 3, 2018 at 5:17 AM Thomas Jollans wrote: > > On 02/10/2018 19:22, Dan Purgert wrote: > > Thomas Jollans wrote: > >> [...] (preferably, not in /usr - that's for OS-installed files only. > >> /usr/local is a nice place to put things you installed from source). > > > > While I agree that

[issue34872] investigate task/future cancellation in asynciomodule.c

2018-10-02 Thread Yury Selivanov
Yury Selivanov added the comment: Elvis, please take a look at this. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue34872] investigate task/future cancellation in asynciomodule.c

2018-10-02 Thread Yury Selivanov
New submission from Yury Selivanov : Vladimir Matveev has discovered that C and Python implementation of asyncio.Task diverge: * asynciomodule.c: https://github.com/python/cpython/blob/9012a0fb4c4ec1afef9efb9fdb0964554ea17983/Modules/_asynciomodule.c#L2716 * tasks.py:

[issue20504] cgi.FieldStorage, multipart, missing Content-Length

2018-10-02 Thread Paul Goins (work)
Paul Goins (work) added the comment: I'm just going to ping on this issue. It looks like this has just slipped off the radar. I've seen the last diff and the code review, but it seems that this just needs some final follow-up on the code review comments, no? I could easily do the final

Re: python not working on RHEL6

2018-10-02 Thread Thomas Jollans
On 02/10/2018 19:22, Dan Purgert wrote: Thomas Jollans wrote: [...] (preferably, not in /usr - that's for OS-installed files only. /usr/local is a nice place to put things you installed from source). While I agree that /usr(/bin) is incorrect, I believe that "for OS-installed files only" is

[issue34751] Hash collisions for tuples

2018-10-02 Thread Tim Peters
Tim Peters added the comment: > So my suggestion remains > > for y in INPUT: >t = hash(y) >t ^= t * SOME_LARGE_EVEN_NUMBER >h ^= t >h *= MULTIPLIER On the face of it, I'd be amazed if that passed SMHasher, because it only propagates bits "to the left". All hashes that score

[issue34751] Hash collisions for tuples

2018-10-02 Thread Tim Peters
Tim Peters added the comment: >> the author wants this transformation to be easily >> invertible, so a prime is necessary > A multiplication by any odd number modulo 2**64 is > invertible. Right! My mistake. > As I argued before, the concept of primes is > meaningless (except for the

[issue34751] Hash collisions for tuples

2018-10-02 Thread Tim Peters
Tim Peters added the comment: A meta-comment: a great deal of work has been done on non-crypto hashes in recent years. I'm not interested in rolling our own if one of the "winners" from that process can be adapted. For that reason, I've only been looking at those that scored 10 (best

[issue34711] return ENOTDIR when open() accepts filenames with a trailing slash

2018-10-02 Thread Michael Felt
Change by Michael Felt : -- pull_requests: +9063 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

Re: So apparently I've been banned from this list

2018-10-02 Thread Roel Schroeven
Jon Ribbens schreef op 2/10/2018 om 1:20: On 2018-10-01, Roel Schroeven wrote: I'm not very active here, but I've been lurking for years. In my eyes Steven has always been active and helpful. Now he has *once* been a *tiny bit* rude, and he's banned for that? It's not "once", it's a

[issue34728] deprecate *loop* argument for asyncio.sleep

2018-10-02 Thread Yury Selivanov
Yury Selivanov added the comment: [victor] > Why does it not make sense to pass the loop to sleep? "it makes no sense > anymore" something changes? [andrew] `loop` argument passed to sleep should be always the same as returned from `get_running_loop()`. What Andrew said. Basically, it

Re: Querying MariaDB from python

2018-10-02 Thread Thomas Jollans
On 2018-10-02 18:07, Tony van der Hoff wrote: > On 02/10/18 16:47, Ervin Hegedüs wrote: >> hi, >> >> now rows will looks like this: >> ({'id':...,...},{'id':...,}...) > > Thanks Ervin, but: > >cursor = cnx.cursor(pymysql.cursors.DictCursor) > NameError: name 'pymysql' is not defined > > I

[issue34728] deprecate *loop* argument for asyncio.sleep

2018-10-02 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset 9012a0fb4c4ec1afef9efb9fdb0964554ea17983 by Yury Selivanov in branch 'master': bpo-34728: Fix asyncio tests to run under "-Werror" (GH-9661) https://github.com/python/cpython/commit/9012a0fb4c4ec1afef9efb9fdb0964554ea17983 --

[issue34871] test_site fails if run after test_inspect

2018-10-02 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +yselivanov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34711] return ENOTDIR when open() accepts filenames with a trailing slash

2018-10-02 Thread Michael Felt
Michael Felt added the comment: On 10/2/2018 7:36 PM, Michael Felt wrote: > Python is designed as a thin wrapper to the operating system. IMHO Python > must not validate the filename itself. To shorten the discussion, I'll kill the current PR and just modify the test to skip the trailing

Re: Replacing : with "${" at the beginning of the word and adding "}" at the end of the word

2018-10-02 Thread MRAB
On 2018-10-02 14:04, zljubi...@gmail.com wrote: I have to execute the same sql in two different programs. Each of them marks parameters differently. Anyway, I have found the solution. cnv_sel = re.sub(r"(:(.+?)\b)", r"${\2}", sel) A slightly better solution would be: cnv_sel =

[issue34711] return ENOTDIR when open() accepts filenames with a trailing slash

2018-10-02 Thread Michael Felt
Michael Felt added the comment: Was not my intent. Firewall issues. After 4 more attempts gave up until now. On 10/2/2018 3:17 PM, STINNER Victor wrote: > STINNER Victor added the comment: > >> 2018-10-02 11:02:32 Michael.Feltset files: + mime-attachment, >> encrypted.asc > You

[issue34711] return ENOTDIR when open() accepts filenames with a trailing slash

2018-10-02 Thread Michael Felt
Michael Felt added the comment: On 10/2/2018 10:36 AM, STINNER Victor wrote: > STINNER Victor added the comment: > > Jeremy Kloth: "This is also an issue on Windows when the target path resides > within a junction, paths outside of a junction respond (err, fail) as > expected." >

[issue34711] return ENOTDIR when open() accepts filenames with a trailing slash

2018-10-02 Thread Michael Felt
Michael Felt added the comment: Final attempt to send as plain text On 10/2/2018 1:07 AM, Benjamin Peterson wrote: > On Mon, Oct 1, 2018, at 12:12, Michael Felt wrote: >> Hi all, >> >> Before I submit a patch to increase the default MAXDATA setting for AIX >> when in 32-bit mode - I want to

Re: python not working on RHEL6

2018-10-02 Thread Dan Purgert
Thomas Jollans wrote: > [...] (preferably, not in /usr - that's for OS-installed files only. > /usr/local is a nice place to put things you installed from source). While I agree that /usr(/bin) is incorrect, I believe that "for OS-installed files only" is taking it a bit far. My (admittedly,

Re: This thread is closed [an actual new thread]

2018-10-02 Thread Ethan Furman
On 10/02/2018 03:46 AM, Rhodri James wrote: On 02/10/18 01:02, Ethan Furman wrote: It should be interpreted as: - No further discussion should take place on this thread. - I've done what I can with the primitive tools at hand to block    any further discussion. - Continued considerate posts

Re: Question about Multi-processing

2018-10-02 Thread Chris Angelico
On Wed, Oct 3, 2018 at 2:13 AM Anthony Flury via Python-list wrote: > I continued to read the documentation and came to this quote : > > /Functionality within this package requires that the > //|__main__|//module be importable by the children. This is covered > in //Programming

[issue34843] logging cookbook docs: remove 'recent' when referring to multiprocessing

2018-10-02 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[SOLVED] Re: Querying MariaDB from python

2018-10-02 Thread Tony van der Hoff
On 02/10/18 17:13, Larry Martell wrote: > On Tue, Oct 2, 2018 at 12:09 PM Tony van der Hoff > wrote: >> >> On 02/10/18 16:47, Ervin Hegedüs wrote: >>> hi, >>> >>> now rows will looks like this: >>> ({'id':...,...},{'id':...,}...) >> >> Thanks Ervin, but: >> >>cursor =

Re: Querying MariaDB from python

2018-10-02 Thread Ervin Hegedüs
Hi Tony, On Tue, Oct 02, 2018 at 05:07:38PM +0100, Tony van der Hoff wrote: > On 02/10/18 16:47, Ervin Hegedüs wrote: > > hi, > > > > now rows will looks like this: > > ({'id':...,...},{'id':...,}...) > > Thanks Ervin, but: > >cursor = cnx.cursor(pymysql.cursors.DictCursor) > NameError:

Re: Querying MariaDB from python

2018-10-02 Thread Larry Martell
On Tue, Oct 2, 2018 at 12:09 PM Tony van der Hoff wrote: > > On 02/10/18 16:47, Ervin Hegedüs wrote: > > hi, > > > > now rows will looks like this: > > ({'id':...,...},{'id':...,}...) > > Thanks Ervin, but: > >cursor = cnx.cursor(pymysql.cursors.DictCursor) > NameError: name 'pymysql' is not

Question about Multi-processing

2018-10-02 Thread Anthony Flury via Python-list
I decided to spend this morning to get my head around multi-processing, and decided to try to experiment initially in the command line interpreter, using the Python 3 documentation I fired up

Re: Querying MariaDB from python

2018-10-02 Thread Tony van der Hoff
On 02/10/18 16:47, Ervin Hegedüs wrote: > hi, > > now rows will looks like this: > ({'id':...,...},{'id':...,}...) Thanks Ervin, but: cursor = cnx.cursor(pymysql.cursors.DictCursor) NameError: name 'pymysql' is not defined I have been using the mysql.connector module, which seems to be the

[issue34871] test_site fails if run after test_inspect

2018-10-02 Thread Chih-Hsuan Yen
Chih-Hsuan Yen added the comment: Thanks very much for the test.bisect hint! After some more trials, I guess it's an issue in the `inspect` module rather than the newly-added test in test_site. Here's an example script: import inspect import sys import _testcapi builtin =

[issue34784] Heap-allocated StructSequences

2018-10-02 Thread Eddie Elizondo
Change by Eddie Elizondo : -- pull_requests: +9062 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

Re: Querying MariaDB from python

2018-10-02 Thread Tony van der Hoff
On 02/10/18 16:37, Larry Martell wrote: > On Tue, Oct 2, 2018 at 11:34 AM Tony van der Hoff > wrote: >>I would have expected the connector to be able to return a >> dictionary. >> >> Can anyone suggest a better way of doing this? > >

Re: How to change '\\' to '\'

2018-10-02 Thread Michael Torrie
On 10/02/2018 12:48 AM, Ethan Furman wrote: > Even for two-person, private email discussions I prefer the interleaved > replies -- in a week when I have to remind myself what was discussed it > is much easier to comprehend. Absolutely. I've been saved from embarrassment countless times because

Re: Querying MariaDB from python

2018-10-02 Thread Ervin Hegedüs
hi, On Tue, Oct 02, 2018 at 04:14:45PM +0100, Tony van der Hoff wrote: > I'm writing a database application, in python 3,5 under Debian9. > > My code: > >     def get_albums(self, parent_id = 0 ): >     cursor = self.cnx.cursor() cursor =

Re: Querying MariaDB from python

2018-10-02 Thread Larry Martell
On Tue, Oct 2, 2018 at 11:34 AM Tony van der Hoff wrote: > > I'm writing a database application, in python 3,5 under Debian9. > > My code: > > def get_albums(self, parent_id = 0 ): > cursor = self.cnx.cursor() > sql =( "select" > "id" > ",

Querying MariaDB from python

2018-10-02 Thread Tony van der Hoff
I'm writing a database application, in python 3,5 under Debian9. My code:     def get_albums(self, parent_id = 0 ):     cursor = self.cnx.cursor()     sql =(  "select"     "    id"     ",   parent_id"     ",   title"     ",   ifnull(

Re: How to achieve pyc only deployment for module in python3.6

2018-10-02 Thread Michael F. Stemper
On 2018-10-02 00:41, Chris Angelico wrote: > On Tue, Oct 2, 2018 at 12:01 PM Chandana Pattanayak > wrote: >> I have a requirement to provide basic code protection for a module in our >> product suite. With python 3.6 the .pyc files are created under pycache , >> so if i remove the py file the

[issue34871] test_site fails if run after test_inspect

2018-10-02 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: The failing test was added with d4c76d960b8b286b75c933780416ace9cda682fd commit d4c76d960b8b286b75c933780416ace9cda682fd Author: INADA Naoki Date: Mon Oct 1 21:10:37 2018 +0900 bpo-30167: Add test for module.__cached__ is None (GH-7617)

[issue34871] test_site fails if run after test_inspect

2018-10-02 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

Re: python not working on RHEL6

2018-10-02 Thread Thomas Jollans
On 2018-10-02 15:59, mchathuran...@gmail.com wrote: > Hi All, > > I'm a beginner on this. I was trying to install a new python version which is > 2.7.5. My OS(RHEL6) had already installed version 2.6. so I downloaded the > tar and unzipped it then executed > > ./configure --prefix=/usr

  1   2   >