Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
3c75a48c
Kaydet (Commit)
3c75a48c
authored
Şub 23, 2013
tarafından
Petri Lehtinen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Issue #8890: Stop advertising an insecure use of /tmp in docs
üst
f484efdb
9f74c6cf
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
31 additions
and
26 deletions
+31
-26
index.rst
Doc/install/index.rst
+1
-1
atexit.rst
Doc/library/atexit.rst
+2
-2
cgi.rst
Doc/library/cgi.rst
+1
-1
imghdr.rst
Doc/library/imghdr.rst
+1
-1
mailcap.rst
Doc/library/mailcap.rst
+2
-2
nntplib.rst
Doc/library/nntplib.rst
+1
-1
optparse.rst
Doc/library/optparse.rst
+2
-2
pipes.rst
Doc/library/pipes.rst
+3
-3
sqlite3.rst
Doc/library/sqlite3.rst
+2
-2
trace.rst
Doc/library/trace.rst
+2
-2
zipimport.rst
Doc/library/zipimport.rst
+5
-5
inputoutput.rst
Doc/tutorial/inputoutput.rst
+4
-4
ACKS
Misc/ACKS
+1
-0
NEWS
Misc/NEWS
+4
-0
No files found.
Doc/install/index.rst
Dosyayı görüntüle @
3c75a48c
...
@@ -189,7 +189,7 @@ under the distribution root; if you're excessively concerned with speed, or want
...
@@ -189,7 +189,7 @@ under the distribution root; if you're excessively concerned with speed, or want
to keep the source tree pristine, you can change the build directory with the
to keep the source tree pristine, you can change the build directory with the
:option:`--build-base` option. For example::
:option:`--build-base` option. For example::
python setup.py build --build-base=/
tmp
/pybuild/foo-1.0
python setup.py build --build-base=/
path/to
/pybuild/foo-1.0
(Or you could do this permanently with a directive in your system or personal
(Or you could do this permanently with a directive in your system or personal
Distutils configuration file; see section :ref:`inst-config-files`.) Normally, this
Distutils configuration file; see section :ref:`inst-config-files`.) Normally, this
...
...
Doc/library/atexit.rst
Dosyayı görüntüle @
3c75a48c
...
@@ -68,7 +68,7 @@ automatically when the program terminates without relying on the application
...
@@ -68,7 +68,7 @@ automatically when the program terminates without relying on the application
making an explicit call into this module at termination. ::
making an explicit call into this module at termination. ::
try:
try:
with open("
/tmp/counter
") as infile:
with open("
counterfile
") as infile:
_count = int(infile.read())
_count = int(infile.read())
except FileNotFoundError:
except FileNotFoundError:
_count = 0
_count = 0
...
@@ -78,7 +78,7 @@ making an explicit call into this module at termination. ::
...
@@ -78,7 +78,7 @@ making an explicit call into this module at termination. ::
_count = _count + n
_count = _count + n
def savecounter():
def savecounter():
with open("
/tmp/counter
", "w") as outfile:
with open("
counterfile
", "w") as outfile:
outfile.write("%d" % _count)
outfile.write("%d" % _count)
import atexit
import atexit
...
...
Doc/library/cgi.rst
Dosyayı görüntüle @
3c75a48c
...
@@ -79,7 +79,7 @@ program to users of your script, you can have the reports saved to files
...
@@ -79,7 +79,7 @@ program to users of your script, you can have the reports saved to files
instead, with code like this::
instead, with code like this::
import cgitb
import cgitb
cgitb.enable(display=0, logdir="/
tmp
")
cgitb.enable(display=0, logdir="/
path/to/logdir
")
It's very helpful to use this feature during script development. The reports
It's very helpful to use this feature during script development. The reports
produced by :mod:`cgitb` provide information that can save you a lot of time in
produced by :mod:`cgitb` provide information that can save you a lot of time in
...
...
Doc/library/imghdr.rst
Dosyayı görüntüle @
3c75a48c
...
@@ -65,6 +65,6 @@ to this variable:
...
@@ -65,6 +65,6 @@ to this variable:
Example::
Example::
>>> import imghdr
>>> import imghdr
>>> imghdr.what('
/tmp/
bass.gif')
>>> imghdr.what('bass.gif')
'gif'
'gif'
Doc/library/mailcap.rst
Dosyayı görüntüle @
3c75a48c
...
@@ -71,6 +71,6 @@ An example usage::
...
@@ -71,6 +71,6 @@ An example usage::
>>> import mailcap
>>> import mailcap
>>> d=mailcap.getcaps()
>>> d=mailcap.getcaps()
>>> mailcap.findmatch(d, 'video/mpeg', filename='
/tmp/
tmp1223')
>>> mailcap.findmatch(d, 'video/mpeg', filename='tmp1223')
('xmpeg
/tmp/
tmp1223', {'view': 'xmpeg %s'})
('xmpeg tmp1223', {'view': 'xmpeg %s'})
Doc/library/nntplib.rst
Dosyayı görüntüle @
3c75a48c
...
@@ -47,7 +47,7 @@ To post an article from a binary file (this assumes that the article has valid
...
@@ -47,7 +47,7 @@ To post an article from a binary file (this assumes that the article has valid
headers, and that you have right to post on the particular newsgroup)::
headers, and that you have right to post on the particular newsgroup)::
>>> s = nntplib.NNTP('news.gmane.org')
>>> s = nntplib.NNTP('news.gmane.org')
>>> f = open('
/tmp/
article.txt', 'rb')
>>> f = open('article.txt', 'rb')
>>> s.post(f)
>>> s.post(f)
'240 Article posted successfully.'
'240 Article posted successfully.'
>>> s.quit()
>>> s.quit()
...
...
Doc/library/optparse.rst
Dosyayı görüntüle @
3c75a48c
...
@@ -171,10 +171,10 @@ required option
...
@@ -171,10 +171,10 @@ required option
For example, consider this hypothetical command-line::
For example, consider this hypothetical command-line::
prog -v --report
/tmp/
report.txt foo bar
prog -v --report report.txt foo bar
``-v`` and ``--report`` are both options. Assuming that ``--report``
``-v`` and ``--report`` are both options. Assuming that ``--report``
takes one argument, ``
/tmp/
report.txt`` is an option argument. ``foo`` and
takes one argument, ``report.txt`` is an option argument. ``foo`` and
``bar`` are positional arguments.
``bar`` are positional arguments.
...
...
Doc/library/pipes.rst
Dosyayı görüntüle @
3c75a48c
...
@@ -26,12 +26,12 @@ The :mod:`pipes` module defines the following class:
...
@@ -26,12 +26,12 @@ The :mod:`pipes` module defines the following class:
Example::
Example::
>>> import pipes
>>> import pipes
>>> t
=
pipes.Template()
>>> t
=
pipes.Template()
>>> t.append('tr a-z A-Z', '--')
>>> t.append('tr a-z A-Z', '--')
>>> f
=t.open('/tmp/1
', 'w')
>>> f
= t.open('pipefile
', 'w')
>>> f.write('hello world')
>>> f.write('hello world')
>>> f.close()
>>> f.close()
>>> open('
/tmp/1
').read()
>>> open('
pipefile
').read()
'HELLO WORLD'
'HELLO WORLD'
...
...
Doc/library/sqlite3.rst
Dosyayı görüntüle @
3c75a48c
...
@@ -18,10 +18,10 @@ with the DB-API 2.0 specification described by :pep:`249`.
...
@@ -18,10 +18,10 @@ with the DB-API 2.0 specification described by :pep:`249`.
To use the module, you must first create a :class:`Connection` object that
To use the module, you must first create a :class:`Connection` object that
represents the database. Here the data will be stored in the
represents the database. Here the data will be stored in the
:file:`
/tmp/example
` file::
:file:`
example.db
` file::
import sqlite3
import sqlite3
conn = sqlite3.connect('
/tmp/example
')
conn = sqlite3.connect('
example.db
')
You can also supply the special name ``:memory:`` to create a database in RAM.
You can also supply the special name ``:memory:`` to create a database in RAM.
...
...
Doc/library/trace.rst
Dosyayı görüntüle @
3c75a48c
...
@@ -201,7 +201,7 @@ A simple example demonstrating the use of the programmatic interface::
...
@@ -201,7 +201,7 @@ A simple example demonstrating the use of the programmatic interface::
# run the new command using the given tracer
# run the new command using the given tracer
tracer.run('main()')
tracer.run('main()')
# make a report, placing output in
/tmp
# make a report, placing output in
the current directory
r = tracer.results()
r = tracer.results()
r.write_results(show_missing=True, coverdir="
/tmp
")
r.write_results(show_missing=True, coverdir="
.
")
Doc/library/zipimport.rst
Dosyayı görüntüle @
3c75a48c
...
@@ -16,7 +16,7 @@ Typically, :data:`sys.path` is a list of directory names as strings. This modul
...
@@ -16,7 +16,7 @@ Typically, :data:`sys.path` is a list of directory names as strings. This modul
also allows an item of :data:`sys.path` to be a string naming a ZIP file archive.
also allows an item of :data:`sys.path` to be a string naming a ZIP file archive.
The ZIP archive can contain a subdirectory structure to support package imports,
The ZIP archive can contain a subdirectory structure to support package imports,
and a path within the archive can be specified to only import from a
and a path within the archive can be specified to only import from a
subdirectory. For example, the path :file:`
/tmp/
example.zip/lib/` would only
subdirectory. For example, the path :file:`example.zip/lib/` would only
import from the :file:`lib/` subdirectory within the archive.
import from the :file:`lib/` subdirectory within the archive.
Any files may be present in the ZIP archive, but only files :file:`.py` and
Any files may be present in the ZIP archive, but only files :file:`.py` and
...
@@ -147,8 +147,8 @@ Examples
...
@@ -147,8 +147,8 @@ Examples
Here is an example that imports a module from a ZIP archive - note that the
Here is an example that imports a module from a ZIP archive - note that the
:mod:`zipimport` module is not explicitly used. ::
:mod:`zipimport` module is not explicitly used. ::
$ unzip -l
/tmp/
example.zip
$ unzip -l example.zip
Archive:
/tmp/
example.zip
Archive: example.zip
Length Date Time Name
Length Date Time Name
-------- ---- ---- ----
-------- ---- ---- ----
8467 11-26-02 22:30 jwzthreading.py
8467 11-26-02 22:30 jwzthreading.py
...
@@ -157,8 +157,8 @@ Here is an example that imports a module from a ZIP archive - note that the
...
@@ -157,8 +157,8 @@ Here is an example that imports a module from a ZIP archive - note that the
$ ./python
$ ./python
Python 2.3 (#1, Aug 1 2003, 19:54:32)
Python 2.3 (#1, Aug 1 2003, 19:54:32)
>>> import sys
>>> import sys
>>> sys.path.insert(0, '
/tmp/
example.zip') # Add .zip file to front of path
>>> sys.path.insert(0, 'example.zip') # Add .zip file to front of path
>>> import jwzthreading
>>> import jwzthreading
>>> jwzthreading.__file__
>>> jwzthreading.__file__
'
/tmp/
example.zip/jwzthreading.py'
'example.zip/jwzthreading.py'
Doc/tutorial/inputoutput.rst
Dosyayı görüntüle @
3c75a48c
...
@@ -234,12 +234,12 @@ two arguments: ``open(filename, mode)``.
...
@@ -234,12 +234,12 @@ two arguments: ``open(filename, mode)``.
::
::
>>> f = open('
/tmp/
workfile', 'w')
>>> f = open('workfile', 'w')
.. XXX str(f) is <io.TextIOWrapper object at 0x82e8dc4>
.. XXX str(f) is <io.TextIOWrapper object at 0x82e8dc4>
>>> print(f)
>>> print(f)
<open file '
/tmp/
workfile', mode 'w' at 80a0960>
<open file 'workfile', mode 'w' at 80a0960>
The first argument is a string containing the filename. The second argument is
The first argument is a string containing the filename. The second argument is
another string containing a few characters describing the way in which the file
another string containing a few characters describing the way in which the file
...
@@ -346,7 +346,7 @@ of the file, 1 uses the current file position, and 2 uses the end of the file as
...
@@ -346,7 +346,7 @@ of the file, 1 uses the current file position, and 2 uses the end of the file as
the reference point. *from_what* can be omitted and defaults to 0, using the
the reference point. *from_what* can be omitted and defaults to 0, using the
beginning of the file as the reference point. ::
beginning of the file as the reference point. ::
>>> f = open('
/tmp/
workfile', 'rb+')
>>> f = open('workfile', 'rb+')
>>> f.write(b'0123456789abcdef')
>>> f.write(b'0123456789abcdef')
16
16
>>> f.seek(5) # Go to the 6th byte in the file
>>> f.seek(5) # Go to the 6th byte in the file
...
@@ -377,7 +377,7 @@ objects. This has the advantage that the file is properly closed after its
...
@@ -377,7 +377,7 @@ objects. This has the advantage that the file is properly closed after its
suite finishes, even if an exception is raised on the way. It is also much
suite finishes, even if an exception is raised on the way. It is also much
shorter than writing equivalent :keyword:`try`\ -\ :keyword:`finally` blocks::
shorter than writing equivalent :keyword:`try`\ -\ :keyword:`finally` blocks::
>>> with open('
/tmp/
workfile', 'r') as f:
>>> with open('workfile', 'r') as f:
... read_data = f.read()
... read_data = f.read()
>>> f.closed
>>> f.closed
True
True
...
...
Misc/ACKS
Dosyayı görüntüle @
3c75a48c
...
@@ -1289,6 +1289,7 @@ John Williams
...
@@ -1289,6 +1289,7 @@ John Williams
Sue Williams
Sue Williams
Steven Willis
Steven Willis
Frank Willison
Frank Willison
Geoff Wilson
Greg V. Wilson
Greg V. Wilson
J Derek Wilson
J Derek Wilson
Paul Winkler
Paul Winkler
...
...
Misc/NEWS
Dosyayı görüntüle @
3c75a48c
...
@@ -756,6 +756,10 @@ Tools/Demos
...
@@ -756,6 +756,10 @@ Tools/Demos
Documentation
Documentation
-------------
-------------
-
Issue
#
8890
:
Stop
advertising
an
insecure
practice
by
replacing
uses
of
the
/
tmp
directory
with
better
alternatives
in
the
documentation
.
Patch
by
Geoff
Wilson
.
-
Issue
#
17203
:
add
long
option
names
to
unittest
discovery
docs
.
-
Issue
#
17203
:
add
long
option
names
to
unittest
discovery
docs
.
-
Issue
#
13094
:
add
"Why do lambdas defined in a loop with different values
-
Issue
#
13094
:
add
"Why do lambdas defined in a loop with different values
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment