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
4ddfcd3b
Kaydet (Commit)
4ddfcd3b
authored
Eyl 30, 2006
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Bug #1556784: allow format strings longer than 127 characters in
datetime's strftime function.
üst
154324a8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
2 deletions
+6
-2
test_datetime.py
Lib/test/test_datetime.py
+1
-0
NEWS
Misc/NEWS
+3
-0
datetimemodule.c
Modules/datetimemodule.c
+2
-2
No files found.
Lib/test/test_datetime.py
Dosyayı görüntüle @
4ddfcd3b
...
@@ -844,6 +844,7 @@ class TestDate(HarmlessMixedComparison):
...
@@ -844,6 +844,7 @@ class TestDate(HarmlessMixedComparison):
t
=
self
.
theclass
(
2005
,
3
,
2
)
t
=
self
.
theclass
(
2005
,
3
,
2
)
self
.
assertEqual
(
t
.
strftime
(
"m:
%
m d:
%
d y:
%
y"
),
"m:03 d:02 y:05"
)
self
.
assertEqual
(
t
.
strftime
(
"m:
%
m d:
%
d y:
%
y"
),
"m:03 d:02 y:05"
)
self
.
assertEqual
(
t
.
strftime
(
""
),
""
)
# SF bug #761337
self
.
assertEqual
(
t
.
strftime
(
""
),
""
)
# SF bug #761337
self
.
assertEqual
(
t
.
strftime
(
'x'
*
1000
),
'x'
*
1000
)
# SF bug #1556784
self
.
assertRaises
(
TypeError
,
t
.
strftime
)
# needs an arg
self
.
assertRaises
(
TypeError
,
t
.
strftime
)
# needs an arg
self
.
assertRaises
(
TypeError
,
t
.
strftime
,
"one"
,
"two"
)
# too many args
self
.
assertRaises
(
TypeError
,
t
.
strftime
,
"one"
,
"two"
)
# too many args
...
...
Misc/NEWS
Dosyayı görüntüle @
4ddfcd3b
...
@@ -106,6 +106,9 @@ Library
...
@@ -106,6 +106,9 @@ Library
Extension
Modules
Extension
Modules
-----------------
-----------------
-
Bug
#
1556784
:
allow
format
strings
longer
than
127
characters
in
datetime
's strftime function.
- Fix itertools.count(n) to work with negative numbers again.
- Fix itertools.count(n) to work with negative numbers again.
- RLIMIT_SBSIZE was added to the resource module where available.
- RLIMIT_SBSIZE was added to the resource module where available.
...
...
Modules/datetimemodule.c
Dosyayı görüntüle @
4ddfcd3b
...
@@ -1149,9 +1149,9 @@ wrap_strftime(PyObject *object, PyObject *format, PyObject *timetuple,
...
@@ -1149,9 +1149,9 @@ wrap_strftime(PyObject *object, PyObject *format, PyObject *timetuple,
PyObject
*
newfmt
=
NULL
;
/* py string, the output format */
PyObject
*
newfmt
=
NULL
;
/* py string, the output format */
char
*
pnew
;
/* pointer to available byte in output format */
char
*
pnew
;
/* pointer to available byte in output format */
char
totalnew
;
/* number bytes total in output format buffer,
int
totalnew
;
/* number bytes total in output format buffer,
exclusive of trailing \0 */
exclusive of trailing \0 */
char
usednew
;
/* number bytes used so far in output format buffer */
int
usednew
;
/* number bytes used so far in output format buffer */
char
*
ptoappend
;
/* pointer to string to append to output buffer */
char
*
ptoappend
;
/* pointer to string to append to output buffer */
int
ntoappend
;
/* # of bytes to append to output buffer */
int
ntoappend
;
/* # of bytes to append to output buffer */
...
...
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