[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot

Changes by Roundup Robot :


___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot

Changes by Roundup Robot :


___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot

Changes by Roundup Robot :


___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot

Roundup Robot added the comment:


New changeset abfa17511f7ce8f1a6394f28f82ffb9a916fcf03 by Mariatta Wijaya in 
branch 'master':
Issue #29381: Clarify ordering of UNIX shebang line as source encoding line
https://github.com/python/cpython/commit/abfa17511f7ce8f1a6394f28f82ffb9a916fcf03

New changeset 848eeb1debc94a82660bf5af4e3d554b02b81c2e by Mariatta Wijaya in 
branch 'master':
Issue #29381: Clarify ordering of UNIX shebang line as source encoding line
https://github.com/python/cpython/commit/848eeb1debc94a82660bf5af4e3d554b02b81c2e

New changeset 35519d021ece942efc4a710ea3e94bcc5c06b130 by Mariatta Wijaya in 
branch 'master':
Issue #29381: merge with 3.6
https://github.com/python/cpython/commit/35519d021ece942efc4a710ea3e94bcc5c06b130


--

___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot

Changes by Roundup Robot :


___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot

Changes by Roundup Robot :


___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot

Changes by Roundup Robot :


___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot

Roundup Robot added the comment:


New changeset 3f5b24dd4b38bf885a80f4bb5f605cd6b0c49ead by Mariatta Wijaya in 
branch '2.7':
Issue #29381: Clarify ordering of UNIX shebang line as source encoding line
https://github.com/python/cpython/commit/3f5b24dd4b38bf885a80f4bb5f605cd6b0c49ead


--

___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot

Changes by Roundup Robot :


___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot

Changes by Roundup Robot :


___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot

Roundup Robot added the comment:


New changeset 848eeb1debc94a82660bf5af4e3d554b02b81c2e by Mariatta Wijaya in 
branch '3.6':
Issue #29381: Clarify ordering of UNIX shebang line as source encoding line
https://github.com/python/cpython/commit/848eeb1debc94a82660bf5af4e3d554b02b81c2e


--

___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot

Changes by Roundup Robot :


___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

Thanks, Jim, Marco, and Raymond :)

--

___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset df356d3c916e by Mariatta Wijaya in branch '2.7':
Issue #29381: Clarify ordering of UNIX shebang line as source encoding line
https://hg.python.org/cpython/rev/df356d3c916e

--

___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 483d9133fd7e by Mariatta Wijaya in branch '3.6':
Issue #29381: Clarify ordering of UNIX shebang line as source encoding line
https://hg.python.org/cpython/rev/483d9133fd7e

New changeset 762a93935afd by Mariatta Wijaya in branch 'default':
Issue #29381: merge with 3.6
https://hg.python.org/cpython/rev/762a93935afd

--

___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot

Changes by Roundup Robot :


--
stage:  -> resolved

___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot

Changes by Roundup Robot :


--
resolution:  -> fixed

___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot

Roundup Robot added the comment:


New changeset abfa17511f7ce8f1a6394f28f82ffb9a916fcf03 by Mariatta Wijaya in 
branch '3.6':
Issue #29381: Clarify ordering of UNIX shebang line as source encoding line
https://github.com/python/cpython/commit/abfa17511f7ce8f1a6394f28f82ffb9a916fcf03


--

___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot

Changes by Roundup Robot :


--
status: open -> closed

___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3d712292f2fa by Mariatta Wijaya in branch '3.6':
Issue #29381: Clarify ordering of UNIX shebang line as source encoding line
https://hg.python.org/cpython/rev/3d712292f2fa

--
nosy: +python-dev

___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-01-30 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I would only post this to 2.7, 3.6 and 3.7.   Also, no Misc/NEWS entry is 
needed.

--
versions:  -Python 3.4, Python 3.5

___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-01-30 Thread Raymond Hettinger

Raymond Hettinger added the comment:

It looks like everyone is happy and the patch is ready for Mariatta to apply.

The procedure is:
 $ hg pull -u
 $ hg diff  # Verify it has only your intended patch
 $ hg update 3.6
 $ cd Doc
 $ make html
 $ open build/html/index.html   # Now review generated HTML
 $ hg commit -m "Issue #29381: Clarify ordering of UNIX shebang line as source 
encoding line"
 $ hg update default
 $ hg merge 3.6
 $ hg diff  # Verify it has only your intended patch
 $ hg commit -m "merge"
 $ hg push

Then return to this issue, verify the bot has posted the commit.

Write a comment thanking the OP and reviewers.  Then mark the status as 
"closed" and resolution as "fixed".

--

___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-01-30 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

Thanks all for the feedback. I updated the patch.

Marco, IMO it's not necessary to update the PEP.
This section of the documentation serves as a tutorial for it, and the update 
in this patch clarifies the situation.

--
Added file: http://bugs.python.org/file46458/issue29381v3.patch

___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-01-30 Thread Jim Fasarakis-Hilliard

Jim Fasarakis-Hilliard added the comment:

Added a comment too. Other than that and the comment by Marco it looks fine to 
me too.

--

___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-01-30 Thread Marco Buttu

Marco Buttu added the comment:

The patch LGTM. I think there is just one type (see review). 

By the way, looking at the PEP 0263, the sentence "To define a source code 
encoding, a magic comment must be placed into the source files either as first 
or second line in the file" actually is not true. Also because I did not see 
any point in the PEP that clarifies that the fist line has to be a comment. 
Maybe it could be deduced by the examples (all using the shebang), but maybe 
not, and the user could think this is a valid declaration:

print('très jolie')
# -*- coding: ascii -*-

If you think is worth to clarify, I open an issue with a patch for the PEP 0263.

--

___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-01-29 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

Thanks for the feedback, Raymond. I adjusted my patch.

--
Added file: http://bugs.python.org/file46453/issue29381v2.patch

___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-01-29 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Suggestions:

* Please add a cross-link to from '''UNIX “shebang” line"''' to 16.1.2. 
Executable Python Scripts.

* Instead of a link to a PEP (which is outside the main documentation), let's 
just add an example:

   # /usr/bin/env python3
   # -*- coding: cp-1252 -*-

--

___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-01-29 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

There are certain rules about the encoding declaration line.
It has to be the first line of the source code, or in the case that the file 
starts with a unix "shebang" line, then the encoding declaration has to be on 
the second line. In fact, the first or the second lines of the source code has 
to follow a certain regular expression. This is all described in PEP 263, but 
we don't have to repeat all of those here. IMO we can just refer the reader to 
the PEP.

I've prepared a patch that addresses this. Please review, and let me know if 
you have additional feedback.

Thanks :)

--
Added file: http://bugs.python.org/file46452/issue29381.patch

___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-01-28 Thread Raymond Hettinger

Raymond Hettinger added the comment:

> Is Mariatta responsible for reviewing Documentation submissions?

No, she is a new core developer and this is a good issue for her to do the 
initial review and post any thoughts on the subject.  We've all got to start 
somewhere.

> If so, should I nosy Mariatta in any future documentation issues?

You did everything just right.  Just marking this as a doc patch is sufficient.

--

___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-01-28 Thread Jim Fasarakis-Hilliard

Jim Fasarakis-Hilliard added the comment:

Indeed, this does create an issue. 

The last sentence in the documentation actually specifies where the encoding 
comment can be but doesn't strictly specify it can be on the second line if and 
only if preceded by `#!`.

I'm thinking the last sentence should contain the additional change, that is, 
change it from :

The special encoding comment must be in the first or second line within the 
file.

to:

The special encoding comment must be in the first line, or, if the first 
line is used to create an executable Python script, the second line within the 
file.

linking to 
(https://docs.python.org/3/tutorial/appendix.html#executable-python-scripts) 
accordingly. 

Let's see what Mariatta says about these proposals. Thanks for noticing.

--

___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-01-28 Thread Marco Buttu

Marco Buttu added the comment:

You wrote: "It is also possible to specify a different encoding for source 
files. In order to do this, you can use a special comment line that defines the 
source file encoding::". I think that is not true, because the line have to be 
the first line, or right below a comment (just one, as in the case of the 
shebang). For instance, in this case Python apply the declared coding:

  $ cat foo.py
  # The first line is a comment
  # -*- coding: ascii -*-
  print('è')  # Encoded in UTF-8
  $ python foo.py
 ...
  SyntaxError: encoding problem: ascii


In this case it does not:

  $ cat foo.py
  # The first line is a comment
  # and also the sencond line
  # -*- coding: ascii -*-
  print('è')  # Encoded in UTF-8
  $ python foo.py 
  è

But I think you are right that the current doc is confusing. Maybe yon can 
write something like this: 

"It is also possible to specify a different encoding for source files. In order 
to do this, put one special comment line to define the source file encoding:

# -*- coding: encoding -*-

This coding comment has to be the first line of the file, or the second line in 
case the first one is the #! line."

--
nosy: +marco.buttu

___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-01-28 Thread Jim Fasarakis-Hilliard

Jim Fasarakis-Hilliard added the comment:

Hi, Raymond. Is Mariatta responsible for reviewing Documentation submissions? 
If so, should I nosy Mariatta in any future documentation issues?

--

___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-01-27 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Mariatta, could you check this patch and tell us your recommendation about 
whether it should be applied, modified, or rejected?

--
assignee: docs@python -> Mariatta
nosy: +Mariatta, rhettinger

___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-01-27 Thread Jim Fasarakis-Hilliard

Changes by Jim Fasarakis-Hilliard :


--
title: Tutorial documentation contains undefined reference -> Tutorial 
documentation contains undefined reference to #!
Added file: http://bugs.python.org/file46439/interpreter_tut2.7.patch

___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference

2017-01-27 Thread Jim Fasarakis-Hilliard

New submission from Jim Fasarakis-Hilliard:

After moving a certain chunk of the 'interpreter.rst' contents to 
'appendix.rst' in issue16827 the reference to #! in the section '2.2.3. Source 
Code Encoding' is currently confusing for new readers.

Attached patches reword the sentence to remove that reference for 3.4+ and 2.7.

--
assignee: docs@python
components: Documentation
files: interpreter_tut.patch
keywords: patch
messages: 286378
nosy: Jim Fasarakis-Hilliard, docs@python
priority: normal
severity: normal
status: open
title: Tutorial documentation contains undefined reference
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7
Added file: http://bugs.python.org/file46438/interpreter_tut.patch

___
Python tracker 

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