[issue32021] Brotli encoding is not recognized by mimetypes

2017-11-13 Thread Andrey Klinger

New submission from Andrey Klinger :

Brotli (.br) encoding is not recognized by mimetypes module.
mimetypes doesn't have API for adding encodings.
The encoding is supported by most browsers: https://caniuse.com/#feat=brotli

--
components: Library (Lib)
messages: 306188
nosy: Andrey Klinger
priority: normal
severity: normal
status: open
title: Brotli encoding is not recognized by mimetypes
type: enhancement
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: ANN: obfuscate 0.2.2

2017-11-13 Thread Rick Johnson
On Monday, November 13, 2017 at 6:03:23 PM UTC-6, joshj...@gmail.com wrote:
> for importing obfuscate do we just type in import obfuscate
> or import obfuscate 0.2.2

Oh boy. I had forgotten about this little community "gem"
dating back to 2010. And unfortunately for comrade Steven,
there is no way to obfuscate this thread! Not even double
rot13 will help! :-))
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: from xx import yy

2017-11-13 Thread Rick Johnson
On Monday, November 13, 2017 at 10:59:06 AM UTC-6, bvdp wrote:

> Thanks all for confirming that I was wrong to use "from ..
> import".

In this case, but i wouldn't extrapolate that advice to mean
that the form `from X import Y` is _always_ bad. You just
need to understand the consequences of each unique form of
Python's import.

> Hmmm, perhaps for functions it might be okay. But,
> in most cases it's a lot more obvious to use
> module.function() when calling.
Well, again, i think you're over generalizing.

If the imported symbol is a "self-contained code object"
(aka: a function or a custom class, whether instanced or
not), or especially a "read-only variable", then `from mod
import x, y, z` won't typically cause any of these
surprises.

But of course, the previous paragraph only applies if i
understood your initial question "correctly". Meaning, in
the context of "your own personal expectations". My
understanding of those _expectations_ (aka: _your_
expectations), is that you assumed that by importing a
symbol (namely: `myvar`) into a "foreign module" (namely:
"test2.py") that such action would allow you to mutate the
_value_ of `myvar` from two distinct modules. But this is
not true. Because each module creates its own local
variables when names are imported. And that peculiarity is
directly related to Python's strange implementation of
global variables

(psst: which, in the next paragraph, you'll discover are not
really global at all!)

(but for now, let's keep that dirty little secret between
you and me, mmmkay?)

One important lesson to learn about Python is that it has no
"normally accepted" concept of "global variables". (meaning,
variables that are known to all scopes within a program). So
throw out everything you've ever know about global
variables.

Go ahead... We're waiting!

Sure, you can create a _real_ global variable in Python if
you were so inclined, but there is no "official support" for
doing such a thing, and it requires some esoteric knowledge
about how names are injected into module namespace by Python
itself. But, to unlock this knowledge, you'll first to
master the secret handshake and speakeasy a secret password.

"Officially" speaking, the most promiscuous naturally
occuring variable in a python program is what i call a
"Module Level Variable" (or MLV for short). MLVs are the
variables that are defined _outside_ of self-contained code
objects like functions and/or classes, and these are the
types of variables that require the use of the specialized
`global` keyword (at least, if one wishes to modify them
from inside a self-contained code object that is.)

So basically, what you were trying to do was to create a
global variable, a _real_ global variable that is, not the
fake and utterly confusing ones that Python implements,
nope, but a _real_, bonafide global variable that could be
mutated from inside multiple modules (or more generically,
multiple namespaces or scopes).

And i'm sorry, but you're not allowed to do that.

> Maybe a bit slower, but I'm sure it's negligible in most
> cases.  And, yes, I am trying to share state info between
> modules. Is this a bad thing? I guess I would write
> getter() and setter() functions for all this. But that does
> seem to remind me too much of some other language :)

I never write getters or setters unless i need functional
behavior during the reading or writing of an attribute. IOW,
if your getters and setters look like this:

# pseudo
some_value = "foo"

def get_value():
return some_value

def set_value(new):
some_value = value

...then you're wasting your time and that of those who are
forced to read the code. OTOH. If your getters and setters
can justify their existence like this:

# pseudo
some_value = "foo"

def get_value():
perform_some_test_or_action()
return some_value

def set_value(new):
perform_some_test_or_action()
some_value = new

Then it makes sense to use them. Sometimes the value needs
to be calculated; or updated; or type checked; or whatever.

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: matchpy

2017-11-13 Thread Rick Johnson
Chris Angelico wrote:
> Edward Montague wrote:
> > After successfully installing python 3.6.3 and the
> > appropriate version of IDLE , I attempted to run a matchpy
> > example , to no avail . I'm using a debian distribution ,
> > 8.x or greater , is there something I need to be aware of
> > . The error report points to a statement containing a ' ->
> > ' character , as far as I know , this isn't valid python
> > syntax .
> 
> It IS valid Python syntax (a function annotation). You'll
> need to give a lot more information for us to help you -
> preferably, a complete runnable example.

Or a full traceback message. 

PS: Looks as though type-hints may have claimed its first victim.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: ANN: obfuscate 0.2.2

2017-11-13 Thread joshjon2017
for importing obfuscate do we just type in import obfuscate or import obfuscate 
0.2.2
-- 
https://mail.python.org/mailman/listinfo/python-list


Time travel - how to simplify?

2017-11-13 Thread Andrew Z
well, yeah, it's unidirectional and final destination is always the same
and have little to do with the question.

Say, i have a dict:

fut_suffix ={ 1 : 'F',
  2 : 'G',
  3 : 'H',
  4 : 'J',
  5 : 'K',
  6 : 'M',
  7 : 'N',
  8 : 'Q',
  9 : 'U',
  10: 'V',
  11: 'X',
  12: 'Z'
  }

where key is a month.
Now i want to get certain number of months. Say, i need  3 months duration
starting from any month in dict.

so if i start @ 7th:
my_choice =7
 for mnth, value in fut_suffix:
if my_choice >= mnth
   # life is great
but if :
my_choice = 12 then my "time travel" becomes pain in the neck..

And as such - the question is - what is the smart way to deal with cases
like this?

Thank you
AZ
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Time travel - how to simplify?

2017-11-13 Thread Andrew Z
My implied solution is incorrect.


I should start with using the date type and, for example, dateutil package
for date manipulation and building the dictionary of needed dates/months.
And only after that, map against the fut_suffix.


On Tue, Nov 14, 2017 at 12:56 AM, Andrew Z  wrote:

> well, yeah, it's unidirectional and final destination is always the same
> and have little to do with the question.
>
> Say, i have a dict:
>
> fut_suffix ={ 1 : 'F',
>   2 : 'G',
>   3 : 'H',
>   4 : 'J',
>   5 : 'K',
>   6 : 'M',
>   7 : 'N',
>   8 : 'Q',
>   9 : 'U',
>   10: 'V',
>   11: 'X',
>   12: 'Z'
>   }
>
> where key is a month.
> Now i want to get certain number of months. Say, i need  3 months duration
> starting from any month in dict.
>
> so if i start @ 7th:
> my_choice =7
>  for mnth, value in fut_suffix:
> if my_choice >= mnth
># life is great
> but if :
> my_choice = 12 then my "time travel" becomes pain in the neck..
>
> And as such - the question is - what is the smart way to deal with cases
> like this?
>
> Thank you
> AZ
>
>
>
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue32020] arraymodule: Missing Py_DECREF in failure case of make_array()

2017-11-13 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Thank you for your contribution Mathew!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32020] arraymodule: Missing Py_DECREF in failure case of make_array()

2017-11-13 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32020] arraymodule: Missing Py_DECREF in failure case of make_array()

2017-11-13 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 18056fb11e6fe6e5247cd03073bd74df8ac0acc7 by Serhiy Storchaka 
(Miss Islington (bot)) in branch '3.6':
bpo-32020: arraymodule: Correct missing Py_DECREF in failure case of 
make_array() (GH-4391) (#4392)
https://github.com/python/cpython/commit/18056fb11e6fe6e5247cd03073bd74df8ac0acc7


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32012] Disallow ambiguous syntax f(x for x in [1],)

2017-11-13 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

The problem with these constructions is that they are not allowed by the Python 
language specification. It should be explicitly changed for allowing them. And 
this change should be accepted by Guido.

--
nosy: +gvanrossum

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32020] arraymodule: Missing Py_DECREF in failure case of make_array()

2017-11-13 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +4340

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32020] arraymodule: Missing Py_DECREF in failure case of make_array()

2017-11-13 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 56935a53b11b9a70f3e13e460777ec81a5b9195e by Serhiy Storchaka (Mat 
M) in branch 'master':
bpo-32020: arraymodule: Correct missing Py_DECREF in failure case of 
make_array() (#4391)
https://github.com/python/cpython/commit/56935a53b11b9a70f3e13e460777ec81a5b9195e


--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



for/ if against dict - one liner

2017-11-13 Thread Andrew Z
Hello,
 i wonder how do i get the "for" and "if" to work against a dictionary in
one line?

basically i want to "squeeze":
 dct= [ 1 : "one", 2:"two", 3:"three"]
 for k, val in dct:
   if k >= 2:
  # do magnificent things

Thank you
AZ
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue32020] arraymodule: Missing Py_DECREF in failure case of make_array()

2017-11-13 Thread Mathew M.

Change by Mathew M. :


--
keywords: +patch
pull_requests: +4339
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32020] arraymodule: Missing Py_DECREF in failure case of make_array()

2017-11-13 Thread Mathew M.

New submission from Mathew M. :

Similar to issue 32013, just in a different location.

For reference: 
https://github.com/python/cpython/blob/28b624825eb92cb8c96fbf8da267d8d14a61a841/Modules/arraymodule.c#L1932

--
components: Extension Modules
messages: 306183
nosy: Mathew M.
priority: normal
severity: normal
status: open
title: arraymodule: Missing Py_DECREF in failure case of make_array()
type: resource usage
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24294] DeprecationWarnings should be visible by default in the interactive REPL

2017-11-13 Thread Aaron Meurer

Aaron Meurer  added the comment:

If it's of any interest to this discussion, for SymPy (for some time) we have 
used a custom subclass of DeprecationWarning that we enable by default 
https://github.com/sympy/sympy/blob/master/sympy/utilities/exceptions.py. I 
don't know if there are major libraries that do something similar. 

Our reasoning is that we really do want everybody to see the warnings. 
Obviously direct users of SymPy (both interactive users and library developers) 
need to see them so they can fix their code. But also if library X uses a 
deprecated behavior and a user of library X sees a deprecation warning for 
SymPy inside of library X, that incentivises them to bug the library X 
developers to fix the behavior (or PR it). The whole point of warnings as we 
see it is to be as loud as possible while still keeping things working, to 
avoid the situation where things stop working (when the deprecated behavior is 
removed). 

And + to Nathaniel's point that 
DeprecationWarnings are about more than just the standard library. Tons of 
libraries use the built in warnings, and the default warnings behavior makes no 
distinction between warnings coming from the standard library and warnings 
coming from other places.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24294] DeprecationWarnings should be visible by default in the interactive REPL

2017-11-13 Thread Nick Coghlan

Nick Coghlan  added the comment:

I don't think anybody consistently does proper resource management in the REPL, 
so the trade-offs involved there are quite different from those for deprecation 
warnings.

Assuming PEP 565 gets accepted, we'll end up with once-per-session warnings for 
use of deprecated APIs (due to the REPL's perpetually reset line counter, as 
per issue 1539925), and that seems like a good level of notification to me (not 
too noisy, not so unobtrusive as to never be seen at all)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1539925] warnings in interactive sessions

2017-11-13 Thread Nick Coghlan

Nick Coghlan  added the comment:

As a user, what would I actually gain from being warned more than once per 
session that a particular API I'm using is deprecated?

If I want that behaviour, I can already opt in to it by doing 
"warnings.simplefilter('always')".

As things stand, the perpetually reset line counter just means that the 
effective default at the REPL is "warnings.simplefilter('module:::__main__')"

--
nosy: +ncoghlan

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32012] Disallow ambiguous syntax f(x for x in [1],)

2017-11-13 Thread Nick Coghlan

Nick Coghlan  added the comment:

In a function call, `f(x for x in iterable)` is roughly equivalent to 
`f(iter(iterable))`, not `f(*iterable)` (the genexp based equivalent of the 
latter would be ``f(*(x for x in iterable))`).

Thus the base class list is no different from any other argument list in this 
case - it's just that generator objects aren't valid base classes.

Getting back on topic for this particular bug fix though: as noted in my last 
PR review, I think the latest version goes too far by disallowing `@deco(x for 
x in iterable)` and `class C(x for x in iterable):`. While semantically 
questionable, there's nothing *syntactically* invalid about those - they pass a 
single generator expression, and that generator expression is correctly 
surrounded by parentheses. There's no more reason to prohibit a genexp in 
either of those situations at compile time than there is to prohibit a list 
comprehension.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31956] Add start and stop parameters to the array.index()

2017-11-13 Thread Anders Lorentsen

Anders Lorentsen  added the comment:

Writing my tests, I originally looked at Lib/test/seq_tests.py. One test case 
uses indexes that are (+-)4*sys.maxsize. This does not fit in Py_ssize_t, and 
so these tests cause my array implementation to raise an overflow exception.

A solution is of course to have the function take general objects instead, and 
then truncate them down to a number that can fit in Py_ssize_t if it's too 
negative or positive).

But I concur. It seems more reasonable to stay consistent with the rest of the 
module, too.

I'll look over the test code to make sure I test for every given scenario (or 
as many as I can think of), and prepare a PR for this, then :)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31963] AMD64 Debian PGO 3.x buildbot: compilation failed with an internal compiler error in create_edge

2017-11-13 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

Given this is gcc exploding, I'm not sure there is anything we can do about it. 
 I _believe_ we're doing everything right.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32019] Interactive shell doesn't work with readline bracketed paste

2017-11-13 Thread Aaron Meurer

New submission from Aaron Meurer :

Here are the steps to reproduce this:

- Compile and link Python against readline version 7.0 or higher.
- Add 

set enable-bracketed-paste on

to your ~/.inputrc

- Start python and paste the following two lines. Make sure to use a terminal 
emulator that supports bracketed paste (most modern ones do). You'll need to 
type enter after pasting the lines. 

a = 1
a


You get something like

>>> a = 1
a
  File "", line 1
a

^
SyntaxError: multiple statements found while compiling a single statement

It does work, however, if you paste something that has a newline but is a 
single statement, like

(1, 
2)

Fixing this in the right way might not be so easy, due to the way that 
compile('single') is over-engineered. A simple fix would be to disable 
bracketed paste in the Python shell. 

I tested this with Python 3.6.3. I was not able to get the git master to 
compile, so I couldn't test it there.

--
messages: 306176
nosy: Aaron.Meurer
priority: normal
severity: normal
status: open
title: Interactive shell doesn't work with readline bracketed paste

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



reStrcuturedText WYSIWYG online editor (was: Need some help with Python Job Board)

2017-11-13 Thread Ben Finney
Skip Montanaro  writes:

> Thanks, Justin. I imagine editors probably exist which can switch between
> WYSIWYG and markup.

The ‘rsted’ app  is a
reStructuredText WYSIWYG editor written in the Flask framework.

-- 
 \   “Remember: every member of your ‘target audience’ also owns a |
  `\   broadcasting station. These ‘targets’ can shoot back.” —Michael |
_o__)   Rathbun to advertisers, news.admin.net-abuse.email |
Ben Finney

-- 
https://mail.python.org/mailman/listinfo/python-list


[issue32018] inspect.signature does not respect PEP 8

2017-11-13 Thread R. David Murray

R. David Murray  added the comment:

Agreed.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32018] inspect.signature does not respect PEP 8

2017-11-13 Thread Guido van Rossum

Guido van Rossum  added the comment:

Those people who read and write annotations regularly are all using the 
convention that was added to PEP 8, so let's make inspect follow that lead 
rather than argue about it here. :-)

--
nosy: +gvanrossum

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31908] trace module cli does not write cover files

2017-11-13 Thread Michael Selik

Michael Selik  added the comment:

You're referring to something like this:

+def test_count_and_summary(self):
+name = TESTFN + '.py'
+with open(name, 'w') as fd:
+self.addCleanup(unlink, name)
+fd.write("""\
+x = 1
+y = 2
+
+def f():
+return x + y
+
+for i in range(10):
+f()
+""")
+status, stdout, stderr = assert_python_ok('-m', 'trace', '-cs', name)
+self.assertEqual(status, 0)
+self.assertIn(b'lines   cov%   module   (path)', stdout)
+self.assertIn(('6   100%%   %s   (%s)' % (TESTFN, name)).encode(), 
stdout)
+

?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31908] trace module cli does not write cover files

2017-11-13 Thread Michael Selik

Change by Michael Selik :


--
nosy: +selik

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32018] inspect.signature does not respect PEP 8

2017-11-13 Thread Eric V. Smith

Change by Eric V. Smith :


--
nosy: +eric.smith

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32018] inspect.signature does not respect PEP 8

2017-11-13 Thread R. David Murray

R. David Murray  added the comment:

FWIW, I find the version without the spaces to be more readable (but I don't 
find annotations to be readable in general, so my opinion may not be worth much 
:)

--
nosy: +r.david.murray

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32018] inspect.signature does not respect PEP 8

2017-11-13 Thread Ivan Levkivskyi

New submission from Ivan Levkivskyi :

The string representation of a function signature with annotations is currently 
like this:

>>> def __init__(self, x: int = 1, y: int = 2) -> None: pass
... 
>>> import inspect
>>> str(inspect.signature(__init__))
'(self, x:str=1, y:int=2) -> None'

At the same time PEP 8 says:

When combining an argument annotation with a default value, use spaces around 
the = sign (but only for those arguments that have both an annotation and a 
default).

Yes:

def munge(sep: AnyStr = None): ...
def munge(input: AnyStr, sep: AnyStr = None, limit=1000): ...

No:

def munge(input: AnyStr=None): ...
def munge(input: AnyStr, limit = 1000): ...

I think there should be spaces in the signature repr.

--
messages: 306171
nosy: levkivskyi, yselivanov
priority: normal
severity: normal
status: open
title: inspect.signature does not respect PEP 8
type: behavior
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16055] incorrect error text for int(base=1000, x='1')

2017-11-13 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +4338

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16055] incorrect error text for int(base=1000, x='1')

2017-11-13 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 28b624825eb92cb8c96fbf8da267d8d14a61a841 by Victor Stinner 
(Sanyam Khurana) in branch 'master':
bpo-16055: Fixes incorrect error text for int('1', base=1000) (#4376)
https://github.com/python/cpython/commit/28b624825eb92cb8c96fbf8da267d8d14a61a841


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31867] Duplicated keys in MIME type_map with different values

2017-11-13 Thread Henk-Jaap Wagenaar

Change by Henk-Jaap Wagenaar :


--
keywords: +patch
pull_requests: +4337
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32017] profile.Profile() has no method enable()

2017-11-13 Thread Antoine Pitrou

New submission from Antoine Pitrou :

The section here is wrong as it claims that API is common to profile and 
cProfile.

https://docs.python.org/3/library/profile.html#module-cProfile

--
assignee: docs@python
components: Documentation
messages: 306169
nosy: docs@python, eric.araujo, ezio.melotti, pitrou, willingc
priority: normal
severity: normal
status: open
title: profile.Profile() has no method enable()
type: behavior
versions: Python 3.6, Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Book recommendation for Spark/Pyspark?

2017-11-13 Thread Albert-Jan Roskam
Hi,


Can anybody recommend a good, preferably recent, book about Spark and Pyspark? 
I am using Pyspark now, but I am looking for a book that also gives a thorough 
background about Spark itself. I've been looking around on e.g. Amazon but, as 
the saying goes, one can't judge a book by its cover.


Thanks!


Albert-Jan
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue31979] Simplify converting non-ASCII strings to int, float and complex

2017-11-13 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Thank you for your review Victor.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31979] Simplify converting non-ASCII strings to int, float and complex

2017-11-13 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31979] Simplify converting non-ASCII strings to int, float and complex

2017-11-13 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 9b6c60cbce4ac45e8ccd7934babff465e9769509 by Serhiy Storchaka in 
branch 'master':
bpo-31979: Simplify transforming decimals to ASCII (#4336)
https://github.com/python/cpython/commit/9b6c60cbce4ac45e8ccd7934babff465e9769509


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31979] Simplify converting non-ASCII strings to int, float and complex

2017-11-13 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

As a side effect it slightly optimizes parsing non-ASCII numbers.

