Skip to content

semantic-release generate-config --pyproject produces unreadable toml #702

Open
@damnmso

Description

@damnmso

The problem

when i execute semantic-release generate-config -f toml --pyproject >> pyproject.toml it adds tons of NUL in the file. Its impossible to handle that. My IDE is pycharm. The same in notepad++.

Expected behavior

to get a correct formatted, easy to read .toml

Environment

Please state which OS you are using and provide the output of the following commands:

python --version 
3.11
pip --version
pip 23.2.1 from C:\Users\xx.xx\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip (python 3.11)
semantic-release --version
semantic-release, version 8.0.8
pip freeze
altgraph==0.17.3
blinker==1.6.2
certifi==2023.7.22
cffi==1.15.1
charset-normalizer==3.2.0
click==8.1.7
colorama==0.4.6
configparser==6.0.0
coverage==7.3.0
cryptography==41.0.3
defusedxml==0.7.1
distlib==0.3.7
dotty-dict==1.3.1
Flask==2.3.3
from-root==1.3.0
gitdb==4.0.10
GitPython==3.1.34
idna==3.4
importlib-metadata==6.8.0
importlib-resources==5.7.0
iniconfig==2.0.0
itsdangerous==2.1.2
jaraco.classes==3.3.0
jeepney==0.8.0
Jinja2==3.1.2
jira==3.5.2
keyring==24.2.0
ldap3==2.9.1
markdown-it-py==3.0.0
MarkupSafe==2.1.3
mdurl==0.1.2
mocker==1.1.1
more-itertools==10.1.0
oauthlib==3.2.2
packaging==23.1
pefile==2023.2.7
pluggy==1.3.0
pyasn1==0.5.0
pybuilder==0.13.10
pycparser==2.21
pycrest==0.0.6
pydantic==1.10.12
Pygments==2.16.1
PyHamcrest==2.0.4
pyinstaller==5.13.2
pyinstaller-hooks-contrib==2023.8
PyMySQL==1.1.0
pynsist==2.8
PySimpleGUI==4.60.5
pytest==7.4.0
pytest-mock==3.11.1
python-gitlab==3.15.0
python-semantic-release==8.0.8
pywin32==306
pywin32-ctypes==0.2.2
requests==2.31.0
requests-oauthlib==1.3.1
requests-toolbelt==1.0.0
requests_download==0.1.2
rich==13.5.2
screeninfo==0.8.1
SecretStorage==3.3.3
shellingham==1.5.3
shutils==0.1.0
smmap==5.0.0
tomlkit==0.12.1
typing_extensions==4.7.1
urllib3==2.0.4
Werkzeug==2.3.7
yarg==0.1.9
zipp==3.16.2

Please also indicate which Python build tool(s) you are using (e.g. pip, build,
poetry, etc.), including the version number too.
pybuilder, pip

Configuration

Please add your semantic-release configuration, and if applicable also provide
your build-system configuration from pyproject.toml.

pyproject.toml:

