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
1448ecf4
Kaydet (Commit)
1448ecf4
authored
Eki 04, 2013
tarafından
Brett Cannon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #18716: Deprecate the formatter module
üst
cc5d49e3
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
8 deletions
+19
-8
formatter.rst
Doc/library/formatter.rst
+4
-0
3.4.rst
Doc/whatsnew/3.4.rst
+6
-3
formatter.py
Lib/formatter.py
+3
-0
pydoc.py
Lib/pydoc.py
+4
-5
NEWS
Misc/NEWS
+2
-0
No files found.
Doc/library/formatter.rst
Dosyayı görüntüle @
1448ecf4
...
@@ -4,6 +4,10 @@
...
@@ -4,6 +4,10 @@
.. module:: formatter
.. module:: formatter
:synopsis: Generic output formatter and device interface.
:synopsis: Generic output formatter and device interface.
.. deprecated:: 3.4
Due to lack of usage, the formatter module has been deprecated and is slated
for removal in Python 3.6.
This module supports two interface definitions, each with multiple
This module supports two interface definitions, each with multiple
implementations: The *formatter* interface, and the *writer* interface which is
implementations: The *formatter* interface, and the *writer* interface which is
...
...
Doc/whatsnew/3.4.rst
Dosyayı görüntüle @
1448ecf4
...
@@ -516,6 +516,9 @@ Deprecated Python modules, functions and methods
...
@@ -516,6 +516,9 @@ Deprecated Python modules, functions and methods
* The :mod:`imp` module is pending deprecation. To keep compatibility with
* The :mod:`imp` module is pending deprecation. To keep compatibility with
Python 2/3 code bases, the module's removal is currently not scheduled.
Python 2/3 code bases, the module's removal is currently not scheduled.
* The :mod:`formatter` module is pending deprecation and is slated for removal
in Python 3.6.
Deprecated functions and types of the C API
Deprecated functions and types of the C API
-------------------------------------------
-------------------------------------------
...
@@ -554,9 +557,9 @@ that may require changes to your code.
...
@@ -554,9 +557,9 @@ that may require changes to your code.
* Import now resets relevant attributes (e.g. ``__name__``, ``__loader__``,
* Import now resets relevant attributes (e.g. ``__name__``, ``__loader__``,
``__package__``, ``__file__``, ``__cached__``) unconditionally when reloading.
``__package__``, ``__file__``, ``__cached__``) unconditionally when reloading.
* Frozen packages no longer set ``__path__`` to a list contain
g the package nam
e
* Frozen packages no longer set ``__path__`` to a list contain
ing the packag
e
but an empty list instead. Determing if a module is a package should be don
e
name but an empty list instead. Determing if a module is a package should b
e
using ``hasattr(module, '__path__')``.
done
using ``hasattr(module, '__path__')``.
* :c:func:`PyErr_SetImportError` now sets :exc:`TypeError` when its **msg**
* :c:func:`PyErr_SetImportError` now sets :exc:`TypeError` when its **msg**
argument is not set. Previously only ``NULL`` was returned with no exception
argument is not set. Previously only ``NULL`` was returned with no exception
...
...
Lib/formatter.py
Dosyayı görüntüle @
1448ecf4
...
@@ -19,6 +19,9 @@ manage and inserting data into the output.
...
@@ -19,6 +19,9 @@ manage and inserting data into the output.
"""
"""
import
sys
import
sys
import
warnings
warnings
.
warn
(
'the formatter module is deprecated and will be removed in '
'Python 3.6'
,
PendingDeprecationWarning
)
AS_IS
=
None
AS_IS
=
None
...
...
Lib/pydoc.py
Dosyayı görüntüle @
1448ecf4
...
@@ -1915,11 +1915,10 @@ module "pydoc_data.topics" could not be found.
...
@@ -1915,11 +1915,10 @@ module "pydoc_data.topics" could not be found.
if
more_xrefs
:
if
more_xrefs
:
xrefs
=
(
xrefs
or
''
)
+
' '
+
more_xrefs
xrefs
=
(
xrefs
or
''
)
+
' '
+
more_xrefs
if
xrefs
:
if
xrefs
:
import
formatter
import
textwrap
buffer
=
io
.
StringIO
()
text
=
'Related help topics: '
+
', '
.
join
(
xrefs
.
split
())
+
'
\n
'
formatter
.
DumbWriter
(
buffer
)
.
send_flowing_data
(
wrapped_text
=
textwrap
.
wrap
(
text
,
72
)
'Related help topics: '
+
', '
.
join
(
xrefs
.
split
())
+
'
\n
'
)
self
.
output
.
write
(
'
\n
%
s
\n
'
%
''
.
join
(
wrapped_text
))
self
.
output
.
write
(
'
\n
%
s
\n
'
%
buffer
.
getvalue
())
def
_gettopic
(
self
,
topic
,
more_xrefs
=
''
):
def
_gettopic
(
self
,
topic
,
more_xrefs
=
''
):
"""Return unbuffered tuple of (topic, xrefs).
"""Return unbuffered tuple of (topic, xrefs).
...
...
Misc/NEWS
Dosyayı görüntüle @
1448ecf4
...
@@ -21,6 +21,8 @@ Core and Builtins
...
@@ -21,6 +21,8 @@ Core and Builtins
Library
Library
-------
-------
- Issue #18716: Deprecate the formatter module.
- Issue #18037: 2to3 now escapes '
\
u
' and '
\
U
' in native strings.
- Issue #18037: 2to3 now escapes '
\
u
' and '
\
U
' in native strings.
- Issue #17839: base64.decodebytes and base64.encodebytes now accept any
- Issue #17839: base64.decodebytes and base64.encodebytes now accept any
...
...
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