$ ./python -m perf timeit --compare-to=./python0  'int("۱۲۳۴۵۶۷۸۹")' 
--duplicate 100
python0: . 277 ns +- 3 ns
python: . 225 ns +- 3 ns

Mean +- std dev: [python0] 277 ns +- 3 ns -> [python] 225 ns +- 3 ns: 1.23x 
faster (-19%)

$ ./python -m perf timeit --compare-to=./python0  'float("۱۲۳۴۵.۶۷۸۹")' 
--duplicate 100
python0: . 256 ns +- 1 ns
python: . 199 ns +- 2 ns

Mean +- std dev: [python0] 256 ns +- 1 ns -> [python] 199 ns +- 2 ns: 1.29x 
faster (-22%)

$ ./python -m perf timeit --compare-to=./python0  'complex("۱۲۳۴۵.۶۷۸۹j")' 
--duplicate 100
python0: . 298 ns +- 4 ns
python: . 235 ns +- 3 ns

Mean +- std dev: [python0] 298 ns +- 4 ns -> [python] 235 ns +- 3 ns: 1.27x 
faster (-21%)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32016] Python 3.6.3 venv FAILURE

2017-11-13 Thread Larry Chen

New submission from Larry Chen :

Upgraded from 3.6.1 to 3.6.3; but got an error when trying to create my virtual 
environment.

[larrchen@rslab239 Larry]$  /opt/python3.6.3/bin/python3.6 -m venv 
/u/larrchen/work2/SAN/Users/Larry/rslab239_myENV_363
Error: Command 
'['/u/larrchen/work2/SAN/Users/Larry/rslab239_myENV_363/bin/python3.6', '-Im', 
'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.

I can create a virtual env for 3.6.1 and 3.6.2 but not for 3.6.3.

This is a regression issue. 

Try this command. It fails every time.

python3.6 -m venv myEnv

Larry

--
messages: 306165
nosy: nihon2000
priority: normal
severity: normal
status: open
title: Python 3.6.3 venv FAILURE
versions: Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28369] Raise RuntimeError when transport's FD is used with add_reader etc

2017-11-13 Thread Yury Selivanov

Change by Yury Selivanov :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28369] Raise RuntimeError when transport's FD is used with add_reader etc

2017-11-13 Thread Yury Selivanov

Yury Selivanov  added the comment:


New changeset ce12629c84400c52734859e43b2386deb2b6da12 by Yury Selivanov in 
branch 'master':
bpo-28369: Enhance transport socket check in add_reader/writer (#4365)
https://github.com/python/cpython/commit/ce12629c84400c52734859e43b2386deb2b6da12


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: from xx import yy

2017-11-13 Thread Chris Angelico
On Tue, Nov 14, 2017 at 3:58 AM, bvdp  wrote:
> Thanks all for confirming that I was wrong to use "from .. import". Hmmm, 
> perhaps for functions it might be okay. But, in most cases it's a lot more 
> obvious to use module.function() when calling. Maybe a bit slower, but I'm 
> sure it's negligible in most cases.
>
> And, yes, I am trying to share state info between modules. Is this a bad 
> thing? I guess I would write getter() and setter() functions for all this. 
> But that does seem to remind me too much of some other language :)
>

It's going to be so very marginally slower that you won't even be able
to measure it, outside of a micro-benchmark. Worry about code
correctness first, and then performance only if you actually know you
have a problem.

Sharing state between modules is fine as long as it's controlled by
one module - which is what you have here. Go ahead! Not an issue.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [Jobs] Need some help with Python Job Board

2017-11-13 Thread justin walters
On Mon, Nov 13, 2017 at 1:16 AM, M.-A. Lemburg  wrote:

> Hi Justin,
>
> the default markup is currently set to restructuredtext:
>
> https://github.com/python/pythondotorg/blob/master/jobs/models.py
>
> but this can be changed to any of these supported ones:
>
> https://github.com/jamesturk/django-markupfield
>
> as long as we make sure that all existing records continue
> to be set to ReST (to not mess up the formatting).
>
> Since I had a look at WYSIWYG editors, some new ones may have
> surfaced.
>
> The templates are defined here:
>
> https://github.com/python/pythondotorg/tree/master/templates/jobs
>
> and the main project page has instructions on how to get
> a local copy of the website working:
>
> https://pythondotorg.readthedocs.io/
>
> Thanks,
> --
> Marc-Andre Lemburg
> Python Software Foundation
> http://www.python.org/psf/
> http://www.malemburg.com/
> _
> > Jobs mailing list
> > j...@python.org
> > https://mail.python.org/mailman/listinfo/jobs
> >
>
>

Thank you Marc.

I'll take a look over this stuff and hopefully I can squeeze in some time
this week to work on it.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue31979] Simplify converting non-ASCII strings to int, float and complex

2017-11-13 Thread STINNER Victor

STINNER Victor  added the comment:

I don't think that the weird behaviour justify to backport this non-trivial 
change. I propose to only apply the change in Python 3.7.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: from xx import yy