[build-system]
requires = ["pybuilder>=0.12.0"]
build-backend = "pybuilder.pep517"
[ t o o l . s e m a n t i c _ r e l e a s e ] 
 
 a s s e t s   =   [ ] 
 
 c o m m i t _ m e s s a g e   =   " { v e r s i o n } \ n \ n A u t o m a t i c a l l y   g e n e r a t e d   b y   p y t h o n - s e m a n t i c - r e l e a s e " 
 
 c o m m i t _ p a r s e r   =   " a n g u l a r " 
 
 l o g g i n g _ u s e _ n a m e d _ m a s k s   =   f a l s e 
 
 m a j o r _ o n _ z e r o   =   t r u e 
 
 t a g _ f o r m a t   =   " v { v e r s i o n } " 
 
 
 
 [ t o o l . s e m a n t i c _ r e l e a s e . b r a n c h e s . m a i n ] 
 
 m a t c h   =   " ( m a i n | m a s t e r ) " 
 
 p r e r e l e a s e _ t o k e n   =   " r c " 
 
 p r e r e l e a s e   =   f a l s e 
 
 
 
 [ t o o l . s e m a n t i c _ r e l e a s e . c h a n g e l o g ] 
 
 t e m p l a t e _ d i r   =   " t e m p l a t e s " 
 
 c h a n g e l o g _ f i l e   =   " C H A N G E L O G . m d " 
 
 e x c l u d e _ c o m m i t _ p a t t e r n s   =   [ ] 
 
 
 
 [ t o o l . s e m a n t i c _ r e l e a s e . c h a n g e l o g . e n v i r o n m e n t ] 
 
 b l o c k _ s t a r t _ s t r i n g   =   " { % " 
 
 b l o c k _ e n d _ s t r i n g   =   " % } " 
 
 v a r i a b l e _ s t a r t _ s t r i n g   =   " { { " 
 
 v a r i a b l e _ e n d _ s t r i n g   =   " } } " 
 
 c o m m e n t _ s t a r t _ s t r i n g   =   " { # " 
 
 c o m m e n t _ e n d _ s t r i n g   =   " # } " 
 
 t r i m _ b l o c k s   =   f a l s e 
 
 l s t r i p _ b l o c k s   =   f a l s e 
 
 n e w l i n e _ s e q u e n c e   =   " \ n " 
 
 k e e p _ t r a i l i n g _ n e w l i n e   =   f a l s e 
 
 e x t e n s i o n s   =   [ ] 
 
 a u t o e s c a p e   =   t r u e 
 
 
 
 [ t o o l . s e m a n t i c _ r e l e a s e . c o m m i t _ a u t h o r ] 
 
 e n v   =   " G I T _ C O M M I T _ A U T H O R " 
 
 d e f a u l t   =   " s e m a n t i c - r e l e a s e   < s e m a n t i c - r e l e a s e > " 
 
 
 
 [ t o o l . s e m a n t i c _ r e l e a s e . c o m m i t _ p a r s e r _ o p t i o n s ] 
 
 a l l o w e d _ t a g s   =   [ " b u i l d " ,   " c h o r e " ,   " c i " ,   " d o c s " ,   " f e a t " ,   " f i x " ,   " p e r f " ,   " s t y l e " ,   " r e f a c t o r " ,   " t e s t " ] 
 
 m i n o r _ t a g s   =   [ " f e a t " ] 
 
 p a t c h _ t a g s   =   [ " f i x " ,   " p e r f " ] 
 
 
 
 [ t o o l . s e m a n t i c _ r e l e a s e . r e m o t e ] 
 
 n a m e   =   " o r i g i n " 
 
 t y p e   =   " g i t h u b " 
 
 i g n o r e _ t o k e n _ f o r _ p u s h   =   f a l s e 
 
 
 
 [ t o o l . s e m a n t i c _ r e l e a s e . r e m o t e . t o k e n ] 
 
 e n v   =   " G H _ T O K E N " 
 
 
 
 [ t o o l . s e m a n t i c _ r e l e a s e . p u b l i s h ] 
 
 d i s t _ g l o b _ p a t t e r n s   =   [ " d i s t / * " ] 
 
 u p l o a d _ t o _ v c s _ r e l e a s e   =   t r u e 
 
 
 
 

Logs

Please provide debug logs for the command you are using with the -vv flag, e.g.

[10:48:31] DEBUG    [semantic_release.cli.commands.main] DEBUG      main.py:101
                    main.main: Forwarding to generate-config

If using GitHub actions, ensure the root_options contains the -vv flag
for verbosity, and attach your workflow definition.

Additional context

i can not add those NULs to the project.toml pasted here. so i attach a little screenshot:

Unbenannt

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working properlyconfirmedPrevent from becoming stalegood first issuea good start point for new contributorsneeds-docsDocumentation needs to be updatedneeds-updateNeeds status update from maintainers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions