[issue38592] Add pt-br to the language switcher at the Python docs website

2019-11-02 Thread Marco Rougeth


Change by Marco Rougeth :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

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



[issue38592] Add pt-br to the language switcher at the Python docs website

2019-10-25 Thread Marco Rougeth


Change by Marco Rougeth :


--
keywords: +patch
pull_requests: +16454
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/16924

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



[issue38592] Add pt-br to the language switcher at the Python docs website

2019-10-25 Thread Marco Rougeth


New submission from Marco Rougeth :

The translation of the Python docs for Brazilian Portuguese is at around 20%. 
The Brazilian community have been working hard on it for the past 2 years, and 
as discussed with Julien, we believe this is a good moment to add the pt-br 
language switcher.

--
messages: 355384
nosy: rougeth
priority: normal
severity: normal
status: open
title: Add pt-br to the language switcher at the Python docs website

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



[issue36232] Improve error message on dbm.open

2019-09-25 Thread Marco Rougeth


Change by Marco Rougeth :


--
stage:  -> resolved
status: open -> closed

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



[issue36322] Argument typo in dbm.ndbm.open

2019-03-23 Thread Marco Rougeth

Marco Rougeth  added the comment:

Hi Terry, thanks for reviewing this and sorry for not being clear enough.

About dbm.gnu.open:

The docs indeed uses “flag”, in singular form, but it’s wrong because 1) the 
argument accepts, for some cases, 2 flags and, 2) the source code uses “flags” 
in plural form.

In [1]: import dbm.gnu
In [2]: help(dbm.gnu.open)  

Help on built-in function open in module _gdbm:

open(filename, flags='r', mode=438, /)
[...]

If you continue to read the docstring, there's an explanation about the cases 
where you can use two flags.

About dbm.ndbm.open:

For this one, the docs is also different from source code:

In [3]: import dbm.ndbm
In [4]: help(dbm.ndbm.open) 

Help on built-in function open in module _dbm:

open(filename, flags='r', mode=438, /)
[...]

The scope of the patch on Github ends here. It only makes the documentation 
consistent to the source code.

What I wanted to point out is that, in the case of ndbm.open, it accepts a 
flags option (in plural form) when it actually accepts only one. And since 
changing it would not make any difference from an user perspective, I believe 
we should go for it.

--

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



[issue36322] Argument typo in dbm.ndbm.open

2019-03-22 Thread Marco Rougeth


Change by Marco Rougeth :


--
keywords: +patch
pull_requests: +12453
stage:  -> patch review

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



[issue36322] Argument typo in dbm.ndbm.open

2019-03-16 Thread Marco Rougeth


Change by Marco Rougeth :


--
title: Argument typo in dam.ndbm.open -> Argument typo in dbm.ndbm.open

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



[issue36322] Argument typo in dam.ndbm.open

2019-03-16 Thread Marco Rougeth

New submission from Marco Rougeth :

Reading the documentation for `dbm.gnu.open` I noticed that there were a typo 
in the `flags` argument, it was documented as `flag`, in plural form.

The same typo was present for `dbm.ndbm.open`, but in this case, `flag` makes 
more sense than `flags`, since the function accepts only one option as a flag.

I opened a PR [1] fixing both typos, but I’d like to discuss if makes sense to 
rename the argument on `dbm.ndbm.open` from `flags` to `flag`. As point out by  
@remilapeyre, this change would be backwards compatible, since we cannot use 
the function with keyword arguments.

>>> dbm.ndbm.open(filename=‘foo’, flags=‘r’, mode=438)
Traceback (most recent call last):
  File “”, line 1, in 
TypeError: open() takes no keyword arguments

What do you folks think about it?

1 - https://github.com/python/cpython/pull/12095

--
messages: 338097
nosy: rougeth
priority: normal
severity: normal
status: open
title: Argument typo in dam.ndbm.open
type: enhancement

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



[issue36232] Improve error message on dbm.open

2019-03-08 Thread Marco Rougeth


New submission from Marco Rougeth :

If dbm.open is used with the flags 'r' or 'w' (read-only) to open a file that 
doesn't exist, it raises an exception with the message "need 'c' or 'n' flag to 
open new db". It'd be better to have a more explicit error message like "db 
file doesn't exist, use 'c' or 'n' flag to open new db".

--
messages: 337462
nosy: rougeth
priority: normal
pull_requests: 12220
severity: normal
status: open
title: Improve error message on dbm.open

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



[issue33194] Path-file objects does not have method to delete itself if its a file

2018-04-01 Thread Marco Rougeth

Marco Rougeth <ma...@rougeth.com> added the comment:

Wow, I never saw unlink term related to removing files (obviously I'm not an 
old-school Unix greybeard). @nsj could you point me the thread you talked 
about? or  help me find it? I looked in the archive in the last three months 
and couldn't find it.

Thank you.

--

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



[issue33194] Path-file objects does not have method to delete itself if its a file

2018-03-31 Thread Marco Rougeth

New submission from Marco Rougeth <ma...@rougeth.com>:

Path has the method `.rmdir()` for removing the directory, but it doesn't have 
anything if it correspond to a file.

The `os.remove` could be used here, but I think it should have a more 
appropriate/explicit  name like `.rmfile()`.

If it make  sense, I'd be glad to work on it.

--
messages: 314756
nosy: rougeth
priority: normal
severity: normal
status: open
title: Path-file objects does not have method to delete itself if its a file
type: enhancement
versions: Python 3.6, Python 3.7, Python 3.8

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



[issue30235] Validate shutil supports path-like objects, update docs accordingly

2018-03-06 Thread Marco Rougeth

Change by Marco Rougeth <ma...@rougeth.com>:


--
keywords: +patch
pull_requests: +5774
stage: test needed -> patch review

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



[issue33004] Shutil module functions could accept Path-like objects

2018-03-05 Thread Marco Rougeth

Marco Rougeth <ma...@rougeth.com> added the comment:

You're right @josh.r! Thank you!

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed

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



[issue33004] Shutil module functions could accept Path-like objects

2018-03-05 Thread Marco Rougeth

New submission from Marco Rougeth <ma...@rougeth.com>:

This is issue is to suggest an enhancement to the shutil module, I believe it's 
quiet similar to the issue32642.

I was using shutil.copytree to copy some files around and I tried to pass 
Path-like objects as input but got the exception "TypeError: argument should be 
string, bytes or integer, not PosixPath".

e.g.
build_path = BASE_DIR / 'build'
static_path = BASE_DIR / 'static'
shutil.copytree(static_path, build_path)


As said in issue32642, it "wasn't obvious because Path objects appear as 
strings in normal debug output". I had a look at the shutil source code and it 
seems that it wouldn't be to hard to implement. I'd love to do it, if it makes 
sense.

--
components: Library (Lib)
messages: 313295
nosy: rougeth
priority: normal
severity: normal
status: open
title: Shutil module functions could accept Path-like objects
type: enhancement
versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8

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