nephila / giturlparse

Parse & rewrite git urls (supports GitHub, Bitbucket, Assembla ...)
https://pypi.python.org/pypi/giturlparse
Apache License 2.0
31 stars 21 forks source link

Cannot parse git URL from buildroot.org #46

Closed enkiusz closed 1 year ago

enkiusz commented 1 year ago

Description

giturlparse doesn't parse the following valid git url: "git://git.buildroot.net/buildroot". This URL is the address for the buildroot.org main repo (https://buildroot.org/download.html).

Steps to reproduce

➜  ~ source giturlparse-venv/bin/activate
(giturlparse-venv) ➜  ~ pip3 install giturlparse
Collecting giturlparse
  Using cached giturlparse-0.10.0-py2.py3-none-any.whl (14 kB)
Installing collected packages: giturlparse
Successfully installed giturlparse-0.10.0
(giturlparse-venv) ➜  ~ python3
Python 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from giturlparse import parse
>>> buildroot_url='git://git.buildroot.net/buildroot'
>>> p = parse(buildroot_url)
>>> p.__dict__
{'_parsed': defaultdict(<function parse.<locals>.<lambda> at 0x7f64e09dd2d0>, {'port': '', 'path_raw': '', 'groups_path': ''}), 'port': '', 'path_raw': '', 'groups_path': ''}
>>> 
(giturlparse-venv) ➜  ~ git clone git://git.buildroot.net/buildroot
Klonowanie do ,,buildroot"...
remote: Enumerating objects: 47592, done.
remote: Counting objects: 100% (47592/47592), done.
remote: Compressing objects: 100% (24419/24419), done.
^C

Versions

(giturlparse-venv) ➜  ~ python3 --version
Python 3.10.6

Expected behaviour

The URL is a valid URL for git clone therefore I was expecting that giturlparse should be able to parse it.

yakky commented 1 year ago

Thanks @enkiusz, this is going to be fixed with PR #50