2017-11-13 Thread bvdp
On Sunday, November 12, 2017 at 7:18:04 PM UTC-7, bvdp wrote:
> I'm having a conceptual mind-fart today. I just modified a bunch of code to 
> use "from xx import variable" when variable is a global in xx.py. But, when I 
> change/read 'variable' it doesn't appear to change. I've written a bit of 
> code to show the problem:
> 
> mod1.py
> myvar = 99
> def setvar(x):
> global myvar
> myvar = x
> 
> test1.py
> import mod1
> mod1.myvar = 44
> print (mod1.myvar)
> mod1.setvar(33)
> print (mod1.myvar)
> 
> If this test1.py is run myvar is fine. But, if I run:
> 
> test2.py
> from mod1 import myvar, setvar
> myvar = 44
> print (myvar)
> setvar(33)
> print (myvar)
> 
> It doesn't print the '33'.
> 
> I thought (apparently incorrectly) that import as would import the name myvar 
> into the current module's namespace where it could be read by functions in 
> the module

Thanks all for confirming that I was wrong to use "from .. import". Hmmm, 
perhaps for functions it might be okay. But, in most cases it's a lot more 
obvious to use module.function() when calling. Maybe a bit slower, but I'm sure 
it's negligible in most cases.

And, yes, I am trying to share state info between modules. Is this a bad thing? 
I guess I would write getter() and setter() functions for all this. But that 
does seem to remind me too much of some other language :)
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue24294] DeprecationWarnings should be visible by default in the interactive REPL

2017-11-13 Thread STINNER Victor

STINNER Victor  added the comment:

If you consider that the REPL is designed for developers, I would also suggest 
to show ResourceWarning by default.

I'm not sure of that since I like to write crappy code of REPL (and I hope that 
nobody logs my keyboard)! Example:

haypo@selma$ python3
Python 3.6.2 (default, Oct  2 2017, 16:51:32) 
>>> open("/etc/issue").read()
'\\S\nKernel \\r on an \\m (\\l)\n\n'

I may be annoyed by a ResourceWarning warning here, since it's a oneliner 
written to be only run once. I know that my code is crappy, but I also know 
that it works well and it's much shorter to write than "with open(..) as fp: 
fp.read()" :-)

Yet another approach: I proposed to add a "developer mode", -X dev option:
https://mail.python.org/pipermail/python-dev/2017-November/150514.html

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32012] Disallow ambiguous syntax f(x for x in [1],)

2017-11-13 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

I think this issue is not the best way for answering your question, but I will 
make a try.

The fact that "class C(x for x in [object]): ..." does not cause a syntax error 
is a bug. This issue fixes it. The fact that corrected "class C((x for x in 
[object])): ..." doesn't work is expected, because a generator instance is not 
a class.

The equivalence between a decorator expression and explicit calling a decorator 
function is true only in one direction and only for valid Python syntax. Saying 
about equivalence of syntactically incorrect Python code doesn't make sense.

Yes, an inheritance list can contain keyword arguments. They are passed to a 
metaclass constructor as well as positional arguments.

The syntaxes of the for statement and comprehensions are different.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32012] Disallow ambiguous syntax f(x for x in [1],)

2017-11-13 Thread Henk-Jaap Wagenaar

Henk-Jaap Wagenaar  added the comment:

[As a follow-on, should I open a new issue/discuss on python-dev? Willing to 
help out with a solution on way or another! I know 
https://en.wikipedia.org/wiki/Wikipedia:Chesterton%27s_fence, "In my head" <> 
"Should be the case" etc. very much applies.]

In my head

@...
def foo(): pass

is equivalent to

def _foo(): pass
foo = ...()
del _foo

However the following shows this is not the case:

@0
def foo(): pass

throws a syntax error, whereas

def _foo(): pass
foo = 0(_foo)

throws a type error. This might seem silly, but it is still unexpected.

https://docs.python.org/3/reference/compound_stmts.html#grammar-token-decorator 
has

decorator ::= "@" dotted_name ["(" [argument_list [","]] ")"] NEWLINE

which in my head is

decorator ::= "@" atom NEWLINE

Similarly for classes: 
https://docs.python.org/3/reference/compound_stmts.html#class-definitions

inheritance ::= "(" [argument_list] ")"

which allows for keyword arguments (does that make any sense!?). In my head it 
is (compare with call: 
https://docs.python.org/3/reference/expressions.html#calls)

inheritance ::= "(" [positional_arguments [","] | comprehension] ")"

[Tangentially related, this is how I originally got onto the mailing lists, my 
unhappiness with the definition of the for statement 
(https://docs.python.org/3/reference/compound_stmts.html#the-for-statement):

for_stmt ::= "for" target_list "in" expression_list ":" suite ["else" ":" 
suite]

Which I would expect to be:

for_stmt ::= comp_for ":" suite ["else" ":" suite]

so you could e.g. have if statements.
]

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32012] Disallow ambiguous syntax f(x for x in [1],)

2017-11-13 Thread Henk-Jaap Wagenaar

Henk-Jaap Wagenaar  added the comment:

Currently,

Class C(*some_classes): ...

works 'as expected' and is within grammar and language specification whereas

Class C(x for x in [object]): ...

does not work but does not cause a syntax error. I can see a use case for both 
in dynamic class factories. I was going to do this, but was thwarted by another 
issue (__doc__ cannot be assigned after creation, nor can it be defined as 
anything but a pure string, any work around or reason that is the case? Not 
true for e.g. functions).

I think having one of these within the language specification and not the other 
is odd.

--
nosy: +Henk-Jaap Wagenaar

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29185] test_distutils fails on Android API level 24

