Re: Another security question

2016-12-23 Thread Chris Angelico
On Sat, Dec 24, 2016 at 6:18 PM, Paul Rubin wrote: > Chris Angelico writes: >> Solution: Don't use dictionary-attackable passwords. > > If you allow people to choose their own passwords, they'll too-often > pick dictionary-attackable ones; or even if

[issue29061] secrets.randbelow(-1) hangs

2016-12-23 Thread Ned Deily
Changes by Ned Deily : -- nosy: +rhettinger, steven.daprano priority: normal -> high stage: -> needs patch versions: +Python 3.7 ___ Python tracker

Re: Another security question

2016-12-23 Thread Paul Rubin
Chris Angelico writes: > Solution: Don't use dictionary-attackable passwords. If you allow people to choose their own passwords, they'll too-often pick dictionary-attackable ones; or even if they choose difficult ones, they'll use them in more than one place, and eventually

[issue28971] nntplib is broken when responses are longer than _MAXLINE

2016-12-23 Thread Martin Panter
Changes by Martin Panter : Added file: http://bugs.python.org/file46020/max_over_line.patch ___ Python tracker ___

[issue28971] nntplib is broken when responses are longer than _MAXLINE

2016-12-23 Thread Martin Panter
Changes by Martin Panter : Removed file: http://bugs.python.org/file46019/max_over_line.patch ___ Python tracker ___

[issue28971] nntplib is broken when responses are longer than _MAXLINE

2016-12-23 Thread Martin Panter
Martin Panter added the comment: Max_over_line.patch is my attempt: Keep the original _MAXLINES = 2048 code, but override it with _MAX_OVER_LINE = 64000 when reading OVER response lines. I also added a test case. -- Added file: http://bugs.python.org/file46019/max_over_line.patch

[issue29061] secrets.randbelow(-1) hangs

2016-12-23 Thread Brian Nenninger
New submission from Brian Nenninger: secrets.randbelow(-1) causes the interpreter to hang. It should presumably raise an exception like secrets.randbelow(0) does. This is on Mac OS X 10.11.6, shell transcript below. = $ python3 Python

[issue29060] Changing the installation location still adds AppData filepaths that do not exist to the path variable on Windows 10

2016-12-23 Thread Steve Dower
Steve Dower added the comment: You should have a set of log files in your %TEMP% directory. Could you zip them up and attach to this issue? That should show whether the installer got confused about something. Note that if you install the launcher but not for all users (the other check box on

[issue10740] sqlite3 module breaks transactions and potentially corrupts data

2016-12-23 Thread R. David Murray
R. David Murray added the comment: Please open a new issue for this request. -- ___ Python tracker ___ ___

[issue29057] Compiler failure on Mac OS X - sys/random.h

2016-12-23 Thread Benjamin Peterson
Benjamin Peterson added the comment: So, if sys/random.h can't be included without error why does the configure check for it work? -- ___ Python tracker

[issue10740] sqlite3 module breaks transactions and potentially corrupts data

2016-12-23 Thread Carl George
Carl George added the comment: While attempting to build a Python 3.6 RPM for RHEL/CentOS 6, I noticed the following warning. *** WARNING: renaming "_sqlite3" since importing it failed: build/lib.linux-i686-3.6-pydebug/_sqlite3.cpython-36dm-i386-linux-gnu.so: undefined symbol:

[issue15795] Zipfile.extractall does not preserve file permissions

2016-12-23 Thread Karen Tracey
Karen Tracey added the comment: Note the zipfile being processed may have been created on a non-Unix system, and the external_attr value can't be usefully interpreted as permission bits when the value at _CD_CREATE_SYSTEM (https://hg.python.org/cpython/file/default/Lib/zipfile.py#l107) in the

[issue29060] Changing the installation location still adds AppData filepaths that do not exist to the path variable on Windows 10

2016-12-23 Thread Zachary Ware
Changes by Zachary Ware : -- assignee: -> steve.dower components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker

[issue29060] Changing the installation location still adds AppData filepaths that do not exist to the path variable on Windows 10

2016-12-23 Thread Daz
Daz added the comment: New to python issue tracking; prone to ignorance. I'm on Windows 10. I noticed after checking to add Python to my path variable and then changing the location from AppData's directory that after the installation, the filepaths associated with AppData were added to the

[issue29060] Changing the installation location still adds AppData filepaths that do not exist to the path variable on Windows 10

2016-12-23 Thread Daz
New submission from Daz: New to python issue tracking; prone to ignorance. I'm on Windows 10. I noticed after checking to add Python to my path variable and then changing the location from AppData's directory that after the installation, the filepaths associated with AppData were added to the

[issue19756] test_nntplib: sporadic failures, network isses? server down?

2016-12-23 Thread Martin Panter
Martin Panter added the comment: Multi-connect.patch is a smaller patch that changes setUpClass() → setUp(), so that each test method creates a new NNTP connection. The downside is all the reconnecting slows the test execution from 42 s down to 115 s, which is why I would like to move the

[issue29053] Implement >From_ decoding on input from mbox

2016-12-23 Thread bpoaugust
bpoaugust added the comment: Attached please find patch which works for me. To use it independently of email, do something like: messages = mailbox.mbox(filename, MboxoFactory) where: class MboxoFactory(mailbox.mboxMessage): def __init__(self, message=None):

Re: Multiprocessing queues receiving from wrong process

2016-12-23 Thread MRAB
On 2016-12-24 01:17, Charles Hixson wrote: On 12/23/2016 01:56 PM, Charles Hixson wrote: I was looking to avoid using a upd connection to transfer messages between processes, so I thought I'd use multiprocessing (which I expect would be faster), but...I sure would appreciate an explanation of

Re: Another security question

2016-12-23 Thread Chris Angelico
On Sat, Dec 24, 2016 at 12:32 PM, Steve D'Aprano wrote: > not to mention the abomination of "one factor authentication, twice", like > that used by the Australian government unified web portal. To log in, you > have to provide something you know (username and

Re: Another security question

2016-12-23 Thread Steve D'Aprano
On Sat, 24 Dec 2016 11:20 am, Paul Rubin wrote: > What is it that you are trying to secure?  If it's something important, > set up 2-factor authentication (such as TOTP) and encourage your users > to use it. You say that as if two-factor auth was a panacea. That's the sort of thinking that

[issue29059] Windows: Python not using ANSI compatible console

2016-12-23 Thread Joseph Hackman
New submission from Joseph Hackman: On windows, Python does not request that Windows enable VT100 for console output for Python. That is to say that ANSI codes such as \033[91m will function on Mac and Linux Pythons, but not Windows. As there is no good interface in core Python to the

Re: Another security question

2016-12-23 Thread Chris Angelico
On Sat, Dec 24, 2016 at 11:20 AM, Paul Rubin wrote: > The basic problem is those functions are fast enough to make dictionary > attacks feasible. The preferred password hashing function these days is > Argon2, which has some tunable security parameters: Solution: Don't

[issue29054] pty.py: pty.spawn hangs after client disconnect over nc (netcat)

2016-12-23 Thread Martin Panter
Martin Panter added the comment: This is a change in behaviour of the _copy() loop: it will stop as soon as EOF is read from the parent’s input, and immediately close the terminal master. Unpatched, the loop continues to read output from the child, until the child closes the terminal slave.

Re: Multiprocessing queues receiving from wrong process

2016-12-23 Thread Charles Hixson
On 12/23/2016 01:56 PM, Charles Hixson wrote: I was looking to avoid using a upd connection to transfer messages between processes, so I thought I'd use multiprocessing (which I expect would be faster), but...I sure would appreciate an explanation of this problem. When I run the code

Re: Another security question

2016-12-23 Thread Paul Rubin
> "Salted hashing (or just hashing) with BLAKE2 or any other > general-purpose cryptographic hash function, such as SHA-256, is not > suitable for hashing passwords. See BLAKE2 FAQ for more information." > > I propose to ignore this warning. I feel that, for my purposes, the > above procedure is

[issue23903] Generate PC/python3.def by scraping headers

2016-12-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue29058. -- ___ Python tracker ___ ___ Python-bugs-list

[issue29058] Mark new limited C API

2016-12-23 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Functions added to a limited API after 3.2 should be available only when Py_LIMITED_API is not defined or is set to corresponding hexadecimal Python version (e.g. 0x0305). Proposed patch makes following names available only for corresponding versions

[issue29057] Compiler failure on Mac OS X - sys/random.h

2016-12-23 Thread Christian Heimes
Changes by Christian Heimes : -- nosy: +christian.heimes ___ Python tracker ___ ___

[issue29054] pty.py: pty.spawn hangs after client disconnect over nc (netcat)

2016-12-23 Thread Cornelius Diekmann
Cornelius Diekmann added the comment: Make review tool happy by giving it less broken patch format :) `make patchcheck` is already happy. Sorry for the noise :( -- Added file: http://bugs.python.org/file46015/pty_and_tests.patch ___ Python tracker

[issue28968] xml rpc server fails with connection reset by peer error no 104

2016-12-23 Thread Martin Panter
Martin Panter added the comment: Python 2.6 is quite old and doesn’t even receive security patches any more as far as I know. I would start by trying 2.7, or failing that, try backporting the changes from Issue 6267. My guess is this is related to persistent HTTP connections being dropped. I

[issue29057] Compiler failure on Mac OS X - sys/random.h

2016-12-23 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___

[issue23903] Generate PC/python3.def by scraping headers

2016-12-23 Thread Steve Dower
Steve Dower added the comment: Good call. I think I might actually replace the script with a build step that uses the C preprocessor to get all the names, then a script to generate the file. If someone who knows the POSIX build system can help out, we could generate a list on each build for

Re: data frame

2016-12-23 Thread Peter Otten
Val Krem via Python-list wrote: > Here is the first few lines of the data > > > s1.csv > size,w1,h1 > 512,214,26 > 123,250,34 > 234,124,25 > 334,213,43 Did you put these lines here using copy and paste? The fix below depends on the assumption that your data is more like size, w1, h1 512,

Re: Multiprocessing queues receiving from wrong process

2016-12-23 Thread MRAB
On 2016-12-23 21:56, Charles Hixson wrote: I was looking to avoid using a upd connection to transfer messages between processes, so I thought I'd use multiprocessing (which I expect would be faster), but...I sure would appreciate an explanation of this problem. When I run the code (below)

[issue28997] test_readline.test_nonascii fails on Android

2016-12-23 Thread Martin Panter
Martin Panter added the comment: The basic idea of your patch may be reasonable, but something is not right. Imagine the locale is something other than UTF-8. The input code will now contain mojibake print("\xC3\xAB"), although the decode() call will translate the result back to the expected

[issue28559] Unclear error message when raising wrong type of exceptions

2016-12-23 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___

[issue28702] Confusing error message when None used in expressions, eg. "'NoneType' object has no attribute 'foo'"

2016-12-23 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___

[issue29051] Improve error reporting involving f-strings (PEP 498)

2016-12-23 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___

[issue29054] pty.py: pty.spawn hangs after client disconnect over nc (netcat)

2016-12-23 Thread Cornelius Diekmann
Cornelius Diekmann added the comment: Review tool still did not show the test_pty.py file. Sry. -- Added file: http://bugs.python.org/file46013/pty.patch ___ Python tracker

Python 3.6 on Centos 6

2016-12-23 Thread thinkwell
I'm trying to build Python 3.6 on Centos 6, and am successful in doing so, except for the sqlite3 library. I started with a brand new install of Centos 6 and installed devtoolset-2 to build with a newer compiler. But whether with default compiler or 4.82, I get the following errors when

[issue29054] pty.py: pty.spawn hangs after client disconnect over nc (netcat)

2016-12-23 Thread Cornelius Diekmann
Cornelius Diekmann added the comment: Removed git patch header from pty.patch to make python code review tool happy. Sorry, this is my first contribution. -- Added file: http://bugs.python.org/file46012/pty.patch ___ Python tracker

Re: data frame

2016-12-23 Thread Val Krem via Python-list
Here is the first few lines of the data s1.csv size,w1,h1 512,214,26 123,250,34 234,124,25 334,213,43 and the script a=pd.read_csv("s1.csv", skipinitialspace=True).keys() print(a) i see the following Index(['size', 'w1', 'h1'], dtype='object') when I wanted to add the two columns;

Multiprocessing queues receiving from wrong process

2016-12-23 Thread Charles Hixson
I was looking to avoid using a upd connection to transfer messages between processes, so I thought I'd use multiprocessing (which I expect would be faster), but...I sure would appreciate an explanation of this problem. When I run the code (below) instead of messages receiving messages from

Re: data frame

2016-12-23 Thread Peter Otten
Val Krem via Python-list wrote: > Hi all, > > #!/usr/bin/env python > import sys > import csv > import numpy as np > import pandas as pd > > a= pd.read_csv("s1.csv") > print(a) > > size w1 h1 > 0 512 214 26 > 1 123 250 34 > 2 234 124 25 > 3 334 213 43 > 4 a45 223

Re: data frame

2016-12-23 Thread Chris Angelico
On Sat, Dec 24, 2016 at 7:39 AM, Val Krem via Python-list wrote: > a= pd.read_csv("s1.csv") > File "pandas/src/hashtable_class_helper.pxi", line 740, in > pandas.hashtable.PyObjectHashTable.get_item (pandas/hashtable.c:13107) > KeyError: 'w1' > > Can someone help me what

Re: US/Eastern offset

2016-12-23 Thread Chris Angelico
On Sat, Dec 24, 2016 at 6:51 AM, wrote: > On Thursday, December 22, 2016 at 5:57:42 PM UTC-8, Chris Angelico wrote: >> On Fri, Dec 23, 2016 at 12:54 PM, wrote: >> > Wouldn't most users prefer that modern time zones be the default >> > information returned by

[issue28695] Add SSL_CTX_set_client_cert_engine

2016-12-23 Thread Andrea Grandi
Andrea Grandi added the comment: What about using OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, NULL) instead of OPENSSL_config()? -- nosy: +Andrea Grandi ___ Python tracker

data frame

2016-12-23 Thread Val Krem via Python-list
Hi all, #!/usr/bin/env python import sys import csv import numpy as np import pandas as pd a= pd.read_csv("s1.csv") print(a) size w1 h1 0 512 214 26 1 123 250 34 2 234 124 25 3 334 213 43 4 a45 223 32 5 a12 214 26 I wanted to create a new column by adding the

[issue23903] Generate PC/python3.def by scraping headers

2016-12-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Reordered to make diffs easier for reviewing. -- Added file: http://bugs.python.org/file46011/python3def.patch ___ Python tracker

[issue23903] Generate PC/python3.def by scraping headers

2016-12-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9cb87e53e324 by Serhiy Storchaka in branch '3.5': Sort and remove duplicates from PC/python3.def (issue #23903). https://hg.python.org/cpython/rev/9cb87e53e324 New changeset 0927b5c80c50 by Serhiy Storchaka in branch '3.6': Sort and remove

Re: dateutil timezone question

2016-12-23 Thread Skip Montanaro
> I did mess around with pytz a bit but I was getting a lot of > exceptions - something related to the TZ already being set or > something like that. I don't recall exactly, and I can't scroll back > far enough to find it. Yes, if the tzinfo attribute has already been set, you will get errors

Re: US/Eastern offset

2016-12-23 Thread jladasky
On Thursday, December 22, 2016 at 5:57:42 PM UTC-8, Chris Angelico wrote: > On Fri, Dec 23, 2016 at 12:54 PM, wrote: > > Wouldn't most users prefer that modern time zones be the default > > information returned by pytz, instead of 150 year-old historical time zones? > > They're

Re: dateutil timezone question

2016-12-23 Thread Larry Martell
On Fri, Dec 23, 2016 at 2:27 PM, Skip Montanaro wrote: >> I need to compare these datetimes, and if I do that I get the dreaded >> "can't compare offset-naive and offset-aware datetimes" error. > > If you're sure the naive datetimes are UTC, this should work: > > import

[issue29057] Compiler failure on Mac OS X - sys/random.h

2016-12-23 Thread Pam McA'Nulty
Pam McA'Nulty added the comment: I will say that, though my fix seems to work, it feels that the "right" place to put the fix is in ./configure. Sadly, I don't speak './configure', though I apparently remember enough C from 17 years ago to get this working. --

[issue29054] pty.py: pty.spawn hangs after client disconnect over nc (netcat)

2016-12-23 Thread Cornelius Diekmann
Cornelius Diekmann added the comment: I wrote a proper patch for the issue of handling EOF in STDIN, including tests. My patch is against the github mirror head, but don't worry, the files I touch haven't been touched in recent years ;-) I only tested on Linux. My patch only addresses the

[issue14483] inspect.getsource fails to read a file of only comments

2016-12-23 Thread Pam McA'Nulty
Pam McA'Nulty added the comment: Yeah, I looked at the code and saw what you described, David. I think I'll see if there's a good place to mention this constraint in the docs and then I'll find another one (besides the macOS build issue I ran into when trying to build the latest master)

Re: dateutil timezone question

2016-12-23 Thread Larry Martell
On Fri, Dec 23, 2016 at 2:18 PM, Chris Angelico wrote: > On Sat, Dec 24, 2016 at 3:30 AM, Larry Martell > wrote: >> I have a datetime that looks like this: '2016-11-11T18:10:09-05:00' >> and when I pass it to dateutil.parser.parse I get back this: >>

Re: Metaclasses - magic functions

2016-12-23 Thread Mr. Wrobel
W dniu 23.12.2016 o 15:14, Ian Kelly pisze: (...) cls.added_in_init = 'test' Man, you are awsome genius! Finally somebody was able to explain me what is the power of __new__ and difference between __init__ !!! So what I wanted to achieve was adding some new attributes to the class

Re: US/Eastern offset

2016-12-23 Thread Skip Montanaro
Okay, problem solved. My thanks to Chris Barker over on the Anaconda group for help. (I originally thought there might be something amiss with the pytz package in Anaconda, as our older non-Anaconda Python seemed not to have the problem.) It turns out to be a problem I solved several years ago at

Re: dateutil timezone question

2016-12-23 Thread Skip Montanaro
> I need to compare these datetimes, and if I do that I get the dreaded > "can't compare offset-naive and offset-aware datetimes" error. If you're sure the naive datetimes are UTC, this should work: import pytz dt = pytz.utc.localize(dateutil.parser.parse('2016-04-27T00:00:00')) You can then

Re: Another security question

2016-12-23 Thread Chris Angelico
On Sat, Dec 24, 2016 at 3:58 AM, Steve D'Aprano wrote: > By the way, thanks for raising this interesting question! This is exactly > the sort of thing that the secrets module is supposed to make a "no > brainer", so I expect that it will get a password hash function.

[issue14483] inspect.getsource fails to read a file of only comments

2016-12-23 Thread R. David Murray
R. David Murray added the comment: Well, there's nobody being paid for keeping track of bugs and responding, so things do slip through the cracks. Pinging an issue after there's been a lack of response for a while is appropriate, if you notice it yourself :) (Mark, while he was trying to be

Re: dateutil timezone question

2016-12-23 Thread Chris Angelico
On Sat, Dec 24, 2016 at 3:30 AM, Larry Martell wrote: > I have a datetime that looks like this: '2016-11-11T18:10:09-05:00' > and when I pass it to dateutil.parser.parse I get back this: > > datetime.datetime(2016, 11, 11, 18, 10, 9, tzinfo=tzoffset(None, -18000)) > > And

[issue29057] Compiler failure on Mac OS X - sys/random.h

2016-12-23 Thread Ned Deily
Ned Deily added the comment: Argh! This is the third go-around on this problem, starting with the quick fix for macOS 10.12 in Issue28676 then on to Issue28932 where Benjamin added a more elaborate configure test when it broke OpenBSD, and now that causes builds on macOS versions earlier

[issue29056] logging.Formatter doesn't respect more than one formatException()

2016-12-23 Thread Dan Passaro
Dan Passaro added the comment: Working around this issue can be done by overriding format() in subclasses like so: def format(self, record): record.exc_text = '' try: return super().format(record) finally: record.exc_text = '' --

[issue14483] inspect.getsource fails to read a file of only comments

2016-12-23 Thread Pam McA'Nulty
Pam McA'Nulty added the comment: I just clicked "Random Issue" and it seemed to be an "easy" (ish) one - which is just what I'd like to tackle over xmas break :) -- ___ Python tracker

[issue29057] Compiler failure on Mac OS X - sys/random.h

2016-12-23 Thread Pam McA'Nulty
Pam McA'Nulty added the comment: OSX: 10.11.6 (15G1212) Xcode 8.2.1 Build version 8C1002 -- ___ Python tracker ___

[issue29057] Compiler failure on Mac OS X - sys/random.h

2016-12-23 Thread Pam McA'Nulty
Pam McA'Nulty added the comment: Patch for fix -- keywords: +patch Added file: http://bugs.python.org/file46009/Issue29057_random_include.patch ___ Python tracker

[issue23903] Generate PC/python3.def by scraping headers

2016-12-23 Thread Steve Dower
Steve Dower added the comment: > ast.h and node.h are private headers. You're right, these should be excluded (possibly from the release too?) I've been playing with the script in a separate context and I think I've hit a few issues (though I have made some modifications, so YMMV). It's

[issue29057] Compiler failure on Mac OS X - sys/random.h

2016-12-23 Thread Ned Deily
Ned Deily added the comment: Pam, what version of macOS / OS X did this fail on? -- ___ Python tracker ___

[issue29057] Compiler failure on Mac OS X - sys/random.h

2016-12-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +macOS nosy: +benjamin.peterson, mark.dickinson, ned.deily, rhettinger, ronaldoussoren ___ Python tracker

[issue29057] Compiler failure on Mac OS X - sys/random.h

2016-12-23 Thread Pam McA'Nulty
New submission from Pam McA'Nulty: make failed on Mac OS X including sys/random.h It looks to be caused by this commit: https://github.com/python/cpython/commit/1958527a2c5dda766b1917ab563622434b3dad0d Restoring the removed ifdefs solves the problem (see github PR) Official patch to follow

[issue29056] logging.Formatter doesn't respect more than one formatException()

2016-12-23 Thread Dan Passaro
New submission from Dan Passaro: If two formatters maintain the default implementation of Formatter.format(), but provide custom behavior for Formatter.formatException(), whichever formatException() is called first and returns something truthy is the only formatException() that is used. This is

[issue29026] time.time() documentation should mention UTC timezone

2016-12-23 Thread Eric Appelt
Eric Appelt added the comment: I had some checks performed on a Windows platform using the following snippet: # valid for 2016 import time def check(): t = time.gmtime() print(46*86400*365 + 11*86400 + (t.tm_yday-1)*86400 + t.tm_hour*3600 + t.tm_min*60 + t.tm_sec)

Re: Another security question

2016-12-23 Thread Steve D'Aprano
On Fri, 23 Dec 2016 10:08 pm, Frank Millman wrote: > "Steve D'Aprano" wrote in message > news:585d009f$0$1599$c3e8da3$54964...@news.astraweb.com... >> >> On Fri, 23 Dec 2016 09:19 pm, Frank Millman wrote: >> >> > >> > 3. Generate the password from the string supplied by the user as >> > follows

dateutil timezone question

2016-12-23 Thread Larry Martell
I have a datetime that looks like this: '2016-11-11T18:10:09-05:00' and when I pass it to dateutil.parser.parse I get back this: datetime.datetime(2016, 11, 11, 18, 10, 9, tzinfo=tzoffset(None, -18000)) And I have other datetimes like this: '2016-04-27T00:00:00', which went passed to

[issue29055] random.choice on empty sequence should hide previous exception [patch]

2016-12-23 Thread Josh Rosenberg
Josh Rosenberg added the comment: Seems reasonable to me. -- nosy: +josh.r ___ Python tracker ___ ___

[issue29026] time.time() documentation should mention UTC timezone

2016-12-23 Thread STINNER Victor
STINNER Victor added the comment: Another suggestion: mention localtime() and gmtime() in time() documentation to explain how to convert such timestamp to a more common date format. -- ___ Python tracker

[issue29055] random.choice on empty sequence should hide previous exception [patch]

2016-12-23 Thread then0rTh
New submission from then0rTh: Passing empty sequence to random.choice function leads to: Traceback (most recent call last): ... ValueError: number of bits must be greater than zero During handling of the above exception, another exception occurred: Traceback (most recent call last): ...

[issue14483] inspect.getsource fails to read a file of only comments

2016-12-23 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___

[issue29053] Implement >From_ decoding on input from mbox

2016-12-23 Thread R. David Murray
R. David Murray added the comment: Not easily. Making the feedparser more pluggable is on my wish list, but at this point someone would have to fund me for work on the email package before I'd be able to even clear the backlog to think about it :) I'd say accepting this as a new feature is a

[issue29053] Implement >From_ decoding on input from mbox

2016-12-23 Thread bpoaugust
bpoaugust added the comment: Is there any way to override the current behaviour? -- ___ Python tracker ___

[issue14483] inspect.getsource fails to read a file of only comments

2016-12-23 Thread Sean Grider
Sean Grider added the comment: I had forgotten all about this bug until I saw an email from Pam today. The appears to still be some delay. -- ___ Python tracker

[issue29054] pty.py: pty.spawn hangs after client disconnect over nc (netcat)

2016-12-23 Thread Cornelius Diekmann
New submission from Cornelius Diekmann: My OS: Debian GNU/Linux 8.6 (jessie) Python 3.4.2 pty.py from Python-3.5.2/Lib (pty.py is just a tiny, portable python file which did not see many changes) Bug Report Steps to Reproduce: I wrote a very simple python remote shell: #!/usr/bin/env

Re: Metaclasses - magic functions

2016-12-23 Thread Ian Kelly
On Fri, Dec 23, 2016 at 5:14 AM, Mr. Wrobel wrote: > Hi,thanx for answers, let's imagine that we want to add one class attribute > for newly created classess with using __init__ in metaclass, here's an > example: > > #!/usr/bin/env python > > class MetaClass(type): > #

[issue29053] Implement >From_ decoding on input from mbox

2016-12-23 Thread bpoaugust
New submission from bpoaugust: The email package implements mboxo From_ mangling on output by default. However there is no provision to unmangle >From_ on input. This means that it's not possible to import mboxo files correctly. -- components: email messages: 283879 nosy: barry,

[issue29051] Improve error reporting involving f-strings (PEP 498)

2016-12-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- dependencies: +Tracebacks should contain the first line of continuation lines ___ Python tracker

Re: Another security question

2016-12-23 Thread Frank Millman
"Chris Angelico" wrote in message news:captjjmpppgm+_ut_amtnb7vgo0vrgptu6iagyjqwvpxg5yp...@mail.gmail.com... On Fri, Dec 23, 2016 at 9:19 PM, Frank Millman wrote: > 3. Generate the password from the string supplied by the user as > follows - >from hashlib import

[issue29051] Improve error reporting involving f-strings (PEP 498)

2016-12-23 Thread R. David Murray
R. David Murray added the comment: These are not problems with f-strings in particular, they are problems in general with the way python parsing and error reporting happens. The second is presumably (I haven't gotten around to understanding how f-strings work under the hood) an example of

Re: Another security question

2016-12-23 Thread Ben Bacarisse
"Frank Millman" writes: > ... Here are my thoughts on improving this. > > 1. Generate a 'salt' for each password. There seem to be two ways in > the standard library to do this - >import os >salt = os.urandom(16) > >import secrets >salt =

[issue14483] inspect.getsource fails to read a file of only comments

2016-12-23 Thread Pam McA'Nulty
Changes by Pam McA'Nulty : -- nosy: +Pam.McANulty ___ Python tracker ___ ___

[issue29018] Misinformation when showing how slices work in The Tutorial

2016-12-23 Thread issuefinder
issuefinder added the comment: You seem to be right. Sorry about the incovenience. -- ___ Python tracker ___

Re: PLEASE READ - information on (Case 58158) [RELEASE] Python 3.6.0 is released!

2016-12-23 Thread NHS Digital - Digital Communications
Thank you for your email. Your web change 58158[RELEASE] Python 3.6.0 is released!request has been received and will be dealt with shortly. This service desk only covers minor changes to the legacy NHS Digital website (content.digital.nhs.uk) that are made on a web request form. For changes

RelStorage 2.0

2016-12-23 Thread Jason Madden
On behalf of the RelStorage contributors, I am pleased to announce the release of RelStorage 2.0. What Is It? === RelStorage is a scalable backend for ZODB (an object-oriented database for Python that provides transparent object persistence) that allows you to use MySQL, PostgreSQL or

not able to run python.exe file successsfully

2016-12-23 Thread MAHESH MISHRA
i have installed 3.5.2 version of python my system windows 8.1 64 bit. after successful installation it is not executing python.exe file.whenever i try a dialof box pop up with an error message "python has stopped working". i hav tried reinstalling it several times.please help --

Garbage collection problem with generators

2016-12-23 Thread Haochuan Guo
Hi, everyone I'm building a http long polling client for our company's discovery service and something weird happened in the following code: ```python while True: try: r = requests.get("url", stream=True, timeout=3) for data in r.iter_lines(): processing_data...

Re: [RELEASE] Python 3.6.0 is released!

2016-12-23 Thread Robin Becker
On 23/12/2016 10:34, Ned Deily wrote: On behalf of the Python development community and the Python 3.6 release team, I am pleased to announce the availability of Python 3.6.0. Python 3.6.0 is the newest major release of the Python language, and it contains many new features and optimizations.

[issue29052] Detect Windows platform 32bit/64bit automatically

2016-12-23 Thread Berker Peksag
Berker Peksag added the comment: Thanks, it looks like a reasonable request to me, but the issue tracker for python.org is located at https://github.com/python/pythondotorg/issues Please open a new issue there (or send a pull request) -- nosy: +berker.peksag resolution: -> third

[issue29052] Detect Windows platform 32bit/64bit automatically

2016-12-23 Thread Karsten Tinnefeld
New submission from Karsten Tinnefeld: When navigating https://www.python.org/ with a browser, in the main menu fly-out Downloads/Download for Windows it suggests to download the 32 bit version of the current 2.x and 3.x releases (leaving out the information that the buttons provide 32 bit

[issue29051] Improve error reporting involving f-strings (PEP 498)

2016-12-23 Thread Chi Hsuan Yen
New submission from Chi Hsuan Yen: Here are the two examples I found confusing when playing with f-strings. The first one involves with a NameError: $ cat test2 f''' { FOO } ''' $ python3.7m test2 Traceback (most recent call last): File "test2", line 5, in ''' NameError: name 'FOO' is

  1   2   >