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
f46676d4
Kaydet (Commit)
f46676d4
authored
May 26, 2011
tarafından
Éric Araujo
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Branch merge
üst
92236e56
aa1ef2d7
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
17 additions
and
25 deletions
+17
-25
style.rst
Doc/documenting/style.rst
+2
-2
site.rst
Doc/library/site.rst
+4
-0
parser.py
Lib/html/parser.py
+1
-1
pkgutil.py
Lib/pkgutil.py
+1
-1
sysconfig.py
Lib/sysconfig.py
+2
-3
test_sysconfig.py
Lib/test/test_sysconfig.py
+4
-15
findnocoding.py
Tools/scripts/findnocoding.py
+2
-2
pysource.py
Tools/scripts/pysource.py
+1
-1
No files found.
Doc/documenting/style.rst
Dosyayı görüntüle @
f46676d4
...
...
@@ -136,7 +136,7 @@ Good example (establishing confident knowledge in the effective use of the langu
Economy of Expression
---------------------
More documentation is not necessarily better documentation. Err
or
on the side
More documentation is not necessarily better documentation. Err on the side
of being succinct.
It is an unfortunate fact that making documentation longer can be an impediment
...
...
@@ -198,7 +198,7 @@ Audience
The
tone
of
the
tutorial
(
and
all
the
docs
)
needs
to
be
respectful
of
the
reader
's intelligence. Don'
t
presume
that
the
readers
are
stupid
.
Lay
out
the
relevant
information
,
show
motivating
use
cases
,
provide
glossary
links
,
and
do
our
best
to
connect
-
the
-
dots
,
but
don
't talk down to them or waste their time.
y
our
best
to
connect
-
the
-
dots
,
but
don
't talk down to them or waste their time.
The tutorial is meant for newcomers, many of whom will be using the tutorial to
evaluate the language as a whole. The experience needs to be positive and not
...
...
Doc/library/site.rst
Dosyayı görüntüle @
f46676d4
...
...
@@ -129,6 +129,10 @@ empty, and the path manipulations are skipped; however the import of
unless the :program:`python` interpreter was started with the :option:`-S`
flag.
.. versionchanged:: 3.3
This function used to be called unconditionnally.
.. function:: addsitedir(sitedir, known_paths=None)
Adds a directory to sys.path and processes its pth files.
...
...
Lib/html/parser.py
Dosyayı görüntüle @
f46676d4
...
...
@@ -124,7 +124,7 @@ class HTMLParser(_markupbase.ParserBase):
_markupbase
.
ParserBase
.
reset
(
self
)
def
feed
(
self
,
data
):
"""Feed data to the parser.
r
"""Feed data to the parser.
Call this as often as you want, with as little or as much text
as you want (may include '\n').
...
...
Lib/pkgutil.py
Dosyayı görüntüle @
f46676d4
...
...
@@ -8,7 +8,7 @@ from types import ModuleType
__all__
=
[
'get_importer'
,
'iter_importers'
,
'get_loader'
,
'find_loader'
,
'walk_packages'
,
'iter_modules'
,
'walk_packages'
,
'iter_modules'
,
'get_data'
,
'ImpImporter'
,
'ImpLoader'
,
'read_code'
,
'extend_path'
,
]
...
...
Lib/sysconfig.py
Dosyayı görüntüle @
f46676d4
...
...
@@ -658,11 +658,10 @@ def get_platform():
# to. This makes the compatibility story a bit more sane because the
# machine is going to compile and link as if it were
# MACOSX_DEPLOYMENT_TARGET.
#
cfgvars
=
get_config_vars
()
macver
=
cfgvars
.
get
(
'MACOSX_DEPLOYMENT_TARGET'
)
if
1
:
if
True
:
# Always calculate the release of the running machine,
# needed to determine if we can build fat binaries or not.
...
...
@@ -757,7 +756,7 @@ def _main():
print
(
'Platform: "
%
s"'
%
get_platform
())
print
(
'Python version: "
%
s"'
%
get_python_version
())
print
(
'Current installation scheme: "
%
s"'
%
_get_default_scheme
())
print
(
''
)
print
()
_print_dict
(
'Paths'
,
get_paths
())
print
()
_print_dict
(
'Variables'
,
get_config_vars
())
...
...
Lib/test/test_sysconfig.py
Dosyayı görüntüle @
f46676d4
"""Tests for 'site'.
Tests assume the initial paths in sys.path once the interpreter has begun
executing have not been removed.
"""
import
unittest
import
sys
import
os
...
...
@@ -20,10 +14,10 @@ from sysconfig import (get_paths, get_platform, get_config_vars,
_get_default_scheme
,
_expand_vars
,
get_scheme_names
,
get_config_var
,
_main
)
class
TestSysConfig
(
unittest
.
TestCase
):
def
setUp
(
self
):
"""Make a copy of sys.path"""
super
(
TestSysConfig
,
self
)
.
setUp
()
self
.
sys_path
=
sys
.
path
[:]
# patching os.uname
...
...
@@ -52,7 +46,6 @@ class TestSysConfig(unittest.TestCase):
self
.
_added_envvars
.
append
(
var
)
def
tearDown
(
self
):
"""Restore sys.path"""
sys
.
path
[:]
=
self
.
sys_path
self
.
_cleanup_testfn
()
if
self
.
uname
is
not
None
:
...
...
@@ -142,8 +135,6 @@ class TestSysConfig(unittest.TestCase):
(
'Darwin Kernel Version 8.11.1: '
'Wed Oct 10 18:23:28 PDT 2007; '
'root:xnu-792.25.20~1/RELEASE_I386'
),
'PowerPC'
))
get_config_vars
()[
'MACOSX_DEPLOYMENT_TARGET'
]
=
'10.3'
get_config_vars
()[
'CFLAGS'
]
=
(
'-fno-strict-aliasing -DNDEBUG -g '
...
...
@@ -158,7 +149,6 @@ class TestSysConfig(unittest.TestCase):
finally
:
sys
.
maxsize
=
maxint
self
.
_set_uname
((
'Darwin'
,
'macziade'
,
'8.11.1'
,
(
'Darwin Kernel Version 8.11.1: '
'Wed Oct 10 18:23:28 PDT 2007; '
...
...
@@ -216,9 +206,9 @@ class TestSysConfig(unittest.TestCase):
get_config_vars
()[
'CFLAGS'
]
=
(
'-arch
%
s -isysroot '
'/Developer/SDKs/MacOSX10.4u.sdk '
'-fno-strict-aliasing -fno-common '
'-dynamic -DNDEBUG -g -O3'
%
(
arch
,)
)
'-dynamic -DNDEBUG -g -O3'
%
arch
)
self
.
assertEqual
(
get_platform
(),
'macosx-10.4-
%
s'
%
(
arch
,)
)
self
.
assertEqual
(
get_platform
(),
'macosx-10.4-
%
s'
%
arch
)
# linux debian sarge
os
.
name
=
'posix'
...
...
@@ -286,7 +276,6 @@ class TestSysConfig(unittest.TestCase):
self
.
assertIn
(
ldflags
,
ldshared
)
@unittest.skipUnless
(
sys
.
platform
==
"darwin"
,
"test only relevant on MacOSX"
)
def
test_platform_in_subprocess
(
self
):
my_platform
=
sysconfig
.
get_platform
()
...
...
@@ -312,7 +301,6 @@ class TestSysConfig(unittest.TestCase):
self
.
assertEqual
(
status
,
0
)
self
.
assertEqual
(
my_platform
,
test_platform
)
# Test with MACOSX_DEPLOYMENT_TARGET in the environment, and
# using a value that is unlikely to be the default one.
env
=
os
.
environ
.
copy
()
...
...
@@ -334,6 +322,7 @@ class TestSysConfig(unittest.TestCase):
class
MakefileTests
(
unittest
.
TestCase
):
@unittest.skipIf
(
sys
.
platform
.
startswith
(
'win'
),
'Test is not Windows compatible'
)
def
test_get_makefile_filename
(
self
):
...
...
Tools/scripts/findnocoding.py
Dosyayı görüntüle @
f46676d4
...
...
@@ -2,7 +2,7 @@
"""List all those Python files that require a coding directive
Usage: nocoding.py dir1 [dir2...]
Usage:
find
nocoding.py dir1 [dir2...]
"""
__author__
=
"Oleg Broytmann, Georg Brandl"
...
...
@@ -50,7 +50,7 @@ def has_correct_encoding(text, codec):
def
needs_declaration
(
fullpath
):
try
:
infile
=
open
(
fullpath
,
'rU'
)
infile
=
open
(
fullpath
)
except
IOError
:
# Oops, the file was removed - ignore it
return
None
...
...
Tools/scripts/pysource.py
Dosyayı görüntüle @
f46676d4
...
...
@@ -42,7 +42,7 @@ def _open(fullpath):
return
None
try
:
return
open
(
fullpath
,
'rU'
)
return
open
(
fullpath
)
except
IOError
as
err
:
# Access denied, or a special file - ignore it
print_debug
(
"
%
s: access denied:
%
s"
%
(
fullpath
,
err
))
return
None
...
...
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