2017-11-13 Thread Xavier de Gaye

Change by Xavier de Gaye :


--
versions:  -Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2017-11-13 Thread Yury Selivanov

Yury Selivanov  added the comment:

Guido,

The second example ("No active exception to reraise") was an actual long open 
bug.  It was recently fixed by Mark Shannon in [1].

I think we should be able to fix the first case (missing __context__) although 
it's not critical.  I'll look into it after the context PEP and few other open 
asyncio issues.

[1] https://github.com/python/cpython/pull/1773

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32015] Asyncio looping during simultaneously socket read/write and reconnection

2017-11-13 Thread Andrey

Change by Andrey :


--
title: Asyncio cycling during simultaneously socket read/write and reconnection 
-> Asyncio looping during simultaneously socket read/write and reconnection

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29184] skip tests of test_socketserver when bind() raises PermissionError (non-root user on Android)

2017-11-13 Thread Xavier de Gaye

Change by Xavier de Gaye :


--
pull_requests: +4335

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: from xx import yy

2017-11-13 Thread Rick Johnson
On Sunday, November 12, 2017 at 8:18:04 PM UTC-6, bvdp wrote:
> I'm having a conceptual mind-fart today. I just modified a bunch of code to 
> use "from xx import variable" when variable is a global in xx.py. But, when I 
> change/read 'variable' it doesn't appear to change. I've written a bit of 
> code to show the problem:
> 
> mod1.py
> myvar = 99
> def setvar(x):
> global myvar
> myvar = x
> 
> test1.py
> import mod1
> mod1.myvar = 44
> print (mod1.myvar)
> mod1.setvar(33)
> print (mod1.myvar)
> 
> If this test1.py is run myvar is fine. But, if I run:
> 
> test2.py
> from mod1 import myvar, setvar
> myvar = 44
> print (myvar)
> setvar(33)
> print (myvar)
> 
> It doesn't print the '33'.
> 
> I thought (apparently incorrectly) that import as would
> import the name myvar into the current module's namespace
> where it could be read by functions in the module

No. 

> test2.py
> from mod1 import myvar, setvar

Be aware that the previous line creates a _local_ "module-
level variable" (in test2.py) named `myvar`, and assigns it
the value of `99`. And also be aware that changes to this
variable will not be reflected in `mod1'. As they are in no
way connected.

However, *SNIFF-SNIFF*, i smell a major flaw in this design.

Why would you create a function to modify a module level
variable anyway? If you want to modify a MLV from another
module (aka: externally), then why not modify it using an
explicit dot path? Observe:

# from inside an external module
import mod1
mod1.myvar = "foo"

Now `myvar` is a string.

So what is the point of this external modification? Are you
attempting to share state between modules?
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue32015] Asyncio cycling during simultaneously socket read/write and reconnection

2017-11-13 Thread Andrey

Change by Andrey :


--
keywords: +patch
pull_requests: +4334
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30855] [2.7] test_tk: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5

2017-11-13 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31963] AMD64 Debian PGO 3.x buildbot: compilation failed with an internal compiler error in create_edge

2017-11-13 Thread STINNER Victor

STINNER Victor  added the comment:

Same bug, again,  AMD64 Debian PGO 3.x, so I reopen the issue:

http://buildbot.python.org/all/#/builders/47/builds/159

Python/compile.c: In function ‘compiler_sync_comprehension_generator’:
Python/compile.c:5457:1: internal compiler error: in create_edge, at 
cgraph.c:850
 }
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

--
resolution: works for me -> 
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30855] [2.7] test_tk: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5

2017-11-13 Thread STINNER Victor

STINNER Victor  added the comment:

Same buildbot, same bug: AMD64 Windows8.1 Refleaks 2.7

http://buildbot.python.org/all/#/builders/33/builds/26

==
ERROR: test_use (test_tkinter.test_widgets.ToplevelTest)
--
Traceback (most recent call last):
  File 
"D:\buildarea\2.7.ware-win81-release.refleak\build\lib\lib-tk\test\test_tkinter\test_widgets.py",
 line 93, in test_use
widget2 = self.create(use=wid)
  File 
"D:\buildarea\2.7.ware-win81-release.refleak\build\lib\lib-tk\test\test_tkinter\test_widgets.py",
 line 67, in create
return tkinter.Toplevel(self.root, **kwargs)
  File 
"D:\buildarea\2.7.ware-win81-release.refleak\build\lib\lib-tk\Tkinter.py", line 
2138, in __init__
BaseWidget.__init__(self, master, 'toplevel', cnf, {}, extra)
  File 
"D:\buildarea\2.7.ware-win81-release.refleak\build\lib\lib-tk\Tkinter.py", line 
2095, in __init__
(widgetName, self._w) + extra + self._options(cnf))
TclError: integer value too large to represent

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30696] infinite loop in PyRun_InteractiveLoopFlags()

2017-11-13 Thread STINNER Victor

STINNER Victor  added the comment:

Ok, I understand, thanks for the explanation.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32015] Asyncio cycling during simultaneously socket read/write and reconnection

2017-11-13 Thread Andrey

New submission from Andrey :

The bug is happened when the async reading/writing interrupted by other async 
method which reconnects the socket. The closed socket calls the appropriate 
handler in the loop due to cannot be removed due to wrong fileno of socket.

--
components: asyncio
files: raise.py
messages: 306154
nosy: andr04, yselivanov
priority: normal
severity: normal
status: open
title: Asyncio cycling during simultaneously socket read/write and reconnection
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8
Added file: https://bugs.python.org/file47262/raise.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30696] infinite loop in PyRun_InteractiveLoopFlags()

2017-11-13 Thread Xavier de Gaye

Xavier de Gaye  added the comment:

Also the existing test coverage of these functions in all the Python versions 
is very weak.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30696] infinite loop in PyRun_InteractiveLoopFlags()

2017-11-13 Thread Xavier de Gaye

Xavier de Gaye  added the comment:

> What about Python 2.7?

_testcapi.set_nomemory() does not exist on Pyhton 2.7 so the changes cannot be 
tested. Applying the changes to PyRun_InteractiveLoopFlags() in 2.7 looks 
rather straightforward but there are too many differences in 
PyRun_InteractiveOneFlags() between 2.7 and 3.7.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30696] infinite loop in PyRun_InteractiveLoopFlags()

2017-11-13 Thread STINNER Victor

STINNER Victor  added the comment:

Thanks for fixing this very old bug!

What about Python 2.7?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: [Jobs] Need some help with Python Job Board

2017-11-13 Thread M.-A. Lemburg
Hi Justin,

the default markup is currently set to restructuredtext:

https://github.com/python/pythondotorg/blob/master/jobs/models.py

but this can be changed to any of these supported ones:

https://github.com/jamesturk/django-markupfield

as long as we make sure that all existing records continue
to be set to ReST (to not mess up the formatting).

Since I had a look at WYSIWYG editors, some new ones may have
surfaced.

The templates are defined here:

https://github.com/python/pythondotorg/tree/master/templates/jobs

and the main project page has instructions on how to get
a local copy of the website working:

https://pythondotorg.readthedocs.io/

Thanks,
-- 
Marc-Andre Lemburg
Python Software Foundation
http://www.python.org/psf/
http://www.malemburg.com/

On 12.11.2017 18:52, Skip Montanaro wrote:
> Thanks, Justin. I imagine editors probably exist which can switch between
> WYSIWYG and markup. Whether that markup can be Markdown or not, I don't
> know. Marc-André Lemburg listed a few possible editors in the ticket he
> opened, but I've not dug into their properties.
> 
> Skip
> 
> On Sun, Nov 12, 2017 at 11:20 AM, justin walters > wrote:
> 
>> On Sat, Nov 11, 2017 at 3:27 PM, Skip Montanaro 
>> wrote:
>>
>>> The Python Job Board could use a little help in a couple areas. One, we
>> can
>>> always use help reviewing and approving (or rejecting) submissions. The
>>> backlog keeps growing, and the existing volunteers who help can't always
>>> keep up. (This is a good problem to have, reflecting on Python's broad
>>> popularity in many application domains.)
>>>
>>> Two, and perhaps more important, the submission form really needs to
>>> support WYSIWYG editing. Apparently, most posters are unable to handle
>>> markup-based systems, probably just pasting content from Word documents.
>>> Making this change would streamline the review process, as formatting
>>> problems are currently the biggest impediment to successful submissions.
>>> There is an open ticket to add this feature:
>>>
>>> https://github.com/python/pythondotorg/issues/655
>>>
>>> If you can help with either task, please drop a note to j...@python.org.
>>>
>>> Thanks,
>>>
>>> Skip
>>> --
>>> https://mail.python.org/mailman/listinfo/python-list
>>>
>>
>> I might be able to help implement a wysiwyg editor. The only issue I can
>> think of at the moment
>> would be finding a way to determine if the template should render wysiswyg
>> content or Markdown content.
>>
>> I'll need to look over the repo a bit more closely first.
>> --
>> https://mail.python.org/mailman/listinfo/python-list
>>
> 
> 
> 
> ___
> Jobs mailing list
> j...@python.org
> https://mail.python.org/mailman/listinfo/jobs
> 

-- 
https://mail.python.org/mailman/listinfo/python-list


[issue31956] Add start and stop parameters to the array.index()

2017-11-13 Thread STINNER Victor

STINNER Victor  added the comment:

Anders Lorentsen: Py_ssize_t is the correct type for an index in the C 
language. It's not technically possible to create an array object larger than 
PY_SSIZE_T_MAX items :-)

Serhiy> Just take list.index as an example.

I concur with Serhiy :-)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32012] Disallow ambiguous syntax f(x for x in [1],)

2017-11-13 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

It is easy to forbid the above cases, but I don't know what error message is 
appropriate. General "invalid syntax"?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32013] _pickle: Py_DECREF seems to be missing from a failure case in fast_save_enter()

2017-11-13 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type:  -> resource usage
versions: +Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32013] _pickle: Py_DECREF seems to be missing from a failure case in fast_save_enter()

2017-11-13 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 6ed9d4ecde8c3f0eeadf188f15a5bbd32b9d1145 by Serhiy Storchaka 
(Miss Islington (bot)) in branch '3.6':
bpo-32013: _pickle: Add missing Py_DECREF in error case in fast_save_enter() 
(GH-4384) (#4385)
https://github.com/python/cpython/commit/6ed9d4ecde8c3f0eeadf188f15a5bbd32b9d1145


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com