[issue40935] Links to Python3 docs for some libs return 404

2020-06-12 Thread Edison Abahurire


Edison Abahurire  added the comment:

@Ned, I'm going to search through the docs for any links that may need 
redirecting, and provide their python3 alternatives.

--

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



[issue40935] Links to Python3 docs for some libs return 404

2020-06-09 Thread Edison Abahurire


New submission from Edison Abahurire :

These links in the deprecation warning on some Python 2 stdlib libraries 
documentation pages pointing to Python 3 alternatives return 404s. 

The link behind the words "Python documentation for the current stable release."

Examples:
https://docs.python.org/2/library/cgihttpserver.html
https://docs.python.org/2/library/basehttpserver.html
https://docs.python.org/2/library/simplehttpserver.html
https://docs.python.org/2/library/httplib.html
https://docs.python.org/2/library/cookie.html

The current methodology used is to replace the `2` with a `3` when making a new 
url and the challenge is that some libraries names changed.

--
messages: 371154
nosy: edison.abahurire, eric.araujo, ezio.melotti, mdk, willingc
priority: normal
severity: normal
status: open
title: Links to Python3 docs for some libs return 404

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



[issue40643] Improve doc-strings for datetime.strftime & strptime

2020-06-07 Thread Edison Abahurire


Edison Abahurire  added the comment:

Update: I opened a PR for this.

--

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



[issue40896] Missing links to Source Code in Documentation pages

2020-06-07 Thread Edison Abahurire


Edison Abahurire  added the comment:

Thanks for the review. 
I'll open a PR.

--

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



[issue40896] Missing links to Source Code in Documentation pages

2020-06-06 Thread Edison Abahurire


New submission from Edison Abahurire :

Just below the Module heading, most library documenation pages like 
https://docs.python.org/3/library/datetime.html have a link to the source code 
in the form of `Source code: Lib/datetime.py` that links to the cpython github 
file of that module.

Some modules like https://docs.python.org/3/library/time.html are missing this 
though and yet I think it would be quite useful for people who want to navigate 
the depths of the implementation.

Now, the challenge is that most modules are not located in single code files 
but what if, instead of leaving it blank, we link to the folder that contains 
the code of that module? Wouldn't that be helpful?

For example:
For https://docs.python.org/3/library/wsgiref.html, we can add this 
https://github.com/python/cpython/tree/master/Lib/wsgiref as the link to source 
code.

--
assignee: docs@python
components: Documentation
messages: 370863
nosy: docs@python, edison.abahurire, eric.araujo, ezio.melotti, mdk, willingc
priority: normal
severity: normal
status: open
title: Missing links to Source Code in Documentation pages
type: enhancement

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



[issue40670] supplying an empty string to timeit causes an IndentationError

2020-05-20 Thread Edison Abahurire


Edison Abahurire  added the comment:

Yes, This is unexpected

In the first case:
Supplying an empty string can also mean no code has been supplied. So it could 
be better treated as 'pass'.

In the second case:
 Error messages are meant to inform you of what you have done wrong so that you 
fix it. I think raising an Indentation error is far from what a user who is 
calling that method would be expecting, it does not help them at-all.

In the third case:
Supplying an empty string to timeit directly in bash ```python -m timeit '' ``` 
raises no such error. so we could say that fixing this will align the behavior 
in the two ways the function is run to be the same.

--

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



[issue40670] supplying an empty string to timeit causes an IndentationError

2020-05-18 Thread Edison Abahurire


New submission from Edison Abahurire :

The Error can be evidenced below:

```
>>>
>>> import timeit
>>>
>>> timeit.timeit('', number=1)
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3.8/timeit.py", line 232, in timeit
return Timer(stmt, setup, timer, globals).timeit(number)
  File "/usr/lib/python3.8/timeit.py", line 131, in __init__
code = compile(src, dummy_src_name, "exec")
  File "", line 7
_t1 = _timer()
^
IndentationError: expected an indented block
>>>
```

--
messages: 369208
nosy: anthonypjshaw, edison.abahurire
priority: normal
severity: normal
status: open
title: supplying an empty string to timeit causes an IndentationError

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



[issue40643] Improve doc-strings for datetime.strftime & strptime

2020-05-17 Thread Edison Abahurire


Edison Abahurire  added the comment:

Oh! I realized that statement is there because the strftime method used is 
inherited from the date class.

--

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



[issue40643] Improve doc-strings for datetime.strftime & strptime

2020-05-17 Thread Edison Abahurire


Edison Abahurire  added the comment:

Hi, An enquiry here: 
On the web documentation of strftime 
(https://docs.python.org/3/library/datetime.html?highlight=strftime#datetime.time.strftime),
 

What does this mean? 
"Format codes referring to hours, minutes or seconds will see 0 values."

--

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



[issue40643] Improve doc-strings for datetime.strftime & strptime

2020-05-17 Thread Edison Abahurire


Edison Abahurire  added the comment:

Thanks for the review @p-ganssle. 
I'll request that you assign it to me, counting on your guidance while changing 
it in the C implementation.

--

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



[issue40643] Improve doc-strings for datetime.strftime & strptime

2020-05-16 Thread Edison Abahurire


New submission from Edison Abahurire :

The docstring for strftime is:
```def strftime(self, fmt):
"Format using strftime()."
```

And that of strptime:
def strptime(cls, date_string, format):
'string, format -> new datetime parsed from a string (like 
time.strptime()).'


I feel like both could use a better explanation for users who will access them 
using >>> help(datetime.strftime) and users using IDEs that provide doc-strings 
on-hover over a function.

--
messages: 369040
nosy: edison.abahurire, nanjekyejoannah
priority: normal
severity: normal
status: open
title: Improve doc-strings for datetime.strftime & strptime

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



[issue36833] Add tests for Datetime C API Macros

2019-05-11 Thread Edison Abahurire


Edison Abahurire  added the comment:

I'm now working on this as pbo-36782 awaits merging.

--
nosy: +anthony shaw

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



[issue36783] No documentation for _FromXandFold C API functions

2019-05-06 Thread Edison Abahurire


Edison Abahurire  added the comment:

I have submitted a PR to address this. Awaiting Review.

--

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



[issue36782] Add tests for the datetime C API

2019-05-06 Thread Edison Abahurire


Edison Abahurire  added the comment:

@p-ganssle 
Please open a new bpo for the Untested macros. I will be happy to work on that 
in the sprints tomorrow.

--

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



[issue36782] Add tests for the datetime C API

2019-05-06 Thread Edison Abahurire


Edison Abahurire  added the comment:

I have submitted PR (under review) for these tests:

- PyDate_FromDate / PyDateTimeAPI->Date_FromDate
- PyDateTime_FromDateAndTime / PyDateTimeAPI->DateTime_FromDateAndTime
- PyDateTime_FromDateAndTimeAndFold / 
PyDateTimeAPI->DateTime_FromDateAndTimeAndFold
- PyTime_FromTime -> PyDateTimeAPI->Time_FromTime
- PyTime_FromTimeAndFold -> PyDateTime->Time_FromTimeAndFold
- PyDelta_FromDSU / PyDateTime->Delta_FromDelta

--

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



[issue36783] No documentation for _FromXandFold C API functions

2019-05-06 Thread Edison Abahurire


Edison Abahurire  added the comment:

I'm working on this because I think it should be done complementarily with 
adding the test for PyDateTime_FromDateAndTimeAndFold at 
https://bugs.python.org/issue36782. 

#Pycon2019 sprints

--
nosy: +edison.abahurire

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



[issue36782] Add tests for the datetime C API

2019-05-06 Thread Edison Abahurire


Edison Abahurire  added the comment:

I have done PyDateTime_FromDateAndTime. I'm moving on to add 
PyDateTime_FromDateAndTimeAndFold (plus documentation for fold as requested in 
https://bugs.python.org/issue36783) before making a PR.

--

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



[issue36782] Add tests for the datetime C API

2019-05-04 Thread Edison Abahurire


Edison Abahurire  added the comment:

I have done PyDate_FromDate in GH-13088

--

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